Possible Duplicate:
How does one exit the X server?

I would like to shutdown the graphical interface and every related graphical application on my Ubuntu 11.10 (with 4 GiB memory and 4 GiB swap) temporarily in order to free up memory. How can I achieve this?

I try to reduce memory consumption because I am doing very memory intensive computations (SAT solving with 1.25 million clauses) which easily consumes 4 GiB of memory and more. I want to prevent swapping for as long as possible because this will slow down the computations considerably.

marked as duplicate by Jorge Castro, Amith KK, RolandiXor, jokerdino, ajmitch Aug 17 '12 at 2:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • You might want to use a usb-stick as swap as well. In my experience, this is generally faster than using HDD swap. (see: ubuntuforums.org/showthread.php?t=395435 ) – aureianimus Oct 30 '11 at 11:21
  • I wish you good luck, and shutting down GUI might help, but if your calculation for example needs 5Gb of RAM, you might think about refining the algorithm you're using for solving the problem, or using a machine with more ram, swap is a calculation killer, you might wait for days and your computer will be unusable in the process. In the end the problem might consume even swap and then you're at the square 1 with lot of time lost. – enedene Oct 30 '11 at 12:46
  • 1
    Following on from enedene's advice, if you can't reduce your memory consumption, get access to a machine with more memory. If you can't get access to a machine with more memory, consider renting a comp from Amazon - the EC2 large instance (7.5G RAM) is 35 cents an hour, or High-memory Extra large (17G RAM) is 50 cents an hour. – Thomas Oct 30 '11 at 18:01

Sounds like you just want to stop the X-System.

Logout of you current session to leave you at the LightDM GUI screen.

Press CTRL + ALT + F1 to move to TTY1 (text console).

Login as yourself


sudo service lightdm stop

this will shutdown all graphics.

  • It's probably also useful to start the process in a screen so that you can log out of the desktop when necessary without disrupting the process, and just continue it on another tty or computer. – Jo-Erlend Schinstad Oct 30 '11 at 16:13

You could install LXDE for a safer approach. Once you're done, you can switch back to Unity.

  • Why would anyone downvote this? It is a very good suggestion since openbox requires far less resources than Compiz or Metacity, while still providing useful services. +1 – Jo-Erlend Schinstad Oct 30 '11 at 16:09
  • 3
    The OP said I would like to shutdown the graphical interface and every related graphical application on my Ubuntu 11.10. He did not ask for alternatives of Unity – Manish Sinha Oct 30 '11 at 17:26

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