man manual-page
— the manual page usually goes by the same name as the command whose documentation is sought. For example, to learn about the possible options for the cp
command, you would type the man cp
command at the shell prompt (see sidebar 基本知识 命令行解析器 - Shell).
read
command has the same name as the read
system call. This is why manual pages are organized in numbered sections:
/dev/
目录下);
read
的文档时,你可以键入man 2 read
。如果不指定具体的分类数字(section),系统则会从小到大获取第一个数字作为默认值。因此直接输入man shadow
的时候,系统就会返回 shadow(5)的文档内容,这是在分类页面1-4都没有shadow这个命令的手册页面所导致的。
apropos
来解决,这个命令能帮你查询手册页面的功能,或者简要的描述。每个手册页面都有一个单行的描述。apropos
返回手册页面请求的关键字列表。关键字选择得恰当,就能通过此工具很快得到结果。
例 7.1. 通过apropos
查找 cp
命令
$
apropos "copy file"
cp (1) - copy files and directories cpio (1) - copy files to and from archives hpcopy (1) - copy files from an HFS+ volume install (1) - copy files and set attributes ntfscp (8) - copy file to an NTFS volume.
man
command is not the only means of consulting the manual pages, since khelpcenter
and konqueror
(by KDE) and yelp
(under GNOME) programs also offer this possibility. There is also a web interface, provided by the man2html
package, which allows you to view manual pages in a web browser. On a computer where this package is installed, use this URL after following the instructions in /usr/share/doc/man2html/README.Debian
:
manpages.debian.org
service. It offers each manual page in multiple versions, one for each Debian release.
info
命令)却会使得查看文档变得复杂。更好的建议,是使用 pinfo
程序来替代默认的程序(使用 pinfo 的软件包)。
pinfo
命令的时候没有输入任何参数,它将会列出第一层所有有效的节点。通常来说,节点名称与命令的名称相对应。
pinfo
navigating between these nodes is easy to achieve with the arrow keys. Alternatively, you could also use a graphical browser, which is a lot more user-friendly. Again, konqueror
and yelp
work; the info2www
package also provides a web interface.
man
系统不一样。因此 info 总是以英文编写。然而,当你尝试用 pinfo
命令访问一个并不存在的info页面的时候,将会回退到同名的 man 页面(如果该页面存在),这时的页面有可能是被翻译了的。
README
文件,里面包含了有趣并且(或者)重要的信息。这些文档通常会被安装在/usr/share/doc/package/
目录(这里的 package 代表软件包的名字)。当文件特别巨大的情况下,这些文档不会包含在程序的主包当众,而是另外提供一个通常以 package-doc
的包名格式另外提供一个软件包。通过主包名称通常都能很快找到文档包。
/usr/share/doc/package/
directory also contains some files provided by Debian which complete the documentation by specifying the package's particularities or improvements compared to a traditional installation of the software. The README.Debian
file also indicates all of the adaptations that were made to comply with the Debian Policy. The changelog.Debian.gz
file allows the user to follow the modifications made to the package over time: it is very useful to try to understand what has changed between two installed versions that do not have the same behavior. Finally, there is sometimes a NEWS.Debian.gz
file which documents the major changes in the program that may directly concern the administrator (see 第 6.7.2 节 “处理升级后的问题”).
debian
来限制结果和目标的相关信息。
Homepage
field in the package's meta-information (apt show package
). Alternately, the package description may contain a link to the program's official website. If no URL is indicated, look at /usr/share/doc/package/copyright
. The Debian maintainer generally indicates in this file where they got the program's source code, and this is likely to be the website that you need to find. If at this stage your search is still unfruitful, consult a free software directory, such as FSF's Free Software Directory, or search directly with a search engine, such as Google, DuckDuckGo, Yahoo, etc.