centos7 更改主机颜色

# 在`/etc/profile`的最后一行加入下面其中一行代码,两行代码代表两种配色
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
# or 
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

# source /etc/profile 更新环境变量
posted @ 2021-03-12 16:10  yhsmer  阅读(295)  评论(0编辑  收藏  举报