1.为什么会出现这种现象 通常出现-bash-4.2#是因为root/.bashrc 和 root/.bash_profile两个文件的丢失 2.解决 -bash-4.2# cp /etc/skel/.bashrc /root/ -bash-4.2# cp /etc/skel/.bash_profile /root/ 将linux中备份的.bashrc 和.bash_profile两个文件cp到root下。退出当前shell重新登录即可解决问题 加油!方法总比问题多!!!