38

Okay my question is that, I want to run a heavy application, on a Virtual Machine (VirtualBox) with just 2 GB RAM (Windows 7 32Bit Host has 4 GB, 3.5 GB effective). Initially I thought of installing Ubuntu Server 12.04.1, which doesn't come with a GUI, so I thought it would be efficient in performance, but I have only Ubuntu 12.04 Desktop.

My question is, is it possible to remove the GUI parts in Ubuntu 12.04 Desktop (Not Server), keeping only the core OS, after installation in a virtual machine?

Or, is there anyway to improve the performance of the OS?

If you need more information, I am ready to provide.

I don't want the GUI or anything, even a small terminal window is fine for me, I can access files through FTP.

fossfreedom
  • 172,746

3 Answers3

56

It is not needed to remove the GUI (unity, lightdm, compiz, etc.) from the system.

You can leave it and just make your default boot as a text mode and if once you need a GUI you can restore it easily.

open /etc/default/grub as root in your favourite text editor, for example sudo vi /etc/default/grub And change the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" To GRUB_CMDLINE_LINUX_DEFAULT="text" and update Grub.sudo update-grub Your system will then always boot to text mode.

If you once want to use GUI you can easly start lightdm, the GUI:

sudo service lightdm start

Here are some hints that you may use to increase performance of your system.

Oxylibrium
  • 342
  • 2
  • 12
32

None of these answers answers the user's question.

  • Advising how to disable the GUI is not removing it.
  • Advising how to use a different GUI is not removing it.
  • Advising to use a different Linux distro is not removing it.

The commands to remove the GUI are:

sudo apt-get remove ubuntu-desktop
sudo apt-get autoremove

This will remove the Ubuntu Desktop meta-package and all associated packages.

If you're going to answer the question, answer the question.

Majik
  • 682
  • 5
  • 8
  • 4
    The accepted answer gives pointers in a recommended direction. Just answering sudo apt-get remove stuff could cause more harm to the OP than you might think. Please avoid adding reasons to why you've added the answer, that is off-topic and is better off as comment. – edwin Aug 23 '13 at 19:37
  • I agree with @edwin. :) – Praveen Kumar Purushothaman Aug 24 '13 at 01:49
  • if i want to enable it what should i do? – bugZero Jan 22 '14 at 12:50
  • 3
    This method may or may not work: often packages that provide the GUI are depended on by other packages, such that the ubuntu-desktop metapackage is not always the root of their "dependency tree." – Eliah Kagan Aug 09 '14 at 11:56
  • 4
    Majik still has a VERY valid point! When someone asks how yo remove the gui, any other answer than how to actually remove the gui is per definition off topic. If someone asks "do i have to remove the gui?", feel free to elaborate on the pros and cons of the gui and/or different versions of it. – CalMo Dec 17 '15 at 05:50
  • This did not work for me. Rebooted after both commands boots to the standard ubuntu desktop login, but then after logging in I'm left at a blank blue screen with limited right-click menu. – aquirdturtle Aug 01 '22 at 21:29
9

Alternatively you can install openbox, one of the most lightweight window managers available:

sudo apt-get install openbox openbox-themes obconf obmenu

This automatically adds an openbox session to the login menu. And this is its GUI:

enter image description here

Yep, that's it. Nothing more but a right-click menu. A GUI with an incredibly low RAM footprint, just like you want it.

Glutanimate
  • 21,393
  • Looks cool, but I am more and more interested in removing the interface itself, coz, I wanna run some huge heavy app, which I can access using my Windows host. :) – Praveen Kumar Purushothaman Oct 05 '12 at 06:44
  • @PraveenKumarPurushothaman if your problems is not ROM space but rather RAM+CPU, the correct question to ask is "How do I log into linux without a GUI", not how to uninstall it. – Vorac Sep 19 '20 at 22:14
  • @Vorac Yea, sure... Now we have Vagrant and Docker, rendering this question totally useless. And I have got a machine that's Intel Dual Xeon with 64 GB RAM. So... – Praveen Kumar Purushothaman Sep 20 '20 at 06:05