linux command is used to get help: (help, man, info)

linux command can be used to see the resolve of the command, in this blog we introduce linux commonly used commands help.

Get help using the command:

1, help command

When using the "help" command this help, we need to learn how to distinguish between a command in linux whether internal or external.
1. introduce explained inside and outside the command:

内内部命令:就是shell程序的一部分,在系统启动时就加载进入内存,时常驻内存的,所以我们执行内部命令的时候执行速度比较快
外部命令:也就是文件系统命令,它不是shell程序组成部分,是shell程序之外的程序,使用时需要从硬盘读取入内存,所以相对来说速度就慢一点。

2. In order to distinguish an external command to see:
the use of "type" and external commands can be distinguished, for example: type cd is an internal command
Here Insert Picture Description

Introducing the "help" command inside and outside the two expressions:
3 ways to get help inside and outside the command:

内部命令获得命令方式:
help 命令           只能查询shell内置命令。
外部命令获得命令方式:
命令 --help         只能查询linux外部命令

4. Try two commonly used command is an internal command or external command
we try cd and ls command to see if they are internal or external command,
as shown:
Here Insert Picture Description
displaying a picture, is an internal command cd, ls expressed on the outside,
so they get command format is:
Help cd
LS --help

2, man command

View command command (manual) Manual format
man is a very useful tool to use when you are not familiar with a certain command, man command will become very useful.
We illustrate a "ls" command to manipulate the view.
man ls enter
Here Insert Picture Description
1. Note manual book is divided section; man # Command (# is the section number)
shown above, with the "man ls" View "ls" command parsing, there ls in the upper left (1), ( this display is "ls" first Zhang introduced)
can also look at other analytical Zhang commands with the command, because only an introduction ls, so we use the "read" to express command.
Command: man 2 read (see directly "read" command in the second Zhang introduced)
Here Insert Picture Description

2. Use the manual View command needs to be divided sections to view the contents of compressed file formats, there are also points of chapters.
Such as / usr / share / man down man1, man2, ...
Here Insert Picture Description
man1 :: user command (/ bin, / usr / bin, / usr / local / bin)
man2: System calls, not every command has system calls (such as: man 2 the Read)
man3: library calls
man4: special file (device file) such as: / dev / tty1
Man5: file format (configuration file format)
Man6: game, the game uses the help
man7: miscellaneous (Miscellaneneous)
man8: management command (/ sbin, / usr / sbin, / usr / local / sbin)
Man9: other (Linux specific, used to store the kernel routine documentation
described above, this is the command if these chapters, corresponding chapters.

3. How to see if there is a command these chapters
where we explain:
Not every command (command) in all chapters have a manual,
so we have to use "whatis" command
to view the command in which chapters help:
~] #whatis + command
For example: ls, passwd
Figure:
Here Insert Picture Description
As shown, in some order behind the need to query number, this number represents the view command helpful in what section.

4. Check the manual to use the command:
turned back one screen: SPACE
turned forward one screen: b
turn back one row: ENTER
turned forward one row: K

5. Find command manual:
/ KEYWORO: back
n: Next
N: previous
? KEYWORD: forward
n: Next
N: a front
q: Exit

6.man + title command to check the manual under the command of explanation:

NAME (tell you what the command is a brief description of the function)
SYNOPSIS (using the format instructions)
the DESCRIPTION: command detailed description of the functions, which may include the meaning of each option
OPTIONS: explain the significance of each option
FILES: This command is related to the configuration file
EXAMPLES : example of use
SEE ALSO: additional reference
aUTHOR (the author)
PEROKTING; BUGS (command has the email address of the bug report in here)
cOPYRIGHT (copyright description)

3, info command

(Hyperlinks stable document, info is the information page, provide more detailed information about the author, version, and when publishing, man manual tells you how to use):
info + command
1. The vast majority of the program has a corresponding help files, stored in / usr / share / doc document
in this catalog is almost a command to use and related manuals and documentation of) such as:
#ls /usr/share/doc/ntpdate-4.2.6p5/
Here Insert Picture Description
Figure: display command is cOPYRIGHT (copyright)

4. You can query Baidu

Guess you like

Origin blog.csdn.net/nnj99/article/details/92427808