Let’s first take a look at Run levels.
Linux Run Levels
| ID | Name | Description |
| 0 | Halt | No activity, System can be safely shut down. |
| 1 | Single-user mode | For administrative tasks only. Rarely used. |
| 2 | Multi-user mode | Multiple users but no NFS (Network File System). |
| 3 | Multi-user mode with networking | Multiple user but command line mode only. |
| 4 | Not used/user-definable | For special purposes. User definable. |
| 5 | Start the system normally with appropriate display manager (with GUI) | It’s similar to run level 3 but with GUI display. |
| 6 | Reboot | Reboots the system. |
| ID | Name | Description |
| 0 | Power-down state | Power down state(OBP level after POST). Will bring server to OK prompt for maintenance. |
| s or S | Single-user state | To run as a single user with all file systems mounted and accessible. Only root user is allowed login. |
| 1 | Single User – Administrative state | To access all available file systems with user logins allowed. |
| 2 | Multi-user mode | Multiple users but no NFS(Network File System). i.e. all daemons running except NFS daemon. |
| 3 | Multi-user mode with networking | All daemons running including NFS with GUI. |
| 4 | Not used/user-definable | For special purposes. User definable. |
| 5 | Power-off | Shutdown gracefully. Difference from Level 0 is that you won’t get any OBP (OK) prompt in Level 5 |
| 6 | Reboot | Reboots the system. |
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 -rAbove command will tell you the current level of your system.
No comments:
Post a Comment