用户状态bash-4.2$

登录用户后,状态显示为bash-4.2$。

查看了用户家目录,其存在;初步判断问题是用户环境配置文件出了问题。

解决:用户环境配置文件存储在/etc/skel,将其目录下的文件拷贝到问题用户的家目录里。

[root@localhost users]# cp /etc/skel/.bash_logout renyi/

cp:是否覆盖"renyi/.bash_logout"? yes

[root@localhost users]# cp /etc/skel/.bash_profile renyi/

cp:是否覆盖"renyi/.bash_profile"? yes

[root@localhost users]# cp /etc/skel/.bashrc renyi/

cp:是否覆盖"renyi/.bashrc"? yes

再次切换到问题用户renyi,登录后,状态正常,不再显示bash-4.2$。

结束。

原文地址:https://www.cnblogs.com/liusingbon/p/14430226.html