Linux Environment variable operation command
echo $ Environment variable name
Example ： see PATH
export Command to set or display environment variables .
stay shell When the program is executed in ,shell It provides a set of environment variables .export Can add , Modify or delete environment variables , For subsequent procedures .export The environment variable created by the command only applies to this login operation .
export Variable name = A variable's value
every last bash Script files （*.sh file ） Each has its own independent running process .
export The environment variable added by the command is applied to all users in the current login bash Script .
If you omit “export”, direct “ Variable name = A variable's value ” The grammar of , That's just a local environment variable assignment , This variable only works on the bash Script .