登录linux系统过后,发现显示的是-bash-4.2# 而不是root@主机名 + 路径的显示方式,发生这种情况的原因是根目录下缺失几个配置文件,从默认配置中拷贝过来就可以解决了:
1 cp /etc/skel/.bashrc /root/ 2 cp /etc/skel/.bash_profile /root/
如果登录的不是root用户,那么将上面的文件拷贝到登录用户根用户下:为/home/{用户名}目录。
拷贝完成过后,重新进行登录即可。
标签:解决方法 ash root div 显示 home pos bashrc linux系统
原文地址:https://www.cnblogs.com/LiuhanIT/p/11496635.html