Methods of payment Abuse

Team Man

26.11.2021, 19:00

Terminal commands are the main advantage of the Linux operating system. The problem is that the user is not always able to figure out all the commands on his own. This is useful, because with the help of commands you can do much more, and importantly, much more conveniently, compared to the graphical interface. The developers have created a special help system where you can find information about any command. Most of the commands contain help pages in their packages, which are added to the common database during installation. In this article we will talk about what man is and how to use this utility.

What is the MAN command

The man command allows you to access the common help database for a command, function or program. Usually, to view help, the program needs to be passed the name of a command or other object in the system. Its syntax is as follows:

$ man раздел page_name

Typically, the page title is the name of the command or the name of the program. The whole help is divided into several sections. By default, help pages are output from all sections, but the user can output help pages from a specific section. To do this, just pass the section number to the command.

Here is a list of the main sections:

  1. Shell or program commands.
  2. System calls.
  3. Library functions.
  4. Files in the /dev directory.
  5. File formats.
  6. Games.
  7. Miscellaneous.
  8. System administration commands.
  9. Kernel procedures.

Now let's look at some examples. To see the man command help, just run the following command:

$ man man

To invoke ls help:

 $ man ls

The individual help page is divided into several sections.

These are:

  • NAME - the name of the program or command and a brief description of it;
  • SYNOPSIS - the syntax of the command and how to pass options to it;
  • DESCRIPTION - a more detailed description of the command;
  • CONFIGURATION - program settings;
  • OPTIONS - command options;
  • EXAMPLE - examples of use;
  • AUTHORS - authors of the program.

There are other sections as well, but these are the main ones. If there is not much information about the utility, some sections may be combined together, and some may not exist at all.

The following hotkeys are used to view information and manage the help page:

  • up/down arrow - scroll up or down through the information;
  • e or j - move up one line;
  • y or h - move one line down;
  • z - move one window down;
  • w - move one window up;
  • d - move half a window down;
  • u - move half a window up;
  • / - search for occurrences of the specified after characters forward;
  • ? - the same as the previous one, only search backwards;
  • n - in the search mode display the next occurrence;
  • N - in the search mode display the previous occurrence.

Then press Enter and the program will highlight all occurrences of this word in the text. To search for the next occurrence press n.

These keys will be enough for you to use the help. The less utility is used for outputting information, so if you need more hotkeys.

There are several options you can use when running the utility, let's take a look at these options. There are not that many and the most interesting ones are only a few. The -f option allows you to see a brief description of the help page. For example

$ man -f ls

With the -k option, you can search the brief descriptions of the help pages. For example, let's find all pages that have the word printf in their descriptions:

$ man -k printf

The -K option allows you to search the reference pages themselves. The search is performed by brute force, so it takes some time:

$ man -K core

The command will open all found pages. To enter, press Ctrl+C. The -L option will allow you to manually set the language in which the page will be displayed. To display information about man in English, run:

$ man -L en_US man

To display man in Russian Linux you need to set this option to ru_RU:

$ man -L ru_RU man

To make this work, you need to have Russian localization packages installed on your system.

Other options can always be found in the help page for the man command.