Environment Variables for Ubuntu

Creating an Environment Variable is as easy as running the following commands:

ENV_VAR="Hello World !"
export ENV_VAR

To examine the value of an Environment Variable run:

printenv ENV_VAR
> Hello World ! 


echo $ENV_VAR
> Hello World !

Finally to remove it execute:

unset ENV_VAR

Leave a Reply

Your email address will not be published. Required fields are marked *