halt 可安全停止 關閉 重啓計算機。
Linux 係統後颱通常運行著許多進程, 強製直接關閉計算機電源可能導緻進程數據丟失, 使係統處於不穩定狀態 (甚至損壞硬件設備)。
另請參閱: init poweroff reboot shutdown
halt --reboot
基本語法
halt [OPTIONS...]
OPTIONS 選項
| 參數 | EN 解釋 | 中文翻譯 | 備注 |
|---|---|---|---|
| --help | Show this help | 展示相關幫助信息 | |
| --halt | Halt the machine | 停止機器 | |
| -p --poweroff | Switch off the machine | 關閉機器 | |
| --reboot | Reboot the machine | 重新啓動機器 | |
| -f --force | Force immediate halt/power-off/reboot | 強製立即停止/關機/重啓 | |
| -w --wtmp-only | Don't halt/power-off/reboot, just write wtmp record | 不要停止/關機/重啓,隻寫 wtmp 記錄 | |
| -d --no-wtmp | Don't write wtmp record | 不要寫 wtmp 記錄 | |
| --no-wall | Don't send wall message before halt/power-off/reboot | 在停止/關機/重啓前,不發送牆消息 |
| 功能 | 命令 | 文字解釋 | 示例 | 示例解釋 |
|---|---|---|---|---|
| 幫助 | halt --help | 展示幫助信息 | ||
| 重啓 | halt --reboot | 重啓計算機 | ||
| 停止 | halt --halt | 保持電源僅停止計算機 |
版權聲明: 本文為獨傢原創稿件,版權歸 樂數軟件 ,未經許可不得轉載。