6 月 162015
 

昨天在配置linux,突然发现root登录的CRT的终端提示符显示的是-bash-4.1# 而不是root@主机名 + 路径的显示方式。搞了半天也不知道为什么出现这种情况。今天终于搞定这个问题,

     原因是root在/root下面的几个配置文件丢失,丢失文件如下:

   1、.bash_profile 

   2、.bashrc

  以上这些文件是每个用户都必备的文件。

   使用以下命令从主默认文件重新拷贝一份配置信息到/root目录下

   cp /etc/skel/.bashrc /root/

   cp /etc/skel/.bash_profile  /root/

  注销root,重新登录就可以恢复正常。

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny