Linux cainiao about linux environment variables

Source: Internet
Author: User
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
QUOTE:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.