Man Command Linux

3

We all know that there are lots of Linux instructions, and clearly, we don’t know all of them by means of center. Either means, every now and then, we want assist to know what a Linux command way and the way it’s used. For this, we should lodge to the instructions that serve as as manuals inside of Linux. On Linux, there are 5 such instructions – the assist command, the person command, the information command, the apropos command, and the whatis command. In this educational, we’ll be reviewing the person command, in particular as it’s the maximum tough handbook for Linux.

The guy command

Man stands for handbook and is used to get as a lot knowledge as is conceivable about any instructions that may be run inside the terminal. In reality, that is the one command in the market that can chuck such a lot knowledge that you just’ll almost definitely no longer be capable to going thru all of the handbook for the command in query.

Each command has knowledge on a variety of sub-sections. These sub-sections come with NAME, SYNOPSIS, CONFIGURATION, DESCRIPTION, OPTIONS, EXIT STATUS, RETURN VALUE, ERRORS, ENVIRONMENT, FILES, VERSIONS, CONFORMING TO, NOTES, BUGS, EXAMPLE, AUTHORS, and SEE ALSO. In the SYNOPSIS segment, the syntax used to run this system is located. Further, the OPTIONS segment elaborates at the choices that the command makes use of.

Each command within the handbook comes with a bunch connected to it; this quantity refers back to the handbook segment the place the command is positioned. For instance, it’s possible you’ll learn the next:

passwd (1) – exchange consumer password

Next to passwd, there’s a bunch, and on this case, it’s a one. But this quantity can exchange relying at the command you enter. This quantity refers back to the segment within the handbook the place it’s discovered. There are precisely 9 sections within the handbook itself. The handbook contains those quite a lot of sections:

  1. Executable systems or shell instructions
  2. System calls (purposes equipped by means of the kernel)
  3. Library calls (purposes inside of program libraries)
  4. Special recordsdata (generally present in /dev)
  5. File codecs and conventions, e.g. /and so forth/passwd
  6. Games
  7. Miscellaneous (together with macro programs and conventions), e.g., guy(7), groff(7)
  8. System management instructions (generally just for root)
  9. Kernel routines [Non standard]

Typically, the best way you’d seek for knowledge on a specific command is by means of typing:

guy [command]

Ex: guy passwd

Further, you’ll be able to learn concerning the handbook itself within the handbook by means of typing:

“Man man” provides you with details about the handbook itself.

Search by means of Section

When a seek is carried out within the handbook the usage of the person command (adopted by means of any other command, ex; guy passwd), the handbook is searched in a specific order. The pre-defined order during which it searches the handbook is as follows: (1 n l 8 3 2 3posix 3pm 3perl 5 4 9 6 7). However, you’ll be able to adjust this order should you so want the usage of the report /and so forth/manpath.config.

The outcome this is then displayed is the primary outcome it reveals. But this in no way implies that there aren’t a couple of entries that fit the hunt time period. So if the hunt time period was once present in segment 1 and segment 5, it’ll show the end result present in segment 1 and disregard the end result present in segment 5.

For instance, should you’re searching for the command “passwd”, then you could possibly sort:

This will show the primary fit that it reveals. In our case, the primary fit that it’ll to find might be in segment 1 or shell instructions (passwd (1) – exchange consumer password). However, there are a couple of circumstances of the “passwd” command within the handbook.

passwd (1ssl) – compute password hashes

passwd (1) – exchange consumer password

passwd (5) – the password report

So what if the command that you need extra details about is the passwd report (positioned at /and so forth/passwd and is used to retailer consumer knowledge)? In such circumstances, you’d have to provide the segment choice of the handbook the place you’ll to find the command. In our case, as we will be able to see, passwd (5) way segment 5 of the handbook. So let’s check out that:

guy [section] [command]

Ex: guy 5 passwd

“Man 5 passwd” will yield effects which are dissimilar to “man passwd”. In reality, on this case, it’ll seek and chuck out details about the password report and no longer the passwd command (to switch the consumer password)!

The subsequent query we ask ourselves is, what if we don’t know which segment the “passwd” report is within the handbook however that we nonetheless want details about it. In the former case, I advised you that the segment quantity was once 5, however likelihood is that, you wouldn’t know the segment numbers by means of center! So what we’re searching for is an alternative choice to the whatis command. And what’s particular is that the person command comes with a hyphen f that mimics the whatis command. It provides you with the matching instructions with an outline.

So if we sort:

guy -f [command]

Ex: guy -f passwd

“man -f passwd” will record the next:

passwd (1ssl) – compute password hashes

passwd (1) – exchange consumer password

passwd (5) – the password report

Search by means of phrases

Next, what if we needed to go looking the handbook the usage of seek phrases? What if we knew the overall serve as of the command however didn’t know the command itself? In this example, we want a person command that mimics the apropos command.

guy -k [term]

Ex: guy -k passwd

Ex: guy -k “list directory”

Here, while you upload the hyphen ok after which the hunt time period, you get precisely the precise knowledge that fits that seek time period. It will acquire each time period within the handbook that fits the hunt time period that you just’ve inputted.

In our case, we’d get this for “man -k passwd”:

Other searches

Though we checked out learn how to seek the handbook by means of segment and by means of serve as, there are lots of different ways to go looking the handbook! You can learn additional concerning the handbook by means of typing “man man” within the command line.


Commands are an very important a part of Linux. In specific, should you’re new to Linux or even skilled customers want assist with instructions. For this function, manuals have been built-in into the Linux device. These manuals can also be accessed by the use of the person command (among others). The guy command is slightly tough because it offers in-depth details about the command itself and its utilization.

Happy Coding!

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More