Introduction
Linux is a complex operating system with many commands and each command has many different use cases. Remembering them is a difficult thing and that’s why the man command was born. man stands for manual, it teaches you how to use the commands available in Linux with full information for users’ reference.
And we will show you how to check the manual by using the man command in Linux as you go through it below.
The syntax of man command
$ man [option]... [command]...
Options
1. No option: show command manual
$ man [command]
For example, I want to see the manual of the mkdir command:
$ man mkdir
Output:
2. num: specifies the display of a specific section of the manual.
$ man [num] [command]
For example, I want to show part 2 of the mkdir command:
$ man 2 mkdir
Output:
3. -f: show function of command
$ man -f [command]
For example, I want to show the function of the cat command:
$ man -f cat
Output:
4. -a: show all manual intro
$ man -a [command]
For example:
$ man -a intro
Output:
5. -k: searches for the specified command as a regular expression
$ man -k [command]
For example:
$ man -k ls
Output:
6. -w: returns the position of the command
$ man -w [command]
For example:
$ man -w mkdir
Output:
Conclusion
Hope you understood the tutorial on how to use the man command in Linux.
Thanks for reading!