monetization

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


Enjoyed that? Check These Posts Out

Learning Linux: How To Find What Version Of Linux You're Running - Command uname and lsb_release

Learn Linux: How to Install and configure ftp with proftpd

Learn Linux: Environmental Variables Cheatsheet

Learn Linux: User Management with adduser, usermod and addgroup

...
monetization

Article Comments

Let us know your thoughts below by adding a quick comment!

Leave A Comment