Runlevels

root's picture

Runlevel is a mode of operation in operating systems with UNIX system implementation.
They are different from one OS to another but in general are 7 (from 0 to 6).

Typical runlevels are assigned to:
- single-user mode
- multi-user mode without network services started
- multi-user mode with network services started
- system shutdown
- system reboot
See below the most common and their differences.

Standard runlevels:

0 - Halt - Shuts down the system.
S - Single-User Mode - Does not configure network interfaces or start daemons.
6 - Reboot - Reboots the system.

Linux - Standard:

0 - Halt - Shuts down the system.
1 - Single-user Mode - Mode for administrative tasks.
2 - Multi-user Mode - Does not configure network interfaces and does not export networks services.
3 - Multi-user Mode with Networking - Starts the system normally.
4 - Not used/User-definable - For special purposes.
5 - Start the system normally with appropriate display manager. (with GUI) -Same as runlevel 3 + display manager.
6 - Reboot - Reboots the system.

Linux - Debian:

S - Only run on boot (replaces /etc/rc.boot)
0 - Halt
1 - Single user mode
2-5 - Full multi-user with console logins and display manager if installed
6 - Reboot

Linux - Ubuntu

0 - Halt
1 - Single-user mode
2 - Graphical multi-user with networking
3-5 - Unused but configured the same as runlevel 2
6 -Reboot

Linux - Redhat/Fedora:

0 - Halt
1 - Single user (safe mode)
2 - Full multi-user with network enabled but most network services disabled
3 - Full multi-user, console logins only
4 - Not used/User definable
5 - Full multi-user, with display manager as well as console logins
6 - Reboot

Linux - Suse:

0 - Halt
1,S - Single-user
2 - Full multi-user with no networking
3 - Full multi-user without display manager
4 - Not used/User definable
5 - Full multi-user with display manager
6 - Reboot

Linux - Slackware:

0 - Halt
1 - Single-user
2 - Full multi-user NO display manager
3 - Full multi-user NO display manager
4 - Full multi-user with display manager
5 - Not used/User definable
6 - Reboot

Linux - Gentoo:

0 - Halt
1 - Single-user
2 - Multi-user, no network
3 - Full multi-user with display manager
4 - Aliased for runlevel 3
5 - Aliased for runlevel 3
6 - Reboot

UNIX - System V

0 - Shut down system, power-off if hardware supports it (only available from the console)
1 - Single-user mode, all filesystems unmounted but root, all processes except console processes killed
2 - Multi-user mode
3 - Multi-user mode with RFS (and NFS in release 4) filesystems exported
4 - Multi-user, user-defined
5 - Halt the operating system, go to firmware
6 - Halt the system, reboot to default runlevel
s,S - Identical to 1 (Single-user mode, all filesystems unmounted but root, all processes except console processes killed) except current terminal acts as the system console

UNIX - Solaris:

0 - Operating system halted; (SPARC only) drop to OpenBoot prompt
S - Single-user with only root filesystem mounted (as read-only)
1 - Single-user mode with all local filesystems mounted (read-write)
2 - Multi-user with most daemons started.
3 - multi-user, identical to 2 (runlevel 3 runs both /sbin/rc2 and /sbin/rc3), with filesystems exported, plus some other network services started.
4 - Alternative multi-user, user-defined
5 - Shut down, power-off if hardware supports it
6 - Reboot

UNIX - HP-UX:

0 - System halted
S - Single-user, booted to system console only, with only root filesystem mounted (as read-only)
s - Single user, identical to S except the current terminal acts as the system console[/cross]
1 - Single-user with local filesystems mounted (read-write)
2 - Multi-user with most daemons started and Common Desktop Environment launched
3 - Multi-user, nearly identical to runlevel 2 with NFS exported
4 - Multi-user with VUE started instead of CDE
5,6 - user-defined

UNIX - AIX:

0 - Reserved
1 - Reserved
2 - Normal multiuser mode - default mode
3-9 - Free to be defined by the administrator

Default runlevels

AIX - 2
Arch Linux - 3
Cent OS - 3
Debian GNU/Linux - 2
Gentoo Linux - 3
Mandriva Linux - 5
Mac OS X - 3
Red Hat Linux / Fedora Core - 3 or 5
Slackware Linux - 3
Solaris - 3
SUSE Linux - 5
Ubuntu (Server and Desktop) - 2

FreeBSD, OpenBSD and NetBSD do not use the concept of runlevels.

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.

Recent content

root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root