use man well

As the saying goes: "Give a man a fish is worse than teach a man to fish", here we will discuss how to use an important tool in Linux - help documentation.   

There are several commands related to the help documentation, but the most commonly used command is the man command, which is the abbreviation of manual. It is used to view various reference manuals that come with the system (note that it is not just commands). For example, we are now going to look at the help documentation for the who command. The simplest usage is as follows:

Command sequence 1

[stu@localhost~]$ man who

At this time, I came to the interface of the man command, and the meanings of the items are as follows:

  • NAME    The name of this command (program) and a description of its simple purpose

  • SYNOPSIS    command (program) syntax

  • DESCRIPTION   command (program) detailed description, including the usage

  • Author of the AUTHOR   command (program)

  • REPORTINGBUGS   Email to contact if bugs are found

  • COPYRIGHT   Command (Program) Copyright Agreement

  • What other documents can SEE ALSO   refer to?

 

Of course, the document format of different commands (programs) may be slightly different, and the items that may be included in the document are:

  •  COMMANDS  When the command (program) is running, you can execute internal commands in this command (program)

  •  FILES  Some files used by or related to this command (program) or data

  •  EXAMPLE  This command (program) executes some reference examples.       

 

 

important

   

In the man interface, you can use the following shortcut keys to operate:

 

¨ Up/Down Arrows Scroll up/down a line

¨ [Space] page down

¨ [Page Down] page down

¨ [Page Up] turn up a page

¨ [Home] Go back to the first page

¨ [End] go to the last page

¨ /string searches down the string string

¨ ?string searches up the string string

¨ n, N When using / or ? to search for a string, n can be used to jump to the next match, and N can be used to jump to the previous match.

¨ [q] to quit

 

The entire manual is divided into several sections, each of which may contain content with the same name.

 

 

important

   

The man command can be followed by a number to indicate the user manual to consult. If no number is added, the man command defaults to looking for the relevant content from the manual with a smaller number:

 

1. Instructions or executable files that can be manipulated in the shell

2. Functions and tools that can be used by the system core

3. Some commonly used functions and libraries, most of which are C libraries (libc)

4. Description of device files, usually files under /dev

5. Configuration file or the format of some files

6. Games

7. Conventions and protocols, such as the description of Linux file system systems, network protocols, ASCII codes, etc.

8. Administrative Commands Available to System Administrators

9. Files related to the system core

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325758879&siteId=291194637