Linux Box Booting GUI vs Terminal Mode

If you are configuring a Linux box as a server, it is convenient to configure it to boot into terminal mode rather than GUI mode. This is especially true if it is hooked up to a KVM because Linux seems to get confused when it is hooked up to a KVM and the mouse won’t work. On RedHat boxes the default run state needs to be changed from 5 to something like 3 in the /etc/inittab file. For example:

id:3:initdefault:

On a Ubuntu box (and I assume all Debian boxes are like this), the default runstate is 2 and the GUI is started in all runstates except 1. This is the case if you load Ubuntu as a desktop which I generally do because it is nice to have the GUI to configure the server. In order to disable the GUI in runstate 2, don’t just remove the start script, move it so that the start script does not get recreated during an update:

cd /etc/rc2.d
mv S13gdm K01gdm

Any time you want to start up the GUI, all you need to do is change the runstate to a runstate that has the GUI.

init 5

Comments are closed.