Apropos (Unix)


In computing, apropos is a command to search the man page files in Unix and Unix-like operating systems. Apropos takes its name from the French "à propos" which means about. It is particularly useful when searching for commands without knowing their exact names.

Behavior

Often a wrapper for the man -k command, the apropos command is used to search the "name" sections of all manual pages for the string/s specified. The output is a list of all manual pages containing the search term in their name or description. This is often useful if one knows the action that is desired, but does not remember the exact command or page name. apropos search is case insensitive.
apropos usually searches in a precompiled database that is shared with whatis, a command for obtaining the brief description of a specific command whose exact name is already known.

Sample usage

The following example demonstrates the output of the apropos command:

$ apropos mount
free - Display amount of free and used memory in the system
mklost+found - create a lost+found directory on a mounted Linux second extended file system
mount - mount a file system
mountpoint - see if a directory is a mountpoint
ntfsmount - Read/Write userspace NTFS driver.
sleep - delay for a specified amount of time
switch_root - switch to another filesystem as the root of the mount tree.
umount - unmount file systems

In this example, apropos is used to search for the keyword "mount", and apropos returns the indicated man pages that include the term "mount".
The following example demonstrates the output of the apropos command with an regexp keyword and a regular keyword:

$ apropos abc.n xzless
XTestGrabControl - XTest extension functions
xzless - view xz or lzma compressed files

In this example, apropos is used to search for the keywords "abc.n" and xzless, and apropos returns the indicated man pages that include the keywords.

Related utilities

whatis is a command for obtaining the brief description of a specific command whose exact name is already known. It uses the same database as apropos does. On systems with mandoc, it is a wrapper for apropos -f.

$ whatis whatis
whatis - search the whatis database for complete words

makewhatis is a command for indexing all on-disk manuals into a databse that apropos and whatis can read from. It first appeared in the 2BSD of 1979, but has since been rewritten multiple times in different implementations of man. mandb is a command that performs the same function in man-db.
The database is traditionally plain text, but man-db, the implementation found on many Linux distributions, use a Berkeley DB instead. The mandoc implemation used on many BSD distributions likewise has its own innovations on the format.