Run Levels for Various Unices

From Wikipedia Page, The term runlevel refers to a mode of operation in one of the computer operating systems that implement Unix System V-style initialization. Conventionally, seven runlevels exist, numbered from zero to six; though up to ten, from zero to nine, may be used. S is sometimes used as a synonym for one of the levels.

In standard practice, when a computer enters runlevel zero, it halts, and when it enters runlevel six, it reboots. The intermediate runlevels (1-5) differ in terms of which drives are mounted, and which network services are started. Lower run levels are useful for maintenance or emergency repairs, since they usually don’t offer any network services at all. The particular details of runlevel configuration differ widely among operating systems, and slightly among system administrators.

The runlevel system replaced the traditional /etc/rc script used in Version 7 Unix.

Run Levels in 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.

Run Levels in 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.

Run Levels in 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.

Run Levels in 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

Run Levels in 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.

Run Levels in 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.

Run Levels in 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.

2 responses to “Run Levels for Various Unices

  1. Aziz…

    Tau cara configure supaya service NIC up duluan baru kemudian service LVM di Centos 5.1 ga..??
    Hehehehe..
    Thx fren. bantu cariin ya :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s