man command tutorial in linux/unix with examples
December 3, 2020
Man command in Linux/unix is used to display the user manual of any command we can run on the terminal. It provides a detailed view of commands, including:
- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- ON-LINE HELP
- FILES
- SEE ALSO
- AUTHOR
- BUGS
The standard sections of the manual include:
- User Commands
- System Calls
- C Library Functions
- Devices and Special Files
- File Formats and Conventions
- Games et. Al.
- Miscellanea
- System Administration tools and Deamons
Syntax
$ man [OPTION]... [COMMAND NAME]...
Examples
1.Display the whole manual of the command.
syntax
$ man [command]
In the following example, the man command is used to display the complete manual of the vim command.
$ man vim
2. Only show the command usage without reading the entire manual.
syntax
$ man -f [command]
In the following example, the man command is used to show the usage of the vim command.
$ man -f vim
3. Show specific chapters of the manual
syntax
$ man [section-num] [command]
When the manual is divided into multiple parts, you can use the following command to display a specific part of the manual.
$ man 2 intro