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
/bin/bash
[accelrys@master ~]$ echo $SHELL
/bin/csh
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:\.. ..
PATHEXT=.COM;.EXE;.BAT;
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
/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/home/rhel5
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