You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
805 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

halt
===
关闭正在运行的Linux操作系统
## 补充说明
**halt命令** 用来关闭正在运行的Linux操作系统。halt命令会先检测系统的runlevel若runlevel为0或6则关闭系统否则即调用shutdown来关闭系统。
### 语法
```
halt(选项)
```
### 选项
```
-d不要在wtmp中记录
-f不论目前的runlevel为何不调用shutdown即强制关闭系统
-i在halt之前关闭全部的网络界面
-nhalt前不用先执行sync
-phalt之后执行poweroff
-w仅在wtmp中记录而不实际结束系统。
```
### 实例
```
halt -p //关闭系统后关闭电源。
halt -d //关闭系统,但不留下纪录。
```
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->