Friday, 26 April 2013

Different RUN levels in Linux,Solaris,HPUX and AIX

RedHat Linux - Run Levels:

0: Halt
1: Single user mode
2: Multiuser, without NFS
3: Full multiuser mode
4: Unused
5: X11
6: Reboot

Solaris - Run Level

S: Single user state (useful for recovery)
0: Access Sun Firmware ( ok> prompt)
1: System administrator mode
2: Multi-user w/o NFS
3: Multi-user with NFS ( default run level)
4: Unused
5: Completely shutdown the host (like performing a power-off @ OBP) [ thanks to Marco ]
6: Reboot but depend upon initdefault entry in /etc/inittab

AIX - Run Levels

0-1: Reserved for future use
2: Multiuser mode with NFS resources shared (default run level)
3-9: Defined according to the user's preferences
m,M,s,S: Single-user mode (maintenance level)
a,b,c: Starts processes assigned to the new run levels while leaving the existing processes at the current level running
Q,q: init command to reexamine the /etc/inittab file


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

Command to see Run level:-

$ who -r
. run-level 3 Mar 3 14:04 3 0 S
Solaris/Linux changing runlevels after bootup
You need to use init command, for example change runlevel to 2.
# /sbin/init 2
Solaris changing the default runlevel
An entry with initdefault (in /etc/inittab file) is scanned only when init is initially invoked. init uses this entry to determine which run level to enter initially.
Open /etc/inittab file:
# vi /etc/inittab

Find out this entry:
Change is:3 to number you want, don't use S, 0, 6 ;). Save file.

0 blogger-disqus:

Post a Comment