Linux常用命令06设置环境变量

设置环境变量,主要看你用的shell是哪一种:

echo $SHELL

比如我们要把/usr/xbin路径,添加到当前用户的PATH中去:
sh:
~/.shrc

PATH=${PATH}:/usr/xbin
export PATH

bash:
~/.bashrc

export PATH=${PATH}:/usr/xbin

csh,tcsh:
~/.cshrc,~/.tcshrc

set path=($path /usr/xbin)

Comments are closed.