打开环球变量文件:vim /etc/profile:添加提示符变量:PS1="[\u@\h \W]\$"; 使 profile 文件生效:source /etc/profile效果: 本文转自 Lee_吉 51CTO博客,原文链接:http://blog.51cto.com/12173069/2064881