Linux Command type
1. Linux built-in commands: commands provided by shell programs. The most common Commands include cd and pwd.
You can use the type command to view which command belongs, for example:
# Type cd
Cd is a shell builtin ----> if you see this prompt, it indicates that this command is a built-in command.
2. Linux External commands: they are an independent executable program file. The command name is the program file name. Common Commands include ls, mv, and ps.
Search Method: Use the PATH specified in the built-in environment variable PATH of shell to search;
# Echo $ PATH
/Usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin: /root/binPATH
Use which to view the path of the command, for example:
# Which ps
/Bin/ps ----> indicates that this command is in the bin directory.
This article permanently updates the link address: