I am using Ubuntu 13.04 64-bit. I need to perform some database benchmarks on my computer so I want to make it in strict terminal mode, without desktop. I know I can ctrl-alt-f1 to go to terminal mode, but there is still graphical desktop running in background. (Using CPU and RAM which I do not want it to).

So please help me to kill all graphical components and switch to only terminal mode (for better performance). I will not need multiple users to be able to log in and do not need to have networking (all benchmarks will be on localhost interface).


The command below will stop the graphical interface. The next one will restart it for you (everything will be reset as if you had restarted your computer).

sudo service lightdm stop
sudo service lightdm start

This works for Unity, I don't know for sure if it works on Gnome desktop.

  • This works if your display manager is lightdm (which is probably the case unless you explicitly changed it). Other display managers are gdm3 and kdm (for KDE). In that case, just replace lightdm with gdm3 or kdm in the given commands, correspondingly. – gniourf_gniourf Sep 28 '13 at 13:47
  • Ok thanks, that clears things up for me. Display manager, not GUI. It's been a long week of studying shell scripting, I forgot my graphical rules. – Alex Sep 28 '13 at 23:21

To stop any Desktop Manager/Window Manager, for Kubuntu/KDE:

sudo service kdm stop


sudo service gdm stop

For Lubuntu/LXDE:

sudo service lxdm stop

For Xubuntu/XFCE:

sudo service xdm stop

To start everything again, just replace stop for start. You can also try switching from init level to #1.

  • Great, now how about starting them? ;P – Seth Oct 8 '13 at 17:39
  • @Seth if you stop something the contrary is to start something, no? – Braiam Oct 8 '13 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.