Showing posts with label runlevel in linux. Show all posts
Showing posts with label runlevel in linux. Show all posts

Solved : Comparing Run Levels in Linux and Solaris and precautions withthem

Many people get confused between run levels in Linux and Solaris. One major difference among these can be disastrous also.  In this post we will show you the different Run levels in both these OS and what precautions you should take while working on these.
Let’s first take a look at Run levels.
Linux Run Levels
IDNameDescription
0HaltNo activity, System can be safely shut down.
1Single-user modeFor administrative tasks only. Rarely used.
2Multi-user modeMultiple users but no NFS (Network File System).
3Multi-user mode with networkingMultiple user but command line mode only.
4Not used/user-definableFor special purposes. User definable.
5Start the system normally with appropriate display manager (with GUI)It’s similar to run level 3 but with GUI display.
6RebootReboots the system.
Solaris Run levels
IDNameDescription
0Power-down statePower down state(OBP level after POST). Will bring server to OK prompt for maintenance.
s or SSingle-user stateTo run as a single user with all file systems mounted and accessible. Only root user is allowed login.
1Single User – Administrative stateTo access all available file systems with user logins allowed.
2Multi-user modeMultiple users but no NFS(Network File System). i.e. all daemons running except NFS daemon.
3Multi-user mode with networkingAll daemons running including NFS with GUI.
4Not used/user-definableFor special purposes. User definable.
5Power-offShutdown gracefully. Difference from Level 0 is that you won’t get any OBP (OK) prompt in Level 5
6RebootReboots the system.
Precaution
Not sure if you have noticed but there is major difference in Run Level 5 of both the OS. For Linux, run level 5 means multi user with GUI, all good. But for Solaris, run level 5 means power-off, ouch! . Many Linux admins who start working on Solaris makes the mistake of executing “init 5” on Solaris to get the GUI but, that actually brings down a Solaris server. Hope you never make this mistake on production box.
Check current run level
who -r
Above command will tell  you the current level of your system.