Two classifications of Linux system commands

  

There are many commands under Linux system. These commands can be divided into several types according to different functions. This article will introduce two classifications of Linux system external commands and built-in commands.

1.Linux built-in commands: built-in program from the shell command, the most common are cd, pwd and so on.

Use the type command to see which command the command belongs to, for example:

#type cd

cd is a shell builtin ———— This prompt, indicating that this command is a built-in command

2. Linux external command: itself is a separate executable program file, the command name is the program file name, common ls, mv, ps, etc. .

Search: Search by the path specified in the shell's built-in environment variable PATH;

#echo $PATH

/usr/lib64/qt-3.3/bin :/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/binPATH path

By using which to see where the command is located Path, for example:

#which ps

/bin/ps ————》This command is in the bin directory

The above is the Linux system. The type of command line is introduced. There are many types of Linux command lines, but the main ones are divided into external commands and internal commands.

Copyright © Windows knowledge All Rights Reserved