首页 / 操作系统 / Linux / 如何修改Ubuntu终端用户名颜色修改为红色
Linux操作系统:Ubuntu 14.04由于输入特定符号会导致乱码,乱码部分用.............显示,有些截图显示!!!!!!!!整个操作代码流程图片和最终显示结果输入>echo $PS1显示:如上图在个人用户文件夹输入输入gedit ~/.bashrc修改这几行代码if [ "$color_prompt" = yes ]; thenPS1=....elsePS1==...fiunset color_prompt force_color_prompt# If this is an xterm set the title to user@host:dir重改为:# if [ "$color_prompt" = yes ]; then#PS1="$..........[ 33[01;32m]u@h[ 33[00m]:[ 33[01;34m]w[ 33[00m]$ "# else# PS1="$........................u@h:w$ "# fiunset color_prompt force_color_prompt# If this is an xterm set the title to user@host:dir然后再文件的末尾一行加上:(下一行是截图)PS1="$................... 33[01;31m]u[ 33[00m]@h:w$ "保存后退出,然后source一下,也就是输入>source ~/.bashrc在root文件夹里面位置 /root也同样操作一遍。以上是我个人的修改。以下是网上的参考:(再下面是截图)customer: PS1="$........................[ 33[01;32m]u@h[ 33[00m]:[ 33[01;34m]w[ 33[00m]$ "root: PS1="$........................[ 33[01;32m]u@h[ 33[00m]:[ 33[01;34m]w[ 33[00m]$ "更多Ubuntu相关信息见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2本文永久更新链接地址