问题描述: Linux下shell显示-bash-4.2$ 不显示用户名@主机名 解决办法 vi ~/.bash_profile 添加一行: export PS1='[\u@\h \W]$' 保存关闭,然后执行: source ~/.bash_profile