bash
export LD_LIBRARY_PATH="../third_party/lib:$LD_LIBRARY_PATH"
csh
setenv LD_LIBRARY_PATH "~/data:$LD_LIBRARY_PATH"
[diego@localhost ~]# env | grep LD_
LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib
env 命令可以列出所有的环境变量
env | grep LD_
LD_LIBRARY_PATH=../third_party/lib:../libs:../third_party/lib:../libs:/usr/local/lib:/usr/local/lib
可以建一个env.csh的文件,里面内容是
cat env.csh
setenv LD_LIBRARY_PATH "../libs:$LD_LIBRARY_PATH"
setenv LD_LIBRARY_PATH "../third_party/lib:$LD_LIBRARY_PATH"
然后source env.csh就可以将env中的设置改变到环境中。
增加path路径
set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin $ZOOKEEPER_HOME/bin ~/tools/ /usr/local/go/bin)
set path=( /usr/local/go/bin $path)