whatis
whatis linux command cheatsheet by Thamizhiniyan C S
Introduction
The whatis command is used to display one-line manual page descriptions.
Syntax
whatis [-dlv?V] [-r|-w] [-s list] [-m system[,...]] [-M path] [-L locale] [-C file] name ...
Important Flags
-d, --debug
Emit debugging messages.
-v, --verbose
Print verbose warning messages.
-r, --regex
Interpret each keyword as a regex.
-w, --wildcard
The keyword(s) contain wildcards.
-l, --long
Do not trim output to terminal width.
-C, --config-file=FILE
Use this user configuration file.
-L, --locale=LOCALE
Define the locale for this search.
-m, --systems=SYSTEM
Use manual pages from other systems.
-M, --manpath=PATH
Set search path for manual pages to PATH.
-s, --sections=LIST, --section=LIST
Search only these sections (colon-separated).
-?, --help
Give this help list.
--usage
Give a short usage message.
-V, --version
Print program version.
Examples
whatis -hPrints the help message.
whatis -d lsPrints the debugging information.
whatis -v lsPrints verbose warning messages.
whatis -r lsSupports regular expression searches.
whatis -r '^ab'Searches and displays short descriptions of commands and functions matching the regular expression '^ab'.
whatis -r '^cd'Searches and displays short descriptions of commands and functions matching the regular expression '^cd'.
whatis -r 'cd$'Searches and displays short descriptions of commands and functions matching the regular expression 'cd$'.
whatis -w lsEnables wildcard searches using the specified pattern.
whatis -w 'ab*'Searches and displays short descriptions of commands and functions matching the wildcard pattern 'ab*'.
whatis -w 'cd*'Searches and displays short descriptions of commands and functions matching the wildcard pattern 'cd*'.
whatis -l catDisplays long descriptions in addition to the summary.
whatis -s 3 catAllows users to specify the sections from which to retrieve the information. By default, it searches all sections.
whatis -s "1","2" catAccesses information from sections 1 and 2 of the manual page for the cat command.
whatis -m NewOS rmdirAccesses manual page names for other operating systems.
whatis -m OS2 rmdirAccesses the short description of the rmdir command from the OS2 manual pages.
whatis cd -M --manpath=/lib/cdSpecifies an alternate set of colon-delimited manual page hierarchies to search. It overrides the default value of the $MANPATH environment variable.
whatis rm -L localeTemporarily overrides the determined locale value, allowing users to supply a locale string directly to the 'whatis' command.
whatis -C fileSpecifies a user configuration file for the 'whatis' command, overriding the default configuration file location ~/.manpath.
whatis -?Prints a help message.
whatis --usageDisplays short information about the whatis command and exits.
whatis -VDisplays version information.
whatis ssh-import-idDisplays the trimmed output of the ssh-import-id command.
Last updated
Was this helpful?