Run Levels for Various Unices


I started putting this in my Misc. page, but thought it needed its own page. This spawned from a UUASC mailing list, and I thought I'd post it for reference.

Solaris
S, s
Single user mode. Doesn't require properly formated /etc/inittab. Filesystems required for basic system operation are mounted.

0
Go into firmware (sparc)

1
System Administrator mode. All local filesystems are mounted. Small set of essential system processes are running. Also a single user mode.

2
Put the system in multi-user mode. All multi-user environment terminal processes and daemons are spawned.

3
Extend multi-user mode by making local resources available over the network.

4
Is available to be defined as an alternative multi-user environment configuration. It is not necessary for system operation and is usually not used.

5
Shut the machine down so that it is safe to remove the power. Have the machine remove power, if possible.

6
Reboot

a, b, c
Process only those /etc/inittab entries having the a, b, or c run level set. These are pseudo-states, which may be defined to run certain commands, but which do not cause the current run level to change.

Q, q
Re-examine /etc/inittab.


HP-UX
0
System is completely shut down. All processes are terminated and all file systems are unmounted.

1,s,S
Single-user mode. All system services and daemons are terminated and all file systems are unmounted.

2

Multi-user mode, except NFS is not enabled.

3
Multi-user mode. This is the normal operational default state. NFS is enabled.

4
Multi-user mode with NFS and VUE. (VUE is HP's desktop, kinda like CDE)

6
Reboot.


OpenBSD
-1
Permanently insecure mode - always run system in level 0 mode.

0
Insecure mode - immutable and append-only flags may be changed. All devices may be read or written subject to their permissions.

1
Secure mode - system immutable and append-only flags may not be turned off; disks for mounted filesystems, /dev/mem, and /dev/kmem are read-only.

2
Highly secure mode - same as secure mode, plus disks are always read-only whether mounted or not and the settimeofday(2) system call can only advance the time.


ULTRIX, Digital UNIX / Tru64
0
System is completely shut down. All processes are terminated and all file systems are unmounted.

1
Single-user mode. All system services and daemons are terminated and all file systems are unmounted.

2
Multi-user mode, except NFS is not enabled.

3
Multi-user mode. This is the normal operational default state. NFS is enabled.

4
Not Used

5
Not Used

6
Reboot


Irix
0
Shut the machine down so it is safe to remove the power. Have the machine remove power if it can.

1
Put the system into system administrator mode. All filesystems are mounted. Only a small set of essential kernel processes run. This mode is for administrative tasks such as installing optional utilities packages. All files are accessible and no users are logged in on the system.

2
Put the system into multi-user state. All multi-user environment terminal processes and daemons are spawned. Default.

3
Start the remote file sharing processes and daemons. Mount and advertise remote resources. Run level 3 extends multi-user mode and is known as the remote-file-sharing state.

4
Define a configuration for an alternative multi-user environment. This state is not necessary for normal system operations; it is usually not used.

5
Stop the IRIX system and enter firmware mode.

6

Stop the IRIX system and reboot to the state defined by the initdefault entry in inittab.

a,b,c
Process only those inittab entries for which the run level is set to a, b, or c. These are pseudo-states that can be defined to run certain commands but do not cause the current run level to change.

Q,q
Re-examine inittab.

S,s
Enter single-user mode. When the system changes to this state as the result of a command, the terminal from which the command was executed becomes the system console.


SYSV
The following is from a SYSV text book, it's the generally used run level for SYSV systems.

0
Power-down state. Shuts machine down gracefully so that it can be turned off. Some models turn off automatically.

s
Single user state. This run level should be used when installing or removing software utilities, checking file systems, or using Maintenance (/install) file system. It is similar to run level 1; however, in run level s, multi-user file systems are unmounted and daemons are stopped. The terminal issuing the init s becomes the console.

1
Administrative state. In run level 1, file systems required for multi-user operations are mounted. And loggias requiring access to multi-user file systems can be used.

2
Multi-user state. File systems are mounted and normal user services are started.

3
Network File System (NFS) state. Prepares your system to use NFS.

4
User-defined

5
Virtually the same as System State 6. See /sbin/rc0 script for details. Early versions of UNIX used this as an entry to a firmware interface.

6
Power-down and reboot to the state defined by the initdefault entry in the /etc/inittab file.


Linux
0
Halt the system.

1
Single-user mode.

2-4
Multi-user modes. Usually identical. Level 2 or 3 is default (dependent on distro).

5
Multi-user with graphical environment. This applies to most (but not all) distros.

6
Reboot the system and return to default run level.


This page is © Phil Dibowitz 2001 - 2004