man command tutorial in linux/unix with examples

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:

  1. User Commands
  2. System Calls
  3. C Library Functions
  4. Devices and Special Files
  5. File Formats and Conventions
  6. Games et. Al.
  7. Miscellanea
  8. 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

Add a Comment

Your email address will not be published. Required fields are marked *