您的位置:首页 > 运维架构 > Linux

Set terminal text color and transparent background

2015-12-18 17:34 676 查看

text color

1. Edit /home/user/.bashrc

2. Find

if [ "$color_prompt" = yes ]; then

PS1=’${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;31m\]\w\[\033[00m\]\$ ‘

else

PS1=’${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ‘

fi


3. Then uncomment “color_prompt”

4. Update PS1

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[01;31m\]:\[\033[01;35m\]\w\[\033[01;37m\]\$ '


5. Open Terminal show result



transparent background

Edit –>Profile Preference –>Background



Click Transparent background, use mouse to adjust.

Here is effect picture.



REFERENCE

 

编码 颜色/动作

  0 重新设置属性到缺省设置

  1 设置粗体

  2 设置一半亮度(模拟彩色显示器的颜色)

  4 设置下划线(模拟彩色显示器的颜色)

  5 设置闪烁

  7 设置反向图象

  22 设置一般密度

  24 关闭下划线

  25 关闭闪烁

  27 关闭反向图象

  30 设置黑色前景

  31 设置红色前景

  32 设置绿色前景

  33 设置棕色前景

  34 设置蓝色前景

  35 设置紫色前景

  36 设置青色前景

  37 设置白色前景

  38 在缺省的前景颜色上设置下划线

  39 在缺省的前景颜色上关闭下划线

  40 设置黑色背景

  41 设置红色背景

  42 设置绿色背景

  43 设置棕色背景

  44 设置蓝色背景

  45 设置紫色背景

  46 设置青色背景

  47 设置白色背景

  49 设置缺省黑色背景
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  终端 linux ubuntu color text