Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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).

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer
    
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
add comment

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

sudo service kdm stop

For GNOME3:

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.

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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