if you are interested to contribute your LAB PROGRAM Please send mail to jkumaron@gmail.com

Hot To Set Environmental Variable In Different Bash C Shell

Environmental Variable Seting it will differ depends upon the Bash,
How to find the Current Shell
#cat /etc/passwd | grep accelrys
accelrys:x:504:504:Accelrys Inc:/home/accelrys:/bin/csh
Shell is Command Line Interpreter.
Most of Linux/Unix Shell Have Bourne Shell and C Shell.
[root@master home]# cat /etc/passwd | grep root
root:x:0:0:root:/root:/bin/bash   or
[root@master home]# echo $SHELL
[accelrys@master ~]$ echo $SHELL
Set Environment Variable
export VARIABLE=value # for Bourne, bash, and related shells
setenv VARIABLE value # for csh and related shells
set VARIABLE=value //DOS on Windows
C:\> set p
Path=c:\.. ..
c:\>echo %VARIABLE%

In the all the LInux system PATH it has already variable, Now I will add some other append variable.
#export PATH=$PATH:/home/rhel5/
[root@jkumar ~]# echo $PATH
we can also add through bash_profile.
export dwd=/home/username/download/ add these line to $HOME/.bash_profile
Save and exit
Set Environmental Variable In Different Shell

Related post