7. Types of Linux 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:
Alias
Alias is a shortcut to commands, such as ll is a simplified version of ls -l:
Keyword
Shell has some reserved keywords, while is one of them:
Function
We can use the declare -F command to get the defined functions.
From the results of the command execution above, we know that quote is a function:
We can also use declare’s synonym to get the function, which is typeset:
Builtin
The declare command we use is built into Bash:
File
Some of the commonly used file type commands are mkdir, cp, mv, touch, rm:
We can append the -t parameter behind the type command to get the commands types:
References Type Manual, Alias Command Shell Reserved Words, Shell Functions, Shell Builtin Commands, File Command
Author Dong Chen
LastMod Fri Feb 8 2019