APROPOS(1) General Commands Manual APROPOS(1)

apropos
search the complete content of all man pages

apropos [-123456789hilMmPpr] [-C path] [-n results] [-S machine] [-s section] query

The apropos utility performs a full text search over the complete content of all man pages. It uses the FTS engine of SQLite to perform the search. The database is created with the help of the makemandb(8) utility.

This implementation of the apropos utility is more sophisticated than the classical version. Like modern search applications, it uses advanced techniques like stemming and term weighting to rank the matching results in decreasing order of relevance.

Quotes are optional for specifying multiword queries.

It supports the following options:

, ..., -9
Limit the search to the specified section of the manual. By default, pages from all sections are shown. These options are abbreviations for the -s option for single digit sections.
path
Use different man(1) configuration file than the default, /etc/man.conf.
Turn on html formatting.
Turn on terminal escape code formatting.
Legacy mode: Only searches name and name description. Does not print context and turns off formatting.
Do not show the context of the match.
Show the context of the match (default).
results
Output up to the specified number of search results. The default limit is infinity.
Turn on pager formatting.
Turn on pager formatting, and pipe the results through a pager (defaulting to more(1)).
Turn off formatting.
machine
Limit the search to the pages for the specified machine architecture. By default pages for all architectures are shown in the search results.
section
Limit the search to the specified section of the manual. By default, pages from all sections are shown. For single digit sections you can use abbreviations: -1, ..., -9.

/etc/man.conf
The location of the SQLite FTS database can be configured using the _mandb tag.

This environment variable is white-space tokenized as an argument vector and the options in it are parsed and set. Command line options override the environment options.
The pagination command used for writing the output, should this be requested. If the PAGER environment variable is null or not set, the standard pagination program more(1) will be used.

man(1), whatis(1), man.conf(5), makemandb(8)

The apropos command appeared in 3BSD. It was rewritten in NetBSD 6.0 to support full text search using SQLite.

Abhinav Upadhyay
May 17, 2022 NetBSD 9.4