$gedit ~/.bashrc
1.找到"# set a fancy prompt"提示符设置一段,改为形如:
>case "$TERM" in
>...
>*)
>#PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
> PS1='helo_aBiNg:\w\$ ' #customized
> ;;
>esac
重启终端,提示符已改为:"helo_aBiNg:~$".
2.找到"# If this is an xterm set the title to user@host:dir"标题设置一段,改为形如:
>case "$TERM" in
>xterm*|rxvt*)
>#PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
> PROMPT_COMMAND='echo -ne "\033]0;helo_aBiNg@ubuntu\007"' #customized
>...
>esac
重启终端,标题已改为:"helo_aBiNg@ubuntu".
[原创]自定义terminal提示符及标题
-
- 帖子: 1331
- 注册时间: 2006-07-09 12:22
- 来自: 南京
-
- 帖子: 74
- 注册时间: 2006-11-14 10:44
不错
我的
#######################
# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
PS1='Ready for ${debian_chroot:+($debian_chroot)}\u:\w\$ '
# PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
PROMPT_COMMAND='echo -ne "\033]0;${USER} is working in directory: ${PWD/$HOME/~}\007"'
我的
#######################
# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
PS1='Ready for ${debian_chroot:+($debian_chroot)}\u:\w\$ '
# PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
PROMPT_COMMAND='echo -ne "\033]0;${USER} is working in directory: ${PWD/$HOME/~}\007"'