linux-command/command/man.md

47 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

man
===
查看Linux中的指令帮助
## 补充说明
**man命令** 是Linux下的帮助指令通过man指令可以查看Linux中的指令帮助、配置文件帮助和编程帮助等信息。
### 语法
```
man(选项)(参数)
```
### 选项
```
-a在所有的man帮助手册中搜索
-f等价于whatis指令显示给定关键字的简短描述信息
-P指定内容时使用分页程序
-M指定man手册搜索的路径。
```
### 参数
* 数字指定从哪本man手册中搜索帮助
* 关键字:指定要搜索帮助的关键字。
### 实例
我们输入`man ls`它会在最左上角显示“LS1在这里“LS”表示手册名称而“1”表示该手册位于第一节章同样我们输`man ifconfig`它会在最左上角显示“IFCONFIG8”。也可以这样输入命令“man [章节号] 手册名称”。
man是按照手册的章节号的顺序进行搜索的比如
```
man sleep
```
只会显示sleep命令的手册,如果想查看库函数sleep就要输入:
```
man 3 sleep
```
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->