How to stop the Unity Desktop [duplicate]

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.


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

Type

sudo service lightdm stop

this will shutdown all graphics.