Linux cainiao talks about linux environment variables-general Linux technology-Linux technology and application information. The following is a detailed description. (Author: rendawei636) Environment Variables
In windows, executable files are different from other files by suffix names, such as exe and bat files, as long as you double-click them. This is very different from linux. in linux, the names of executable files and non-executable files are not suffixed with names, it is determined by the attributes of the file and the nature of the file. For example, if you have a driver's license, you are allowed to drive. However, whether you can get on the road or not depends on your own capabilities. In the same way, you cannot get on the road without a license. Therefore, files cannot be executed. Both conditions are required.
To change the file attributes, follow these steps:
(Chmod + x indicates that the attributes of the executable file are to be added. Similarly, chmod-x indicates that the attributes of the executable file are canceled. W write attribute, r read attribute, and other attributes can be viewed through chmod -- help .)
Assume that I have just installed the realplay. rpm package and changed the properties of the realplay file as described above. The installation directory is/home/$ {your own user}/bin. Obviously, it cannot be executed when you enter realplay on the terminal. However, when you type/home/$ {your own user}/bin/realplay, it can be executed. It is normal that you write a long string like this for each video.
Therefore, we have to try to tell shell where realplay is located. How can this problem be solved? As in windows, environment variables are used for setting. However, in linux, we need to modify it through export. The export is as follows:
(Export is to export the variable as its own parameter to the sub-shell.
Example:
There are export2 and export1 files