1.打开默认目录下的bashrc文档: .bashrc
bashrc文档一般在 /home 或者 在 /root 下,我的就在root下面,进入root目录用指令ls -al可以看到
vim .bashrc
2.在文件中(最好在底部)添加文字: source /etc/profile
3.reboot 重启 就可以看到你的profile中的配置生效了
产生该问题的原因分析和记录:
1.bashrc是在系统启动后就会自动运行。
2.profile是在用户登录后才会运行。

1.打开默认目录下的bashrc文档: .bashrc
bashrc文档一般在 /home 或者 在 /root 下,我的就在root下面,进入root目录用指令ls -al可以看到
vim .bashrc
2.在文件中(最好在底部)添加文字: source /etc/profile
3.reboot 重启 就可以看到你的profile中的配置生效了
产生该问题的原因分析和记录:
1.bashrc是在系统启动后就会自动运行。
2.profile是在用户登录后才会运行。