2021.12.16
最近安装mysql,cmake,可能是修改了 ~ /.bash_profie 配置文件,导致每次登录服务器都需要source ~/.bashrc以激活环境变量,才可以执行如ls
等的基本操作
解决:
vi ~ /.bash_profie
查看是否有以下代码,加入代码后如下所示:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ] ; then
source .bashrc
fi
source ~/.bash_profile
关闭Xshell, 重新打开一个窗口,发现问题已解决。