Whether it's Linux beginners or Linux pros, it's inevitable to look at help to make the commands work in different ways. There are hundreds of commands in Linux, each command has a variety of parameters, and because the developer of the different parameters of each command does not necessarily mean the same meaning, by rote is not feasible, so the flexible use of Linux Help system can greatly improve our efficiency.
First, the Linux command has internal commands and external command points. The internal commands are actually part of the shell program, which contains some of the more concise Linux system commands that are identified by the shell and run inside the shell, usually loaded and homed in the system memory when the Linux system loads and runs. External commands are part of the utilities in a Linux system, because the utilities are generally powerful, so they contain a large number of programs that are not loaded into memory with the system when the system is loaded, but redeployment memory when needed. Entities that are normally external commands are not included in the shell, but their command execution procedures are controlled by the shell. The shell program manages the path lookup, loading and storage of external command execution, and controls the execution of the command.
To put it simply, internal commands are the instructions built into the shell that can be used without the need for installation, and by default Bash has 50 built-in commands, while external commands are not the shell itself, and not necessarily in the system. Instead, you need to install the package to get it.
Okay, so much to say is that you want to understand what internal and external commands are.
But how do we know if a command is an internal or an external command, we can use the type command, as follows:
Type COMMAND
For example, we want to see if the Cd,date,cal,type command is an internal or external command.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/43/79/wKiom1PbOOqC5802AADf1igDols025.jpg "title=" type " alt= "Wkiom1pbooqc5802aadf1igdols025.jpg"/>
The result returned by the command is cd,type as an internal command, while the date,cal command is an external command
Let's start by getting into the focus section how to use Linux for help.
Method One:
Internal command: Help command external command: command--help
The command demonstrates the following:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/43/7A/wKiom1PbPkuRGQEzAAHx2n8TpzQ332.jpg "title=" Help CD "alt=" Wkiom1pbpkurgqezaahx2n8tpzq332.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/43/7A/wKioL1PbP4KAsYf9AAI3DB13dEw512.jpg "title=" date-- Help "alt=" Wkiol1pbp4kasyf9aai3db13dew512.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/43/7A/wKioL1PbP5ihvaavAABzBbWR3vk970.jpg "title=" Cal-- Help "alt=" Wkiol1pbp5ihvaavaabzbbwr3vk970.jpg "/>
When we see the last picture, it may be strange why the option to invalid option is displayed, because there are some commands that are not--help this option, as we said before because the developers of each command are different, So not every command has built--help this option, so in the face of this we want to introduce another way to look at the help, but also is the most important and most common Linux method.
Method Two:
View command Manuals
We can use the man command to see the help of a certain command, and when it comes to man we are usually using whatis together.
Whatis COMMAND #简单描述命令的功能
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/43/7B/wKioL1PbRqnQcKfpAADl2NIdd_I623.jpg "title=" Whatsi "alt=" Wkiol1pbrqnqckfpaadl2nidd_i623.jpg "/>
Because the command manual is divided into chapters, the brackets (1) (3) (5) correspond to different chapters, the corresponding relationship is as follows
1: User command (/bin,/usr/bin,/usr/local/bin) 2: System call 3: Library user 4: Special file (device file) 5: File Format (configuration file Syntax) 6: Game 7: Miscellaneous (Miscellaneous) 8: Administrative Command (/sbin, /usr/sbin,/usr/local/sbin)
Then we clear the man command to see the Help for the command.
Man COMMAND [Chapter number]
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/43/7B/wKiom1PbR_OizlEPAAFltzXiXi8873.jpg "title=" man " alt= "Wkiom1pbr_oizlepaafltzxixi8873.jpg"/>
Viewing the command manual from man we can obtain the following information:
DESCRIPTION: A detailed description of the command function, which may include the meaning of each option
Options: Explaining the meaning of each option
Files: The configuration file associated with this command
EXAMPLES: Using the example
See ALSO: Another reference
Some related actions when viewing a file:
Flip Screen:
Turn back one screen: SPACE
Turn One screen forward: b
Turn back one line: ENTER
Turn One line forward: K
Find:
/keyword: Looking backwards
N: Next
N: Previous
? KEYWORD: Looking forward
N: Next
N: Previous
Q: Exit
Method Three:
Find help with online documentation
Info COMMAND
Method Four:
Through search engines, such as Google
This article is from the "Small Monk" blog, please be sure to keep this source http://xseng.blog.51cto.com/2513398/1533795