Linux host name display-bash-4.2

Problem Description

The host name of the server shell interface is displayed as -bash-4.2$, which does not match the set host name

solution

Modify the current user's .bash_profile file and add:
export PS1='[\u@\h \W]$ '
source .bash_profile

Guess you like

Origin blog.csdn.net/weixin_43848079/article/details/110111192