ubuntu12.04 命令提示符很长修改

来源:互联网 发布:js base64解码png图片 编辑:程序博客网 时间:2024/04/30 04:31

1、cd ~目录下

2、Vim .bashrc

3、

if [ "$color_prompt" = yes ]; then
    #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\[\033[01;34m\]\W\[\033[00m\]\$ '
else
    #PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
    PS1='${debian_chroot:+($debian_chroot)}\u@\W\$ '
fi



xterm*|rxvt*)
    #PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\W\a\]$PS1"
    ;;
*)

4、source .bashrc



注意:绿色w为大写的W
0 0
原创粉丝点击