Well finally, I have started to use Solaris. Whenever I get different version of UNIX; I need to find out runlevel related information, as you may need to change runlevel for following causes:
- Halt/reboot system when shutdown command don’t work
- Troubleshooting or repairing system
The first thing I noticed was /etc/inittab file is different from the Linux version. However, runlevel are quite identical
Default 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
- 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
Solaris Find out runlevel
To find out current runlevel use who command:
$ who -r
. run-level 3 Mar 3 14:04 3 0 S
Solaris 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.
- Read man page of inittab and init for more information.
- There is also a nice program called runlevel for Solaris.
(Check out all of our posts on Solaris)TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!
- 30 Cool Open Source Software I Discovered in 2013
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop