001、问题,centos7中中用户名和主机名消失,显示-bash-4.2,如下:
-bash-4.2$
002、产生原因
配置文件丢失或意外删除。
003、解决方法1
-bash-4.2$ echo "export PS1='[\u@\h \W]\$'" >> ~/.bash_profile -bash-4.2$ source ~/.bash_profile [liujiaxin01@pc1 ~]$ls [liujiaxin01@pc1 ~]$
004、解决方法2
001、问题,centos7中中用户名和主机名消失,显示-bash-4.2,如下:
-bash-4.2$
002、产生原因
配置文件丢失或意外删除。
003、解决方法1
-bash-4.2$ echo "export PS1='[\u@\h \W]\$'" >> ~/.bash_profile -bash-4.2$ source ~/.bash_profile [liujiaxin01@pc1 ~]$ls [liujiaxin01@pc1 ~]$
004、解决方法2