Ubuntu – Starting Ubuntu Without the GUI

guiUbuntuxfce

I want to boot a "Ubuntu 10.04.2 LTS" server, but I want XFCE not to be started, nor X at all, only Shell.

How do I tell my server to boot to the shell, not running XFCE at all?

I have an SSH connection to the server, but no display connected.

Since I migrated from earlier versions I use GRUB 1, where no /etc/default/grub exists.

I would like to set the target runlevel somewhere, without changing GRUB at all.

Best Answer

I see three ways to do it:

1. Changing the default runlevel

You can set it at the beginnign of /etc/init/rc-sysinit.conf replace 2 by 3 and reboot. You can enable the graphical interface with telinit 2.(More about runlevels)

2. Do not launch the graphical interface service on boot

update-rc.d -f xdm remove

Quick and easy. You can re-enable the graphical interface with service xdm start or revert your changes with update-rc.d -f xdm defaults

3. Remove packages

apt-get remove --purge x11-common && apt-get autoremove

I think it suits best for a computer considered as a server. You can re-enable the graphical interface by reinstalling the packages.

Related Question