Learn Linux: Environmental Variables Cheatsheet

Want to learn more about Environmental Variables? Check out our guide on How to set environmental variables and what are they

To see your environmental variables, type the following command:

env

To see the value of an individual variable, use echo:

echo $VARIABLE_NAME

To create a new environmental variable for the current session:

export VARIABLE_NAME=Value

To destroy a variable, use unset:

unset VARIABLE_NAME

Store environmental variables in the following file to make them persistant (remain after closing the session):

/etc/profile
(Visited 24 times, 1 visits today)
By | 2016-07-05T13:10:32+00:00 July 5th, 2016|Cheatsheet, Linux, Tutorials|0 Comments

Leave A Comment

Show Buttons
Hide Buttons