Linux environment variable configuration-general Linux technology-Linux technology and application information. For more information, see the following section. View the names and values of all environment variables: export
Check the environment variable value by name: echo $ environment variable name
Modify the environment variable value: export environment variable name = path
Add some new values after the environment variable: export environment variable name = $ environment variable name: PATH such as: export PATH = $ PATH:/usr/local/bin: /opt/XXX/bin
The preceding methods can only temporarily modify the environment variable value, which disappears after restart. To keep the environment variable value unchanged after restart, you must modify the configuration file.
Vi/etc/profile
Add the export environment variable = path at the end
Adding the program PATH to the environment variable PATH does not need to be added during running :./
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