Quantcast
Channel: Linux by Examples » echo
Viewing all articles
Browse latest Browse all 6

Setting Environment Variable

$
0
0

You may wonder how you knowing the hostname or machine type you are log in. Actually we have a lot way to do so, one of them is print out the environment variable set. How we can set this variable? export is the command used in bash shell, example:

export VARIABLE_NAME="any data you want to put in"

to display the variable set, echo can be use to display it:

echo $VARIABLE_NAME

To print out environment variable using ‘echo’, ‘$’ (dollar sign) must put in front of the variable name.


Viewing all articles
Browse latest Browse all 6

Trending Articles