Makewhatis

From LQWiki
Jump to: navigation, search

Makewhatis is an administrator command for creating and maintaining the whatis database, which is used by the whatis and apropos user commands. It must be run as root. In a newly installed system, makewhatis needs to be run by the system administrator unless the installer scripts have run it already. Until the whatis database exists, the whatis and apropos commands will yield no results.

The database is stored as an ASCII file with very long lines in the toplevel directory of the man system. Traditionally this was /usr/man but most modern distributions store man pages under /usr/share/man, so that the whatis database will be at /usr/share/man/whatis.

If the system contains man pages in different languages, makewhatis will use the language specified by the current locale to determine which pages to include in the database.

If the system contains more than one set of man pages (for example system man pages under /usr/share/man and man pages for locally installed software packages under /usr/local/share/man), it is possible to index the desired set by using the toplevel directory as an argument. Otherwise makewhatis will simply index all directory trees listed in /etc/man.conf.