Linux使用root用户登录出现-bash-4.2#
错误现象及原因 现象 原因 /root目录下缺少 .bash_profile 和 .bashrc 解决方案 需要将/etc/skel/.bashrc和/etc/skel/.bash_profile下的这两个文件拷贝到/root/目录下 cp /etc/skel/.bashrc /root/ cp /etc/skel/.bash_profile /root/ 或 在xshell重新登录即可 来源: CSDN 作者: 柒夭夭 链接: https://blog.csdn.net/weixin_41756573/article/details/104031633