方法一:
1.在新建用户的~目录下新建或者更改.bash_profile;这个过程中可能需要root用户来新建或者修改
2.在.bash_profile中添加以下内容:export PS1='[\u@\h \W]\$'
3.在新建用户下运行一下命令:source ~/.bash_profile
方法二:
管理员权限下,修改全局配置文件/etc/profile
添加如下代码
---------------------------
#user&hostname
export PS1='[\u@\h \W]\$'
export PS1='[\u@\h \W]\$'
----------------------------