xshell终端设置主机名和用户名颜色 在~/.bashrc文件中追加以下内容: PS1='[[ 33[01;32m]u@h[ 33[00m]:[ 33[01;34m]w[ 33[00m]]$ ' 保存之后运行source .bashrc命令生效。