/etc/profile 和 ~/.bashrc 或者直接在用户的.bash_profile中添加

export PS1="[/u@/h /`pwd/`]$"

或export PS1='[\u@\h \W]\$'

为机器名着色 

PS1='\[\033[1m\033[31m\][Machine_name]\[\033[0m\]\u@\h \W\$ '