让/etc/profile文件修改后立即生效
方法一:
可以使用如下命令:
# . /etc/profile
注意: . 和 /etc/profile 有空格.
方法二:
source /etc/profile
测试生效方法:
用printenv命令显示环境变更更改是否生效
同样适用于:
~/.profile
让/etc/profile文件修改后立即生效
方法一:
可以使用如下命令:
# . /etc/profile
注意: . 和 /etc/profile 有空格.
方法二:
source /etc/profile
测试生效方法:
用printenv命令显示环境变更更改是否生效
同样适用于:
~/.profile