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 20 times, 1 visits today)