环境:ubuntu13.04
ubuntu在默认情况下是显示绝对路径的,进入目录过长的时候让人感觉很不舒服,现在修改成只显示当前目录
vim ~/.bashrc
找到这句
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
#PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
PS1="[\u@\h:\W]\\$ "
;;
*)
;;
esac
将红色那句用#注掉,写上绿色那句;
重启终端即可