What is the Linux man Command?
man command in Linux is shorthand for "manuals" and provides a way to access user manuals for command-line tools/utilities.
man command takes an optional list of flags followed by the name of the command.
man [OPTION...] [Command]
To explore the full list of flags available in man, use the following command:
Read a Manual with man
Let's say we want to learn about the grep command from the terminal. We would type the following:
A formatted manual will appear showing you everything about
grep, which can be scrolled through using the
DOWN arrow keys.
When you have finished reading press
Q to close the manual.
Find the Definition of Any Command Utility
If you just want a short definition of what any command-line utility is, use the
-f flag in the
man command. To demonstrate this, let's see what the
printf command is:
man -f printf
printf (1) - format and print data
printf (3) - formatted output conversion