Ubuntu14.14 modify Environment Variables

Source: Internet
Author: User

Ubuntu14.14 modify Environment Variables
Ubuntu Linux contains two types of environment variables: system environment variables and user environment variables. System environment variables are valid for all system users. USER environment variables are only valid for current users. Modifying user environment variables are usually stored in the following files :~ /. Profile ~ /. Bash_profile or ~. /Bash_login ~ /. Bashrc files are not recommended in versions earlier than Ubuntu 10.0. System environment variables are generally stored in the following files:/etc/environment/etc/profile/etc/bash. bashrc/etc/profile and/etc/bash. bashrc is not recommended in Ubuntu 10.0. If you want to add a PATH to the $ PATH environment variable, you can do the following (modify/etc/profile): $ sudo nano/etc/profile: export PATH = "$ PATH:/my_new_path" you can add multiple specified paths, separated by colons. After the environment variable is changed, it will take effect the next time you log in. If you want to take effect immediately, you can execute the following statement: $ source/etc/profile. Note that, it is best not to set the current path ". /"put in the PATH, which may be subject to unexpected attacks. Other files are modified in a similar way. Note that you do not need to use export to set environment variables for/etc/environment.

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.