Ubuntu使SSH更美观的小技巧
二胡 发布于 阅读:94
Ubuntu使SSH更美观的小技巧
修改文件 /root/.bashrc
的
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
为
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
#PS1='\[\e[47;30m\][\u@QF \W]\$\[\e[m\] '
else
#PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
PS1='\[\e[47;30m\][\u@PUEH \W]\$\[\e[m\] '
fi
然后在终端输入 . ~/.bashrc
或重启服务器 reboot
即可