shell变量

来源:互联网 发布:linux python模块目录 编辑:程序博客网 时间:2024/06/06 20:32
shell变量分为环境变量(全局变量),和局部变量;
环境变量要想永久生效,则可以放在/etc/profile,或 .bash_profile
例如:
①当前用户下生效:
vi .bash_profile


 用 . .bash_profile
检验:echo $OLDBOY
②:全局下面生效
 vi /etc/profile
export OLDBOY='oldboy'
0 0