Get Linux command Help information and how to use the man manual

Source: Internet
Author: User

Types of commands in Linux

The command types in Linux are divided into internal commands and external commands.

Use type commands to determine internal and external commands, as shown in the following example:

[[email protected] ~]# type cd
CD is a shell builtin #cd是shell的内置命令
[Email protected] ~]# type passwd
passwd is/usr/bin/passwd #passwd命令存放在/usr/bin/passwd Path

  

How to get help information for Linux commands

Internal commands can be used directly to COMMAND --help query Help.

To get help for external commands, there are several ways to do this:

(1) Use COMMAND --help, can query commands with a brief format for use Help (2) using the Man Manual; Man Manual is located /usr/share/man; Command format: man COMMAND Man command Options

man -k COMMAND: Lists all manuals related to the command in a fuzzy matching manner
man -f COMMAND: Lists a brief description of the command and the type of Help manual
man -w COMMAND: List the location of the Help manual
man -M /PATH/TO/SOMEDIR: Find the command manual and open it in the specified directory
man -a COMMAND: List all help manuals for the command

In The Man Handbook. Operation Method

Flip Screen:

SPACEBAR: Flip a screen to the end of a file
B: Flip a screen to the file header
Enter: Flip a line to the end of the file
K: Flip a line to the file header
G: Jump to the last line
G: Jump to the first line
Ctrl+d: Turn half screen at the end of the file
Ctrl+u: Turn half screen to file header
#G: Jump to a specified line
1 g: Jump to the first line

Text Search:

/keyword: Search from file header to end of file, case insensitive
Keyword: Look up from the end of the file to the header of the file, without distinguishing the character case
N: Same direction as Find command
N: Opposite of Find command direction

Exit:

Q:quit

The man Manual of the command has FragmentAnd ChaptersThe points:

Section (Fragment):

NAME: Description of functionality
Synopsis: Syntax format
DESCRIPTION: Description
Options: Option
EXAMPLES: Using the example
AUTHOR: Author
BUGS: How to Report program bugs
See ALSO: Reference
....

Synopsis (Syntax format):

[]: Optional content
<>: What you must provide
a|b|c: Choose one More
...: Similar content can appear multiple

CHAPTER (chapter):

1. User commands
2. System calls
3. C Library Call
4. Equipment files and special documents
5. File format (configuration file format)
6. Game Use Help
7. Miscellaneous
8. Management tools and Daemons

can use man CHAPTER COMMANDQuery the Help manual for a specific section of the command, but not every command has a manual under all chapters.

A man manual that lists the chapters of the command:
CentOS 6:whatis COMMAND
CentOS 7:man -f COMMAND
You may need to manually establish the database first:
CentOS 6:makewhatis
CentOS 7:mandb

(3) Use info COMMANDGet Command online documentation (4) Many applications bring their own Help documentation: /usr/share/doc/APP-VERSION
    • README: Information related to the program
    • Install: Installation Help
    • Changes: Change information for version iterations
(5) Official Help for mainstream distribution: http://www.redhat.com/doc(6) on the official site of the program Document(7) Search engine: Google

  
In addition, can refer to books, recommended publishers: O ' Reiley, Wrox, machinery industry, electronic industry, people post and Telecommunications, Tsinghua University, Water Conservancy and hydropower

  
  

Get Linux command Help information and how to use the man manual

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.