Linux - Man帮助

Linux - Man帮助 首页 / Linux入门教程 / Linux - Man帮助

所有的Unix命令都带有许多参数选项,记住这些参数可能有点困难,Unix的 Manpage Help 称为手册页(Man Page)。如果有命令名称,但您不确定如何使用它,则手册页会帮助您完成所有步骤。

Help - 语法

这是一个简单的命令,可帮助您在使用系统时获取任何Unix命令的详细信息-

$man command

Help - 示例

假设有一条命令需要您获得帮助;假设您想了解 pwd ,那么您只需要使用以下命令-

$man pwd

PWD(1)                    BSD General Commands Manual                   PWD(1)


NAME

     pwd -- return working directory name


SYNOPSIS

     pwd [-L | -P]


DESCRIPTION

     The pwd utility writes the absolute pathname of the current working

     directory to the standard output.


     Some shells may provide a builtin pwd command which is similar or identi-

     cal to this utility.  Consult the builtin(1) manual page.


     The options are as follows:


     -L      Display the logical current working directory.


     -P      Display the physical current working directory (all symbolic

             links resolved).

上面的命令可帮助您了解有关 pwd 命令的完整信息。在命令提示符处尝试一下,以获取更多详细信息。

您可以使用以下命令获取 man 命令本身的完整详细信息-

$man man

man(1)                                                                  man(1)


NAME

       man - format and display the on-line manual pages


SYNOPSIS

       man  [-acdfFhkKtwW]  [--path]  [-m system] [-p string] [-C config_file]

       [-M pathlist] [-P pager] [-B browser] [-H htmlpager] [-S  section_list]

       [section] name ...


DESCRIPTION

       man formats and displays the on-line manual pages.  If you specify sec-

       tion, man only looks in that section of the manual.  name  is  normally

       the  name of the manual page, which is typically the name of a command,

       function, or file.  However, if name contains  a  slash  (/)  then  man

       interprets  it  as a file specification, so that you can do man ./foo.5

       or even man /cd/foo/bar.1.gz.


       See below for a description of where man  looks  for  the  manual  page

       files.


MANUAL SECTIONS

       The standard sections of the manual include:

Manpage Help - 部分

手册页通常分为几部分,通常随手册页作者的喜好而有所不同。下表列出了一些常见的部分-

Sr.No.Section & 描述
1

NAME

命令名称

2

SYNOPSIS

命令的一般用法参数

3

DESCRIPTION

描述命令的作用

4

OPTIONS

描述命令的所有参数或选项

5

SEE_ALSO

无涯教程网

在手册页中列出与该命令直接相关或与其功能非常相似的其他命令

6

BUGS

解释命令或其输出中存在的任何已知问题或错误

7

EXAMPLES

常见用法示例,使读者了解如何使用该命令

8

AUTHORS

手册页/命令的作者

祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)

技术教程推荐

AI技术内参 -〔洪亮劼〕

Vue开发实战 -〔唐金州〕

从0开始做增长 -〔刘津〕

安全攻防技能30讲 -〔何为舟〕

跟月影学可视化 -〔月影〕

乔新亮的CTO成长复盘 -〔乔新亮〕

朱涛 · Kotlin编程第一课 -〔朱涛〕

eBPF核心技术与实战 -〔倪朋飞〕

Kubernetes入门实战课 -〔罗剑锋〕

好记忆不如烂笔头。留下您的足迹吧 :)