APROPOS(1)

๐Ÿ“ฆ
version 2.13.1 ยท 3 versions
, in fedora 43, fedora 44

๐Ÿ’– APROPOS(1) ๐Ÿ’–

Manual pager utils ๐ŸŽ€


๐Ÿ“œ NAME

okay so apropos is the search bar for manual page names and descriptions ๐Ÿ”โœจ literally type a keyword and it digs through the short blurbs for you ๐Ÿ’…

๐ŸŽฏ SYNOPSIS

apropos [-dalv?V] [-e|-w|-r] [-s list] [-m system[,...]] [-M path] [-L
locale] [-C file] keyword ...

๐ŸŒธ DESCRIPTION

every manual page has a short description tucked inside it ๐Ÿฅน apropos goes through those descriptions looking for instances of keyword ๐Ÿ”Ž

keyword is usually a regular expression, same as if you pass -r ๐Ÿค“ or you can make it a wildcard with -w, or demand an exact match with -e ๐Ÿฆ‹ with these options you might need to quote the keyword or escape (\) the special characters so your shell doesn't get in the way ๐Ÿ™„

the standard matching rules let matches happen against the page name and against word boundaries in the description ๐Ÿ’œ

heads up bestie: the database apropos searches gets updated by the mandb program โš ๏ธ depending on your setup, a periodic cron job might handle that for you, or you might have to run it yourself after installing new manual pages ๐Ÿซถ

โœจ OPTIONS โœจ

  • -d, --debug โ€” prints debugging info ๐Ÿ›
  • -v, --verbose โ€” prints verbose warning messages ๐Ÿ“ข
  • -r, --regex โ€” treats each keyword as a regular expression, and this is the default vibe ๐Ÿ‘‘ each keyword gets matched against page names and descriptions separately ๐ŸŒˆ it can match any part of either one, and it doesn't have to stick to word boundaries ๐Ÿ’…
  • -w, --wildcard โ€” treats each keyword as a pattern with shell style wildcards ๐Ÿƒ each keyword gets matched against page names and descriptions separately ๐Ÿซง if --exact is also in the mix, only an expanded keyword that matches a whole description or whole page name counts โœ… otherwise the keyword is also allowed to match on word boundaries in the description ๐Ÿ“
  • -e, --exact โ€” each keyword has to be an exact match against page names and descriptions ๐ŸŽฏ
  • -a, --and โ€” only shows items that match all the keywords you gave it ๐Ÿงš the default is to show items that match any keyword ๐ŸŒธ
  • -l, --long โ€” doesn't trim the output to your terminal width ๐Ÿ“ normally the output gets cut down to fit so poorly written NAME sections don't look ugly ๐Ÿ™ˆ
  • -s list, --sections=list, --section=list โ€” only searches the sections you name ๐Ÿ“š list is a colon- or comma-separated list of sections ๐Ÿง a plain section like 3 will show pages in sections 3, 3perl, 3x, and so on ๐ŸŒท but if you add an extension like 3perl, the list only includes pages from that exact part of the section ๐Ÿ’œ
  • -m system[,...], --systems=system[,...] โ€” if your system can peek at other operating systems' manual page descriptions, you can search them with this one ๐Ÿ›ธ for example, to search NewOS's descriptions use -m NewOS ๐Ÿš€ system can be a combo of comma-delimited OS names ๐Ÿซถ to include a search of the native OS's whatis descriptions, put the system name man in the argument string ๐ŸŒˆ this option overrides the $SYSTEM environment variable ๐Ÿ‘‘
  • -M path, --manpath=path โ€” swaps in your own set of colon-delimited manual page hierarchies to search ๐Ÿ—บ๏ธ by default apropos uses the $MANPATH environment variable, unless it's empty or unset, and then it works out a manpath from your $PATH ๐Ÿงญ this option overrides the contents of $MANPATH ๐Ÿ’…
  • -L locale, --locale=locale โ€” apropos normally figures out your locale by calling the C function setlocale(3), which checks various environment variables like $LC_MESSAGES and $LANG ๐ŸŒ to temporarily override that, pass a locale string straight to apropos with this option โœจ it doesn't kick in until the actual search starts ๐Ÿ™ƒ output like the help message always shows up in the locale that was figured out at the start ๐Ÿ’–
  • -C file, --config-file=file โ€” uses this user config file instead of the default ~/.manpath ๐Ÿ“
  • -?, --help โ€” prints a help message and exits ๐Ÿ†˜
  • --usage โ€” prints a short usage message and exits ๐Ÿ“
  • -V, --version โ€” displays version info ๐Ÿท๏ธ

๐Ÿšฆ EXIT STATUS

  • 0 โ€” the program ran successfully ๐Ÿฅณ
  • 1 โ€” there was a usage, syntax or config file error ๐Ÿ™…โ€โ™€๏ธ
  • 2 โ€” there was an operational error ๐Ÿ˜ต
  • 16 โ€” nothing matched your criteria ๐Ÿซ 

๐ŸŒˆ ENVIRONMENT

  • SYSTEM โ€” if $SYSTEM is set, it does the same thing as passing it to the -m option ๐Ÿ›ธ
  • MANPATH โ€” if $MANPATH is set, its value gets read as the colon-delimited manual page hierarchy search path ๐Ÿ—บ๏ธ check the SEARCH PATH section of manpath(5) for the default behaviour and the nitty gritty on how this variable gets handled ๐Ÿ“–
  • MANWIDTH โ€” if $MANWIDTH is set, its value is used as the terminal width (see the --long option) ๐Ÿ“ if it's not set, the width gets calculated from $COLUMNS, plus ioctl(2) if it's available, and if all else fails it falls back to 80 characters ๐Ÿ™ƒ
  • POSIXLY_CORRECT โ€” if $POSIXLY_CORRECT is set, even to a null value, the default search is treated as an extended regex (-r) ๐Ÿค“ honestly, that's the default anyway these days ๐Ÿ’€

๐Ÿ—‚๏ธ FILES

  • /usr/share/man/index.(bt|db|dir|pag) โ€” a traditional global index database cache ๐Ÿ“š
  • /var/cache/man/index.(bt|db|dir|pag) โ€” an FHS compliant global index database cache ๐Ÿงš
  • /usr/share/man/.../whatis โ€” a traditional whatis text database ๐Ÿ“

๐Ÿ”— SEE ALSO

man(1), whatis(1), mandb(8) ๐Ÿ’œ

๐Ÿ‘ฉโ€๐Ÿ’ป AUTHOR

Wilf. (G.Wilford@ee.surrey.ac.uk) ๐Ÿ’– Fabrizio Polacco (fpolacco@debian.org) ๐Ÿซถ Colin Watson (cjwatson@debian.org) ๐ŸŒŸ

๐Ÿ› BUGS

if something's broken, report it here ๐Ÿ™ˆ https://gitlab.com/man-db/man-db/-/issues https://savannah.nongnu.org/bugs/?group=man-db


bestie, you're all caught up ๐ŸŒˆ this was APROPOS(1) from the 2.13.1 release, dated 2025-05-02 ๐ŸŽ€ now go find your manual pages and slay the terminal ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from