linuxでのシャットダウン再起動コマンド

1427 ワード

shutdown
説明する
      

構文
shutdown [  ]   
    -c          
    -h   
    -r   

#       
shutdown -h now

#     
shutdown -h 20:30

#       
shutdown -r now

その他のシャットダウンコマンド
halt
poweroff
init 0

その他の再起動コマンド
reboot
init 6

システム実行レベル
0     
1      (       ,     ,  windows    )
2         ,  NFS(network file system)  
3        
4      
5       
6     

実行レベルの表示方法
cat /etc/inittab
   centos7        ,  targets  

[root@izm5e2q95pbpe1hh0kkwoiz ~]# cat /etc/inittab
# inittab is no longer used when using systemd.
#
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target
#
# systemd uses 'targets' instead of runlevels. By default, there are two main targets:
#
# multi-user.target: analogous to runlevel 3
# graphical.target: analogous to runlevel 5
#
# To view current default target, run:
# systemctl get-default
#
# To set a default target, run:
# systemctl set-default TARGET.target



#       
systemctl get-default

[root@izm5e2q95pbpe1hh0kkwoiz ~]# systemctl get-default
multi-user.target

# multi-user.target: analogous to runlevel 3
# graphical.target: analogous to runlevel 5

logout
説明する