Home > Article > Operation and Maintenance > How to view linux environment variables
First execute the following command:
[root@zcwyou ~]# echo $PATH
The output content is as follows:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
(Free learning video sharing: linux video tutorial)
If there are two executable files with the same name in two different directories, then the shell will run the directory located in the environment variable included in the PATH, you can use the ¨C2C or ¨C3C command: ¨G0G, the output result is similar to the following:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
If in two different If there are two executable files with the same name in a directory, the shell will run the file located in the first directory in the PATH environment variable.
Related tutorial recommendations: linux tutorial
The above is the detailed content of How to view linux environment variables. For more information, please follow other related articles on the PHP Chinese website!