Echo HOME tmp

If you now type the cd command (cd is change directory; when you run cd on its own, it changes to your home directory), you will find that you are directed to /tmp.

Note that when you want to get the value of an environment variable, you need to use a dollar sign before it, as in $HOME, but when you want to set or export the value, you use the name of the variable itself.

The PATH environment variable is a colon-separated list of directories that the shell searches in order when looking for a command that you have executed.

Was this article helpful?

0 0

Post a comment