bash-4.2$是因为用户模板丢失或者误删除导致的,下面模拟用户模板文件丢失并且恢复过程
[root@localhost ~]# rm -rf /home/hhl/.bash*
[root@localhost ~]# su yasuo
bash-4.2$ exit
exit
[root@localhost ~]# cp /etc/skel/.bash* /home/hhl/
[root@localhost ~]# chown hhl:hhl /home/hhl/.bash*
[root@localhost ~]# su hhl
[hhl@localhost root]$ exit
exit
[root@localhost ~]#