云缝的拼音:Linux安装Man Page

来源:百度文库 编辑:中财网 时间:2024/04/28 04:23:52

好兴奋啊,今天终于可以用man来查看函数了,这个问题已经困扰了我好久好久了,花了不少功夫,为了解决这个问题,还特意加了linux 开发QQ群,结果也没有解决这个问题。

那么怎么来安装呢?其实非常简单(其实好多问题,就是有那么一心半点的技巧或者信息不知道,知道了,做起来非常简单,也许几分钟就搞定,但是可能之前花了几百个小时)。

先下载man page,这里提供一个我使用的连接:

http://www.kernel.org/pub/linux/docs/man-pages/man-pages-3.26.tar.bz2

或者google搜索download man page。注意用英文的搜索配置。

这个包里面包含了man通用的1-8章节的内容。

下载后用如下的命令的解压:

tar -jxvf man-pages-3.26.tar.bz2

然后

cd man-pages-3.26

接下来就是实际的安装过程了:

sudo make install

这个命令是把man安装到/user/man目录下面的,www.linuxidc.com如果你对其提供的makefile感兴趣的话,可以vi Makefile自己查看。这样就已经成功的安装了man。测试一下先: man pthread_create

是不是看到相关的内容了。

或者你也可以不安装,直接该压缩包所在的路径加到MANPATH环境变量中,假设压缩包所在的目录是/home/man

exprot MANPATH=/home/man:MANPATH

或者直接将这个命令加到~/.profile中或者~/.bashrc。如果想让所有的用户都可以使用这个man包里面的内容,你也可以将这个命令加到

/etc/bashrc中,这样每个用户登录的时候都会执行这句命令了



The Linux man-pages project

The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs. It provides manual pages in the following sections:

  • 2: System calls, documenting the system calls provided by the Linux kernel.
  • 3: Library functions, documenting the functions provided by the standard C library (with particular focus on glibc, the GNU C library).
  • 4: Devices, which documents details of various devices, most of which reside in /dev.
  • 5: Files, which describes various file formats, and includes proc(5), which documents the /proc file system.
  • 7: Overviews, conventions, and miscellaneous.
(Note that many of the man pages on a Linux system, especially those in sections other than 2 and 3, come from other packages.)

For information on downloading the latest version of man-pages, look here.

You can browse the manual pages online here.

If you find a bug in a man page, then please report it.

If you want to contribute to work on man-pages, have a look here.

For a list of changes in various man-pages releases, see the changelog.

For information about translations of man-pages, take a look here.

The man-pages maintainer is Michael Kerrisk (mtk in the changelog; mtk.manpages-AT-gmail.com; blog).