在Centos中由root切换普通用户shell显示的是“bash-4.1$,现象如下:
经过查找资料,解决办法如下:
1、打开~/.bash_profile文件:[root@localhost opt]# vim ~/.bash_profile
添加 export PS1='[\u@\h \W]\$'
2、执行source ~/.bash_profile,使其生效
至此,问题解决!
在Centos中由root切换普通用户shell显示的是“bash-4.1$,现象如下:
经过查找资料,解决办法如下:
1、打开~/.bash_profile文件:[root@localhost opt]# vim ~/.bash_profile
添加 export PS1='[\u@\h \W]\$'
2、执行source ~/.bash_profile,使其生效
至此,问题解决!