打开环球变量文件:vim /etc/profile:
添加提示符变量: PS1="[\u@\h \W]\$";
使 profile 文件生效:source /etc/profile
效果:
修改 linux 终端的提示字符
来源: http://www.bubuko.com/infodetail-2474234.html