linux 命令和教程补充

This commit is contained in:
estomm
2021-12-24 11:16:28 +08:00
parent 40e916976b
commit b7c3653392
586 changed files with 46455 additions and 39 deletions

34
Linux/command/halt.md Normal file
View File

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