Skip to Content
This project is a work in progress. If you have any questions or suggestions, feel free to contact me.
LinuxSystem InformationMan Pages

man

The man command is used to view the manual pages of commands and programs. Example:

man ls

This shows the full manual for the ls command.

Difference between man -f and man -k

CommandFunctionEquivalent To
man -fShows a brief description of a commandwhatis
man -kSearches manual page names and descriptions for a keywordapropos
man -f <command>
  • Provides a one-line summary for the given command name.
  • Only matches exact command names.
  • Useful when you want to quickly check what a command does.

Example:

man -f cp

Output:

cp (1) - copy files and directories
man -k <keyword>
  • Searches through all manual pages for the keyword in names or descriptions.
  • Can return multiple results if the keyword appears in many places.
  • Useful for discovering commands related to a topic.

Example:

man -k copy

Output:

cp (1) - copy files and directories install (1) - copy files and set attributes scp (1) - secure copy (remote file copy program)

Summary

CommandSearches forOutput TypeUse Case
manSpecific commandFull manual pageLearn how to use a command
man -fExact command nameOne-line summaryQuickly check what a command does
man -kKeyword in all man pagesList of matchesFind commands related to a keyword
Last updated on