This post was updated 531 days ago and some of the ideas may be out of date.

刚才用root账户登录终端,终端上显示-bash-4.2 #,不是平常见的root@localhost

原因是root目录下的.bash_profile.bashrc文件丢失

执行以下代码即可:

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