Restart the test server using the command: shutdownnow (forgot to add-h) causes automatic restart and enters single-user mode. view the current system mode command: runlevelCentos system: [root @ fisheye ~] # Runlevel
Restart the test server using the command: shutdown now (forgot to add-h) causes automatic restart and enters single-user mode. view the current system mode command: runlevel
Centos system:
| |
[Root @ fisheye ~] # Runlevel N 3 |
The RedHat series has seven runlevels)
Running Level 0: The system is down. The default running level cannot be set to 0. Otherwise, the system cannot start normally.
Running Level 1: Single-user working status, root permission, used for system maintenance, remote login prohibited
Running Level 2: Multi-user status (no NFS)
Running Level 3: full multi-user status (with NFS). log on to the console and go to the command line mode.
Operation Level 4: The system is not used and retained
Running Level 5: X11 console. log on to the GUI
Running level 6: The system is shut down and restarted normally. the default running level cannot be set to 6. Otherwise, the system cannot start normally.
The default runlevel of Ubuntu is 2.
| |
Yong @ test2 :~ $ Runlevel N 2 |
Debian (ubuntu is based on debian) Linux has always been started with runlevel 2 by default, and the runlevel definition is different from redhat. The runlevel of debian is defined as follows:
0-Halt, shutdown mode
1-Single, Single-user mode
2-Full multi-user with display manager (GUI)
3-Full multi-user with display manager (GUI)
4-Full multi-user with display manager (GUI)
5-Full multi-user with display manager (GUI)
6-Reboot, restart
2 ~ There is no difference in level 5. They are in multi-user mode, which is different from general linux.