Linux Basics seven: Linux command execution

The preferred distinguish built-in commands and external commands:

Built-in commands: shell program comes with command, a system kernel boot command can be used

External commands: command in system PATH variable path

       How to View command is a built-in command or external command:

       type -a cd

Clear cache hash -r list

 

Command execution flow summary: When we execute a command when the process is as follows

1: Check whether the command to use absolute paths of execution

2: Check whether there is a command alias alias

3: Check the command is a command internal or external command

4: If it is an internal Bash commands executed directly, if it is an external command to check whether the HASH list, there is a direct call

5: If the HASH cache does not exist, by PASH path to find the command

6: If the path is not the path of the command is found, an error

Guess you like

Origin www.cnblogs.com/yujianadu/p/12164297.html