打开终端,键入 vim ~/.bashrc
找到 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
改为 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\W\$'
即是把w改为W
重启终端,OK~
zz from http://cc.ecjtu.net/posts/ubuntu-terminal-relative-path
打开终端,键入 vim ~/.bashrc
找到 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
改为 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\W\$'
即是把w改为W
重启终端,OK~
zz from http://cc.ecjtu.net/posts/ubuntu-terminal-relative-path