使用命令vi /etc/bash.bashrc, 将PS1内容修改如下: PS1='/[/e[34;1m/]/t${debian_chroot:+($debian_chroot)}/[/e[32;1m
使用命令vi /etc/bash.bashrc, 将PS1内容修改如下:
PS1='/[/e[34;1m/]/t${debian_chroot:+($debian_chroot)}/[/e[32;1m/][/[/e[33;1m/]/u/[/e[31;1m/]@/[/e[33;1m/]/h /[/e[36;1m/]/w/[/e[32;1m/]]/[/e[34;1m/]/$ /[/e[0m/]'
使用命令vi ~/.bashrc,查找if [ "$color_prompt" = yes ]; then,并按照如下示例修改当前用户PS1内容,试试看吧,很惊奇哦。
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/$ '
PS1='/[/e[34;1m/]/t${debian_chroot:+($debian_chroot)}/[/e[32;1m/][/[/e[33;1m/]/u/[/e[31;1m/]@/[/e[33;1m/]/h /[/e[36;1m/]/w/[/e[32;1m/]]/[/e[34;1m/]/$ /[/e[0m/]'
fi