关闭和启动系统

shutdown
OPTIONS
       -a     Use /etc/shutdown.allow.

       -t sec Tell  init(8)  to wait sec seconds between sending processes the
              warning and the kill signal, before  changing  to  another  run-
              level.

       -k     Don’t  really shutdown; only send the warning messages to every-
              body.

       -r     Reboot after shutdown. //关机后立即重启

       -h     Halt or poweroff after shutdown.//关机后不重新启动

       -H     Halt action is to halt or drop into boot monitor on systems that
              support it.

       -P     Halt action is to turn off the power.

       -n     [DEPRECATED]  Don’t  call  init(8)  to do the shutdown but do it
              ourself.  The use of this option is discouraged, and its results
              are not always what you’d expect. //快速关机,不经过init程序

       -f     Skip fsck on reboot.  //快速关机,重启时跳过fsck

       -F     Force fsck on reboot.

       -c     Cancel  an  already  running shutdown. With this option it is of
              course not possible to give the time argument, but you can enter
              a  explanatory  message on the command line that will be sent to
              all users.  //取消一个已经运行的shutdown
      time   When to shutdown.  //设定关机前的时间

例如;
 shutdown -h now //立即关闭系统
 shutdown -h 45  //45min 后关闭系统
 shutdown -r now "system will be reboot now!" //发出通告,并重新启动


Halt
//引发主机关机操作
OPTIONS
       -n     Don’t sync before reboot or halt. Note that the kernel and stor-
              age drivers may still sync.

       -w     Don’t actually reboot or halt but only write the wtmp record (in
              the /var/log/wtmp file).

       -d     Don’t write the wtmp record. The -n flag implies -d.

       -f     Force halt or reboot, don’t call shutdown(8).

       -i     Shut down all network interfaces just before halt or reboot.

       -h     Put  all  harddrives  on  the system in standby mode just before
              halt or poweroff.

       -p     When halting the system, do a poweroff. This is the default when
              halt is called as poweroff.

Reboot
//引发主机重启操作

Init
init 0 为关机
init 1 为重启


 

你可能感兴趣的:(系统)