Linux 万能的帮助命令 man help info

本文介绍了Linux系统中用于获取命令帮助的三种主要方式:man、help和info。man命令提供了详细的命令手册,分为9个章节,每个章节对应不同类型的文档。help是shell内置命令的帮助,适用于内部命令。info命令提供更详尽的文档,是对help的补充。通过熟练使用这些帮助系统,用户可以更高效地学习和使用Linux命令。
摘要由CSDN通过智能技术生成

之前对linux操作的一些操作和管理命令,那么这些命令有什么功能,这就需要帮助命令了。

 

 

万能的帮助命令


为什么要学习帮助命令
man 帮助
help 帮助
info 帮助
使用网络资源(搜索引擎和官方文档)

 

 

 

为什么要学习帮助命令


  •  Linux 的基本操作方式是命令行
  • 海量的命令不适合“死记硬背”
  • 你要升级你的大脑

 

 

man 帮助


man 是 manual 的缩写

man 帮助用法演示
NAME
       ls - list directory contents

SYNOPSIS
       ls [OPTION]... [FILE]...

DESCRIPTION
       List  information about the FILEs (the current directory by default).  Sort entries alphabetically if none of -cftuvSUX nor --sort is
       specified.

       Mandatory arguments to long options are mandatory for short options too.

       -a, --all
              do not ignore entries starting with .

       -A, --almost-all
              do not list implied . and ..

       --author
              with -l, print the author of each file

       -b, --escape
              print C-style escapes for nongraphic characters


//可以查看到其功能  ls - list directory contents  列出目录里面的内容
//所有选项的内容在下面全部列出来了
//q可以退出命令行的终端

man 也是一条命令,分为 9 章,可以使用 man 命令获得 man 的帮助(可以获取不同篇章的帮助)

如果想要活得ls第一章的帮助就是使用man 1 ls,在使用的时候往往可以将1进行省略。

       The table below shows the section numbers of the manual followed by the types of pages they contain.

       1   Executable programs or shell commands
       2   System calls (functions provided by the kernel)
       3   Library calls (functions within program libraries)
       4   Special files (usually found in /dev)
       5   File formats and conventions eg /etc/passwd
       6   Games
       7   Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)
       8   System administration commands (usually only for root)
       9   Kernel routines [Non standard]


//man命令的第二章系统调用(必须由内核完成的功能),第三章是库调用(大多数libc函数,如qsort())

 

help 帮助


  • shell(命令解释器)自带的命令称为内部命令,其他的是外部命令
[root@docker ~]# type cd
cd is a shell builtin
  •  内部命令使用 help 帮助
  • # help cd
  • 外部命令使用help帮助
  • # ls --help

 

 

 

info 帮助


info 帮助比 help 更详细,作为 help 的补充
# info ls
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值