Monday, September 15, 2008

How to Change Runlevels (LINUX GURU)

Many people get confused when trying to boot in to a runlevel other than runlevel 5, for example runlevel 3, disabiling the GUI front end with which most users are familiar. Hopefully this howto will help answer the questions "How do I disable X" or "How do I boot without X" or even "How do I get to single user mode.

Runlevels

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 or Admin
5 - X11
6 - reboot (Do NOT set initdefault to this)


How to set the default run level 5

Open /etc/inittab to change your runlevel

On about line 18 you will see a line like the one shown below.
id:3initdefault:

change it to 5 as below

id:5:initdefault:
Save file and exit