发生这种原因可能是/root/目录下缺少了几个配置 .bashrc 和 .bash_profile
/root/
.bashrc
.bash_profile
进入/etc/skel/ 目录下
/etc/skel/
将.bashrc 和 .bash_profile复制到/root/目录下 1. cp /etc/skel/.bashrc /root/ 2. cp /etc/skel/.bash_profile /root/
cp /etc/skel/.bashrc /root/
cp /etc/skel/.bash_profile /root/
在/root/目录下可以看到
reboot 或重新连接后即可恢复
reboot
参考文献
https://www.cnblogs.com/origalom/p/8444382.html