ubuntu Terminal 修改不显示全路径

vi .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"
    ;;
*)
    ;;
esac

将红色字体修改为PS1="[\u@\h:\W]\\$ ",即可。

重启terminal后生效。

你可能感兴趣的:(ubuntu,Terminal)