ubuntu自動關機命令及ubuntu無法關機解決方案

來源:互聯網
上載者:User


ubuntu自動關機命令及ubuntu無法關機解決方案 我遇到這個問題了,經過N久搜尋終於找到解決方案了ubuntu自動關機命令      sudo shutdown +100 就表示電腦在100分鐘後關機。      如果你此時手動關機是沒用的,關機和重啟都會變成登出,可以用 sudo shutdown -c來取消自動關機的命令。  www.2cto.com   其它相關的命令:      -k 並不真正關機而只是發出警告資訊給所有使用者      -r 關機後立即重新啟動      -h 關機後不重新啟動      -f 快速關機重啟動時跳過fsck      -n 快速關機不經過init 程式      -h 12:00 在12點關機      -qP 100 100分鐘後退出啟動並執行程式關機 ubuntu 無法關機可能跟電源管理有關      修改配置,需要四步:1.開啟終端,輸入      sudo gedit /etc/modules      在檔案最後一行斷行符號,另起一行添加      apm power_off=1      儲存,關閉 2.在中端輸入      sudo gedit /etc/rc0.d/S90halt找到如下代碼:      hddown="-h"      if grep -qs '^md.*active'      /proc/mdstat      then      hddown=""      fi  www.2cto.com  和      netdown="-i"      if [ "$NETDOWN" = "no" ];       then      netdown=""      fi把這兩段代碼注釋掉,如下:      # hddown="-h"      # if grep -qs '^md.*active'      /proc/mdstat      # then      # hddown=""      # fi 和      # netdown="-i"      # if [ "$NETDOWN" = "no" ]; then      # netdown=""      # fi      儲存,退出3.在中端輸入:      sudo gedit /etc/default/grub找到  www.2cto.com        GRUB_CMDLINE_LINUX=""修改成:      GRUB_CMDLINE_LINUX="noacpi acpi=off acpi=force apm power_off=1"      儲存,退出再次在中端輸入:      sudo update-grub      然後重啟      好了,關機,試試看,不出意外的情況下,應該可以順利關機了  作者 shen1000

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.