如何修改Ubuntu终端用户名颜色修改为红色
答案:1 悬赏:0
解决时间 2021-02-28 09:02
- 提问者网友:一抹荒凉废墟
- 2021-02-28 01:27
如何修改Ubuntu终端用户名颜色修改为红色
最佳答案
- 二级知识专家网友:几近狂妄
- 2021-02-28 02:30
输入gedit ~/.bashrc
修改这几行代码
if [ "$color_prompt" = yes ]; then
PS1=....
else
PS1==...
fi
unset 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$ '
# fi
unset 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
修改这几行代码
if [ "$color_prompt" = yes ]; then
PS1=....
else
PS1==...
fi
unset 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$ '
# fi
unset 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
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯