码迷,mamicode.com
首页 > 其他好文 > 详细

AI centos终端显示-bash-4.2#解决方法

时间:2019-09-10 13:17:35      阅读:100      评论:0      收藏:0      [点我收藏+]

标签:解决方法   ash   root   div   显示   home   pos   bashrc   linux系统   

登录linux系统过后,发现显示的是-bash-4.2# 而不是root@主机名 + 路径的显示方式,发生这种情况的原因是根目录下缺失几个配置文件,从默认配置中拷贝过来就可以解决了:

1 cp /etc/skel/.bashrc /root/
2 cp /etc/skel/.bash_profile  /root/

  如果登录的不是root用户,那么将上面的文件拷贝到登录用户根用户下:为/home/{用户名}目录。

  拷贝完成过后,重新进行登录即可。

AI centos终端显示-bash-4.2#解决方法

标签:解决方法   ash   root   div   显示   home   pos   bashrc   linux系统   

原文地址:https://www.cnblogs.com/LiuhanIT/p/11496635.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!