Skip to content

Linux man command (manual)

The man command on Linux offers a manual of various GNU Linux commands, as well as a manual for other third-party programs. man offers a simplified interface for programmers to provide a manual for their programs.

The manual pages accompany almost all GNU/Linux programs and can be installed according to the language chosen, if available in the distribution.

The man’s information is called “Man Pages” and it contains a basic description of commands and details about how their options work.

A manual page is viewed as a single text with vertical scrolling. It also documents parameters used in some configuration files.

The documents in the manual are divided into sessions according to the subject discussed. The sessions are numbered from 1 to 9, as follows:

  1. Executable programs or shell commands;
  2. System Calls (functions provided by the Kernel);
  3. Library Calls (functions provided by libraries);
  4. Special files, especially those located in /dev;
  5. File formats and conventions;
  6. Games;
  7. Macro Packages;
  8. Administrative Commands;
  9. Kernel Routines.

It is possible that the same word may refer to a programming function, command, or configuration file. Therefore, it is important to know in which session we will find the desired documentation.

Each page of the manual is divided into parts:

  • NAME: Name of the item searched for with a short description;
  • SYNOPSIS: Full description of the use and syntax;
  • DESCRIPTION: Brief description of the features;
  • OPTIONS: Description of each option and arguments;
  • FILES: A list of important files;
  • SEE ALSO: A list of items related to the wanted;
  • BUGS: Description of possible problems with the item;
  • AUTHOR: List of people responsible for the item.

To access the manual, the command is the man followed by the item searched for. Optionally, the session number can be passed as a parameter.

$ man passwd

In this example, man views the manual for the passwd command, belonging to session 1.

$ man 5 passwd

In this example, man will display the manual for the /etc/passwd file.

Navigation within the manual pages is done using the keys:

  • q Exits the manual page;
  • PageDown or f Scroll 25 lines down;
  • PageUp or w Scroll 25 lines up;
  • Arrow Up or k Scroll 1 line up
  • ; arrow down or e Scroll 1 line down;
  • r Redesign the screen (refresh);
  • p or g Top of page;
  • h Help with options of the manual page;
  • s Saves the manual page in text format to the specified file.

Learn much more about Linux in our online course. You can register here. If you already have an account, or want to create one, just log in or create your user here.

Did you like it?

Share