1. Introduction

One of the important reflexes that every Linux user should develop is searching for information if something goes wrong. But despite the fact that we live in a world connected with search engines, a wiki and a huge amount of information at your fingertips, it is always good to have local information in your system. It provides easy and fast access to information, even in the absence of an Internet connection. In addition, the information found on the Internet cannot always be trusted, while the manuals are clearly and consistently stated. The Unix philosophy (and, by inheritance, Linux) says that the system should be well documented. Therefore, each program is distributed with a corresponding man page. Although there are man pages on all Unix-based operating systems, there are differences between them, therefore, what works on Linux may not work, for example, on Solaris. In addition, the writing style of these guides is very short and unusual for beginners, so you may need to read the page several times before you get used to it.

2. Frequently used options

man -a keyword
lists all man-pages available for keyword man 
-f keyword
searches for and displays a brief description of all man pages with links to keyword 
man –warnings
includes 
man -I warnings 
includes case sensitivity 
man -H [browser]
activates HTML output and browser viewing, which is defined in $ BROWSER or defined by default at compile time (usually lynx).

3. Using man pages

If you are using one of the popular distributions, then the man pages are likely already installed as part of the system kernel along with important things like the shell or the init system. To better understand how man works, just type man. That’s how it works: if I need a man page for ls, I enter man ls. In the network community, it is considered good practice to first read the manual before asking questions on the forums or on IRC channels, which veterans will remind you about using the abbreviation “RTFM”. If you don’t know what it means, take a look at Google. This is the man page, then Google / Wikipedia, then (if you have not found a solution) forums and social communities, is part of the Linux / FOSS culture.

Since most man pages consist of more than one page, less is used for output, and pages can be scrolled through using the PgUp and PgDown keys, or Space and Esc + V. You can exit the man page at any time using the q key “. We will analyze the use of less in detail some other time, if you want to do it yourself, you can always type man less. The search in the man page is invoked with the “/” key, each subsequent entry found can be viewed with the “n” key. If you know what you need, but don’t know the exact title of the manpage, apropos (1) will help you. You probably noticed the number in brackets after the team name. She sets the category to which the team belongs. For better organization, and to avoid duplication, Man pages are divided into categories. For example, printf in Linux can belong to categories 1, 1p, 3, and 3p. It is both a function of the C library and a user command, part of coreutils, which is often used in shell scripts. In Linux, the categories followed by “p” are intended for POSIX programmers. In such cases, you can specify the required category by inserting its number between the “man” and the command: man 3 printf. Below are the categories as they appear in modern Linux systems. designed for POSIX programmers. In such cases, you can specify the required category by inserting its number between the “man” and the command: man 3 printf. Below are the categories as they appear in modern Linux systems. designed for POSIX programmers. In such cases, you can specify the required category by inserting its number between the “man” and the command: man 3 printf. Below are the categories as they appear in modern Linux systems.

1 – executable programs and shell commands; 
2 – system calls; 
3 – library calls; 
4 — device files (usually located in / dev); 
5 – file formats; 
6 – games; 
7 – macro packages and agreements; 
8 – system administration programs; 
9 – core procedures

As mentioned earlier, the man system was inherited from the old Unix. On the other hand, GNU proposed an info system, which serves the same purpose, but has a useful innovation, namely the use of hypertext links to navigate between pages, similar to how it happens in web browsers. Since OpenSolaris and BSD also use GNU software (gawk, gcc, emacs …), some info pages are also likely to be available on them. You can get closer to this system using the info info command

4. Exercises

1. Why do you think there is a division into section 1 and 1p, or 3 and 3p?

2. Do a little research and find out the differences in categories between Linux and other free Unix-based systems.

3. What would you do if you need to find a man page, but apropos is not available? Hint: man manpage

4. Find another team that is found in several categories at once.

5. Examples

Command syntaxDescription
man -t command | lpr -psGenerates the page using the troff or groff format and sends to the printer ps print
man -l -Tdvi command.1x.gz> command.1x.dvigenerates output in dvi (device independent) format, commonly used later by utilities such as dvips
man -C fileUses file as configuration file instead of default