7. Types of Commands
Contents
Type is a command to view command types. We can look at what types this command can see with the help of the help command:

there are five types
Alias
Alias is a shortcut to commands, such as ll is a simplified version of ls-alF:

the simplified version of ls -alF
Keyword
Shell has some reserved keywords, while is one of them:

these are system defined functions
Function
We can use the declare -F command to get the defined functions.

it is a shell reversed keyword
From the results of the command execution above, we know that quote is a function:

it is a shell reversed keyword
We can also use declare’s synonym to get the function, which is typeset:

these are system defined functions
Builtin
The declare command we use is built into Bash:

it is a bash shell builtin command
File
Some of the commonly used file type commands are mkdir, cp, mv, touch, rm:

commonly used file type commands
We can append the -t parameter behind the type command to get the commands types:

list types by appending the -t parameter
References Type Manual, Alias Command Shell Reserved Words, Shell Functions, Shell Builtin Commands, File Command
If you think the content of this article has helped you, and if you would like some more high-quality materials in the near future, please give me some modest support.
Author Dong Chen
LastMod Fri Feb 8 2019