Linux主机名称显示-bash-4.2

问题描述

服务器shell界面的主机名称显示为-bash-4.2$,与设置的主机名称不符

解决方案

修改当前用户的.bash_profile文件,在其中加入:
export PS1='[\u@\h \W]$ '
source .bash_profile

猜你喜欢

转载自blog.csdn.net/weixin_43848079/article/details/110111192