Connect with us

WEB SOLUTIONS DONE

How to set an environment variable in linux

programming

How to set an environment variable in linux

How to set an environment variable in linux

 

Setting environment variable in linux

export – set an environment variable

2. environment variable Synopsis

export [-fn] [-p] [name[=value]]
3. Examples of setting environment variable in linux

Most common use of export is to export user’s PATH environmental variable. In this example we add /linux/scripts directory to our PATH environmental variable:

PATH=$PATH:/linux/scripts
export PATH

export user's PATH environmental variable

Source taken from http://linuxconfig.org/

More in programming

Advertisement




To Top