Hello Linux Geeksters.

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}
LightDM:
$ sudo service lightdm stop
OR:
$ sudo /etc/init.d/lightdm stop
MDM:
$ sudo service mdm stop
OR:
$ sudo /etc/init.d/mdm stop
KDM:
$ sudo service kdm stop
OR:
$ sudo /etc/init.d/kdm stop
GDM:
$ sudo service gdm stop
OR:
$ 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
Bonus:
- to start the service, replace stop with start
- to restart the service, replace stop with restart