As with most stories on this site, I use my stories to store notes on
things that I keep needing to lookup and that might help others.
This one is how to change the default startup runlevel of a debian (via
knoppix distribution). In this case I want it to stop booting into
graphical mode, or boot into runlevel 3.
The “/etc/inittab” file tells init which runlevel to start the system at and describes the processes to be run at each runlevel.
So, according to
# Default runlevel. The runlevels used by RHS are:
# 0 – halt (Do NOT set initdefault to this)
# 1 – Single user mode
# 2 – Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 – Full multiuser mode
# 4 – unused
# 5 – X11
# 6 – reboot (Do NOT set initdefault to this)
the entry
id:3:initdefault:
would boot into multiuser mode, without X windows starting which is what I want.
For Ubuntu 11.04, use this instead.
—————–
How do I change the default runlevel?
If you have an /etc/inittab file, edit it. Locate the following line:
id:2:initdefault:
Change the number after the first colon to the runlevel you want to be the default.
However, most people won’t have that file, in which case you should edit /etc/init/rc-sysinit.conf instead and change the following line:
env DEFAULT_RUNLEVEL=2