Linux Basics--shell Command type and command use Help

Source: Internet
Author: User

Joined the caravan for some time, see the group inside the big head to check the blog, only to realize that I have not written homework. As the saying goes, the time is to kill the Pig knife!!! Cough, actually want to say, horse brother Video is long, content thief, for writing is not good to me, write homework pressure mountain, there are wood. Well, well, long story short, get to the point.

Two weeks past, the course progress is a bit behind, this post mainly records the basic command course knowledge, used to comb the knowledge points and deepen the impression, for the future of the road to build a solid foundation of Linux good start, complete the blog and review the relevant knowledge points, hope to accelerate learning pace, slow, keep up with progress, good Good Study,day Day up!

1. Shell command type:

There are two types of shell commands:

1.1 Built-in command: The shell program itself comes with commands that are part of the shell program;

1.2 External command: There is an executable file corresponding to it in a directory

To differentiate between command types, you can use the following command:

# type command/        * To view the types of commands */  
# which Command/        * View the path where the executable file is located * /

For example:

A. Red line identification result tip: "CD" is a shell built-in command.

650) this.width=650; "Style=" background-image:none; border-right-0px; margin:0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://img1.51cto.com/attachment/201405/13/2784219_ 1399973464hp2m.png "width=" 204 "height=" >

B. Red line identification results tip: The executable file for the command is not found in PATH, $PATH: determines which directories the shell will look for commands or programs.

650) this.width=650; "Style=" background-image:none; border-bottom:0px; border-left:0px; padding-left:0px; padding-right:0px; border-top:0px; border-right:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://img1.51cto.com/attachment/201405/13/2784219_ 1399973464tq6r.png "" 573 "height=" >

C. Red line identification results hint: The executable program of the "Man" command is located at the path, stating "Man" is an external command.

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://img1.51cto.com/attachment/201405/13/2784219_ 1399973467kjgh.png "width=" 218 "height=" >

D. The red line indicates the result: "LS" is an individual name, then use the "which" command, you can know the "LS" command its executable file path.

650) this.width=650; "Style=" background-image:none; border-right-0px; margin:0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://img1.51cto.com/attachment/201405/13/2784219_ 13999734676efw.png "width=" 251 "height=" >

2. Order Help related

2.1 To get command help information, use the following command:

# Help Command/* Only available for use with internal commands */

# Help CD/        * Get instructions for using the internal command "CD" * /

# Man Command/* View the command manual, "man" Full Name "manual", you can use "Whatis command" to obtain the description of the instructions in the chapter information and introduction * *

# Whatis CP/           * command "CP", corresponding help information in the section */
650) this.width=650; "Style=" background-image:none; border-bottom:0px; border-left:0px; margin:0px; padding-left:0px; padding-right:0px;  border-top:0px; border-right:0px; padding-top:0px "title=" image "border=" 0 "alt=" image "src=" http://img1.51cto.com/attachment/201405/13/2784219_ 1399974644ulkb.png "" 394 "height=" >        /* Red Label Description: Chapter (1) is about the "Copy files and directories" Information */                                                      
# man 1p CP/           * Get the Command "CD" in chapter "1p" Information */

# command–help/* Get command Brief use help */

ls --help/        * get a brief use of the command "LS" help * /

2.2 Linux, the "Man" manual, for different commands or configurations of the manual is located in different chapters, the relevant class can be found in the chapter information in the following table:

1. User commands;

2. System call;

3. Library calls;

4. Special documents, equipment files;

5. file format, i.e. configuration file;

6. Games;

7. Miscellaneous;

8. Management class commands;

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.