[[Email protected] ~] # shutdown [options] Time option:-C:Cancel Shutdown Command - H:turn off the machineHalt - R: Restartreboot
Example: # shutdown-h now shut down now . # shutdown- H20;30 Timer shutdown # shutdown-c Cancel ShutdownNote: Only reboots on the server cannot be turned off, the shutdown command suggests using shutdown.
Other shutdown commands: [[email protected] ~]# halt[[email protected] ~]# PoweroffDirect Power off[[Email protected] ~]# init 0
Other restart commands [[email protected] ~]# reboot[[email protected] ~]# Init 6
system Run Level0 turn off the machine1 Single User (f8,windows security mode, root user)2 not fully multi-user, without NFS service (network file systerm)3 full multi-user4 Not assigned5 graphical Interface (X11)6 Restart
[email protected] ~]# VI/etc/inittab#修改系统默认运行级别
Id:3:initdefault: (Be careful not to easily modify, carefully do not delete ":", modified 0 and 6 cannot be the default
)
[email protected] ~]# RunLevel#查询系统运行级别
[[email protected] ~]# Init 3#切换运行级别
[[email protected] ~]# logout# Exit login command
[[email protected] ~]# runlevel
N 3(N(none),表示是直接启动,其前面没有切换过运行级别,和下边的3 3有区别)
[[email protected] ~]# init 3
[[email protected] ~]# runlevel
3 3
From for notes (Wiz)
Basic use of the command line (shutdown restart)