How to Stop the Graphical User Interface on Ubuntu and Linux Mint

Hello Linux Geeksters.

Watch Free Movies

When I use Linux on virtual machines and connect via Putty from Windows, I prefer to turn off the GUI in order to reduce the battery constumption.

In this article I will show you how to temporary disable the Graphical User Interface on Ubuntu, Linux Mint and other Debian based systems.

The names for the gui services are:

  • LightDM
  • MDM
  • KDM
  • GDM

If your graphical user interface freezes, press CTRL + ALT + F1 to turn it off.

To start back the GUI, press CTRL + ALT + F7.

To change the default graphical user interface, use this oneliner:

$ sudo dpkg-reconfigure {lightdm,mdm,kdm,gdm}


$ sudo service lightdm stop


$ sudo /etc/init.d/lightdm stop


$ sudo service mdm stop


$ sudo /etc/init.d/mdm stop


$ sudo service kdm stop


$ sudo /etc/init.d/kdm stop


$ sudo service gdm stop


$ sudo /etc/init.d/gdm stop

To stop the GUI, from the CLI, do this (this works for all gdm, kdm, mdm, lightdm):

$ sudo service {lightdm,mdm,kdm,gdm} stop


  • to start the service, replace stop with start
  • to restart the service, replace stop with restart

Scroll to Top