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.