man 在 linux 中如何工作?

man 在 linux 中如何工作?

当我们man std::vector如何/在哪里内部搜索相应的文档?

答案1

man(1)手册页中:

SEARCH PATH FOR MANUAL PAGES
   man uses a sophisticated method of finding manual page files, based  on
   the  invocation  options and environment variables, the /etc/man.config
   configuration file, and some built in conventions and heuristics.

   First of all, when the name argument to man contains a slash  (/),  man
   assumes  it  is  a file specification itself, and there is no searching
   involved.

   But in the normal case where name doesn’t contain a slash, man searches
   a variety of directories for a file that could be a manual page for the
   topic named.

不过,里面还有很多文字。我让你在闲暇时阅读。

相关内容