mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-08 23:14:06 +08:00
34 lines
2.1 KiB
HTML
34 lines
2.1 KiB
HTML
<h1 id="man">man</h1>
|
||
<p>查看Linux中的指令帮助</p>
|
||
<h2 id="补充说明">补充说明</h2>
|
||
<p><strong>man命令</strong> 是Linux下的帮助指令,通过man指令可以查看Linux中的指令帮助、配置文件帮助和编程帮助等信息。</p>
|
||
<h3 id="语法">语法</h3>
|
||
<pre><code class="language-bash">man(选项)(参数)</code></pre>
|
||
<h3 id="选项">选项</h3>
|
||
<pre><code class="language-bash">-a:在所有的man帮助手册中搜索;
|
||
-f:等价于whatis指令,显示给定关键字的简短描述信息;
|
||
-P:指定内容时使用分页程序;
|
||
-M:指定man手册搜索的路径。</code></pre>
|
||
<h3 id="参数">参数</h3>
|
||
<ul>
|
||
<li>数字:指定从哪本man手册中搜索帮助;</li>
|
||
<li>关键字:指定要搜索帮助的关键字。</li>
|
||
</ul>
|
||
<h3 id="数字代表内容">数字代表内容</h3>
|
||
<pre><code class="language-bash">1:用户在shell环境可操作的命令或执行文件;
|
||
2:系统内核可调用的函数与工具等
|
||
3:一些常用的函数(function)与函数库(library),大部分为C的函数库(libc)
|
||
4:设备文件说明,通常在/dev下的文件
|
||
5:配置文件或某些文件格式
|
||
6:游戏(games)
|
||
7:惯例与协议等,如Linux文件系统,网络协议,ASCII code等说明
|
||
8:系统管理员可用的管理命令
|
||
9:跟kernel有关的文件</code></pre>
|
||
<h3 id="实例">实例</h3>
|
||
<p>我们输入<code>man ls</code>,它会在最左上角显示“LS(1)”,在这里,“LS”表示手册名称,而“(1)”表示该手册位于第一节章,同样,我们输<code>man ifconfig</code>它会在最左上角显示“IFCONFIG(8)”。也可以这样输入命令:“man [章节号] 手册名称”。</p>
|
||
<p>man是按照手册的章节号的顺序进行搜索的,比如:</p>
|
||
<pre><code class="language-bash">man sleep</code></pre>
|
||
<p>只会显示sleep命令的手册,如果想查看库函数sleep,就要输入:</p>
|
||
<pre><code class="language-bash">man 3 sleep</code></pre>
|
||
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ -->
|