man Command: Tutorial & Examples

Display the manual page for a command

man is a command in Linux and other Unix-based operating systems that displays the manual pages for other commands and utilities. The manual pages, or "man pages" for short, provide detailed information about how to use a particular command, including a description of its options and arguments, examples of how to use it, and troubleshooting tips.

To use man, you simply enter the command followed by the name of the command or utility you want to learn more about. For example, to view the manual page for the ls command, you would enter man ls in the terminal.

Once inside the man page, you can navigate through the text using the arrow keys, the Page Up and Page Down keys, or the / key to search for specific text.

man pages are organized into sections, each section corresponds to a different type of command or utility. The most commonly used sections are:

  • section 1: User commands
  • section 2: System calls
  • section 3: C Library functions
  • section 4: Devices and special files
  • section 5: File formats and conventions
  • section 6: Games and screensavers
  • section 7: Miscellanea
  • section 8: System administration commands

You can specify the section number along with the command name if you want to be more specific like man 2 open for example.

man is a valuable tool for learning how to use the many commands and utilities that are available in Linux and other Unix-based operating systems. It provides detailed information and examples that can be very helpful when learning to use new commands or troubleshooting problems with existing ones. Additionally, many Linux distributions include man pages for additional packages and software that can be installed on the system, so man can be used to access information about those packages as well.

Some Linux distributions also have graphical front-end for the man command, like yelp or khelpcenter, these front-end make it more user-friendly to navigate through the man pages and provide a more pleasant reading experience.

Except where otherwise noted, content on this site is licensed under a CC BY-SA 4.0 license CC BY SA