關機重啟即登出命令

2022-02-15 05:51:52 字數 1019 閱讀 1717

關機重啟及登出命令

#更新時間

[root@clf ~]# yum install  -y  ntpdate

[root@clf ~]# ntpdate  ntp.aliyun.com

#關機[root@clf ~]# shutdown -h  10  #10分鐘之後關機 

[root@clf ~]# shutdown  -h  now  #立刻關機

[root@clf ~]# shutdown  -h  0  #立刻關機

[root@clf ~]# shutdown  -h  11:00 #定時關機

[root@clf ~]# poweroff    #立刻關機 

[root@clf ~]# halt -p    #立刻關機

[root@clf ~]# init 0  #立刻關機    通過系統的執行級別 

#重啟

[root@clf ~]# shutdown  -r   10  #10分鐘之後進行重啟

[root@clf ~]# shutdown  -r   0  #立刻重啟

[root@clf ~]# shutdown  -r   now #立刻重啟

[root@clf ~]# shutdown  -r   11:00 #定時重啟

[root@clf ~]# reboot   #重啟 

#登出   退出當前登入的使用者

[root@clf ~]# logout  #退出當前登入的使用者   只能退出登入式shell,不能退出非登入式shell

ctrl鍵 +  d  #快捷鍵   退出當前登入的使用者

[root@clf ~]# exit   #退出當前登入的使用者   既能退出登入式也能退出非登入式   主要用於指令碼退出

[root@clf ~]# bash

[root@clf ~]# logout

bash: logout: not login shell: use `exit'

[root@clf ~]# exit

exit

Ubuntu linux 關機 重啟 登出 命令

1關機命令 shutdown 好像ubuntu的終端中預設的是當前使用者的命令,只是普通使用者,因此在終端器中可以使用sudo sh 轉換到管理員root使用者下執行命令。1 shutdown help 可以檢視shutdown命令如何使用,當然也可以使用man shutdown命令。2 shutd...

Ubuntu 關機 重啟 登出 命令

1關機命令 shutdown 好像ubuntu的終端中預設的是當前使用者的命令,只是普通使用者,因此在終端器中可以使用sudo sh 轉換到管理員root使用者下執行命令。1 shutdown help 可以檢視shutdown命令如何使用,當然也可以使用man shutdown命令。2 shutd...

ubuntu 關機,重啟,登出命令

1關機命令 shutdown 好像ubuntu的終端中預設的是當前使用者的命令,只是普通使用者,因此在終端器中可以使用sudo sh 轉換到管理員root使用者下執行命令。1 shutdown help 可以檢視shutdown命令如何使用,當然也可以使用man shutdown命令。2 shutd...