In Linux, runlevels define how the system is
started and what services are available in the running system.
After booting, the system starts as defined in
/etc/inittab
in the line
initdefault
. Usually this is 3
or
5
. See Table 7.1, “Available Runlevels”.
As an alternative, the runlevel can be
specified at boot time (at the boot prompt, for instance). Any parameters
that are not directly evaluated by the kernel itself are passed to
init.
To change runlevels while the system is running, enter
init and the corresponding number as an argument. Only
the system administrator is allowed to do this. init
1
(or shutdown
now
) causes the system to change to
single user mode, which is used for system maintenance
and administration. After finishing work, the administrator can switch
back to the normal runlevel by entering init
3
, which starts all the essential programs and
allows regular users to log in and work with the system without X. To enable
a graphical environment, like GNOME, KDE, or any other window manager, use
init 5
instead. init
0
or shutdown -h
now
causes the system to halt. init
6
or shutdown -r
now
causes it to shut down with a subsequent reboot.
![]() | Runlevel 2 with a /usr Partition Mounted via NFS |
---|---|
You should not use runlevel 2 if your system mounts the
|
Table 7.1. Available Runlevels
Runlevel | Description |
---|---|
0 | System halt |
S | Single user mode; from the boot prompt, only with US keyboard mapping |
1 | Single user mode |
2 | Local multiuser mode without remote network (e.g., NFS) |
3 | Full multiuser mode with network |
4 | Not used |
5 | Full multiuser mode with network and X display manager—KDM (default), GDM, or XDM |
6 | System reboot |
Runlevel 5
is the default runlevel in all SUSE LINUX
standard installations. Users are prompted for login directly under a
graphical interface. If the default runlevel is 3
, the X
Window System must be configured properly, as described in
Chapter 11, The X Window System, before the runlevel can be switched to
5
. If this is done, check whether the system works in the
desired way by entering init 5
. If
everything turns out as expected, you can use YaST to set the default
runlevel to 5
.