有三种在线文档,可供你查阅。
man ----传统文档
info ----GNU Project 通常会使用这种文档
/usr/share/doc 大部分的软件包会在这里安装README文件,文档或者例子等,如果你在以上两个文档中都找不到,就到这里试试看。
看man手册页和info手册页的命令分别是man和info,不过推荐用系统自带的帮助文档查看工具来查看,在Ubuntu下是是yelp,可以在系统菜单下找到,它提供了一个网页的格式,使我们看着更舒适,习惯。
Ubuntu下man手册默认不全,可安装manpages-dev包:
sudo apt-get install manpages-dev
然后就OK了。
另外,以下两个命令可以在man手册页中搜索关键词
apropos 模糊匹配
whatis 完全匹配
键入whatis man和apropos man,你将发现二者的区别。
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 conven‐
tions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
如上所示,man将不同的内容组织在不同的页里,有些页中文档的名字是一样的,而默认是1到9
也就是说如果2和3中都有open的手册页,你输入
man open
只能看到第二页的内容,而也许实际你想查阅的是3的内容,这时,可以如下输入;
man 3 open
除了在机器上的在线手册外,GNU官网提供了更全面的文档,遇到GNU工具问题可以去GNU官网(www.gnu.org )查,它的搜索系统很强大,我有一次输入-Wstrict-prototypes(一个gcc的选项),系统就搜索到了GNU手册页上任何有这个选项的页面,太方便了。如果碰到不清楚的,而在线手册又不好查的,就到GNU上查吧。
Linux下的在线帮助文档
最新推荐文章于 2024-01-30 10:26:17 发布