-   Fedora (
-   -   Setting and getting environment variables??? (

Sulman Shah 12-13-2006 10:59 AM

Setting and getting environment variables???
Dear All,

I am new to linux and just want to know that how many different types of environment variables are there in linux. How do we set and get their values? How will we the environment path of a library to a different one? i mean to say how can we change it?

--Kind regards,

fordeck 12-13-2006 11:17 AM

You can for example use:


Will print the environment variables


export VARNAME=varvalue
Can be used to set an environment variable

chrism01 12-13-2006 06:33 PM

Other cmds are:
both will show env vars.
Incidentally, 'export' is only required if you want the value to be passed down to sub-shells of the assigning shell.
Otherwise, simple assignment is sufficient.

All times are GMT -5. The time now is 03:10 PM.