1 问题:
每次linux开机启动shell,都要输入source ~/.bashrc,配置才会生效。
2解决方法:
(1)shell下输入,编辑.bash_profile文件
vim ~/.bash_profile
(2)在文件内部输入
if test -f .bashrc ; then
source .bashrc
fi
按Esc,输入:wq保存退出vim编辑器
(3)重新启动shell,配置成功。
每次linux开机启动shell,都要输入source ~/.bashrc,配置才会生效。
(1)shell下输入,编辑.bash_profile文件
vim ~/.bash_profile
(2)在文件内部输入
if test -f .bashrc ; then
source .bashrc
fi
按Esc,输入:wq保存退出vim编辑器
(3)重新启动shell,配置成功。