Use apropos Command In Linux (Examples)

apropos command in Linux is basically useful for those who remember not any exact command but a few keywords related to the command which defines its functions. So, with the usage of apropos, the users can search the Linux man page with the provided keyword to find the right command and its functions.

Here comes the syntax the use apropos command in Linux

apropos [OPTION..] Keyword

According to Linux man page, the apropos command is described as:

Each manual page has a short description available within it. apropos
searches the descriptions for instances of keyword.

keyword is usually a regular expression, as if (-r) was used, or may
contain wildcards (-w), or match the exact keyword (-e). Using these
options, it may be necessary to quote the keyword or escape (\) the
special characters to stop the shell from interpreting them.

The standard matching rules allow matches to be made against the page
name and word boundaries in the description.

The database searched by apropos is updated by the mandb program.
Depending on your installation, this may be run by a periodic cron job,
or may need to be run manually after new manual pages have been

Options to use with apropos command in Linux

  • -d: used for emitting debugging messages. It brings actually man directories, path, path directory, warning, etc of each command that is related to provided keyword.
  • -v: used for printing verbose warning messages.
  • -e | -exact: used for searching each keyword for exact match. Means, it will look into man page and show you only those results which completely matches with the exact keyword.
  • -w | -wildcard: used when the provided keyword (s) include wildcards.
  • -a | -and: used when all the provided keywords are required to match. It will show actually nothing when one of the keywords has no matches found in man page.
  • -l | -long: used for trimming output to the terminal width.
  • -C: used for specifying a user configuration file and avoid to avoid using the default /manpath.
  • -L: defines the locale for apropos search.
  • -m | -systems: used for searching the man page description from other accessible operating system.
  • -M | -manpath: sets search path for man pages to PATH instead of default man path.
  • -s | -section | -sections: used for searching only particular section or sections separated by a colon.
  • -? | -help: displays the help information.
  • -V | -version: prints the version details.
  • -r | -regex: used for interpreting each keyword as a regular expression.

Examples to use apropos command in Linux

1: Displaying help information

apropos -?

2: Displaying version details

apropos -V