Linux PATH variable 1. What is PATH? When a Linux system is started, it interacts with a shell program (possibly bash). This shell program searches for files with the same name in a specified directory path according to the given program name. You can use the searched program. (Such as the terminal program) the specified directory paths are stored in the PATH variable. In other words, the value of the variable PATH is the PATH where the system program is installed. You can run the program in this path without entering the full path. If your application is not in the PATH, you need to execute the full or relative PATH. For example,/home/$ HOME/. out or relative path name, such. /program name (point indicates your current working directory) 2. you can view and modify the environment variable PATH to customize your own PATH to avoid frequent startup of programs located outside the PATH of shell search. 3. PATH default directory (/usr/lib/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin: /sbin:/bin:/usr/games) Where:/bin: Binary directory. Stores the programs used to start the system. /Usr/bin: User binary file. Stores standard programs used by users. /Usr/local/bin: local binary file. Directory for software installation. 4. Modifying the PATH through export is only useful in the current session. If the session is closed, the PATH will be restored. Modify the PATH by editing/etc/profile, which will take effect after the next startup.