Before learning to tell yourself to write a summary every day, but the first two days have forgotten. Let's start today .... Are their own understanding, some concepts are not very accurate, do not delve into.
I. What is an environment variable
is the parameter that exists when the system is running, and is a global variable.
II. Classification of environmental variables
According to the life cycle division, divided into permanent, temporary two kinds. Permanent is written to the configuration file and will not be lost because of shutdown or restart.
Iii. Commands for Environment variables
Describes the following two commands
PRINTENV: Displays environment variables, all displayed.
Echo: Displays the value of an environment variable. Note that the environment variable name requires a ' $ ' to indicate a variable, otherwise it is a normal echo string.
Iv. setting of environment variables
Three ways to set environment variables
Export to set temporary
Modify/ect/profile to set all users '
Modify the home directory/.bash_profile to set the user's environment variables.
Where, except for the first one, it is permanently in effect, it is necessary to run [source Config file] immediately after Setup.
Linux Learning-Environment variables