linux修改主机与用户名颜色
~/.bashrc中添加如下代码:
PS1='\[\e[1;36;40m\][\[\e[1;36;40m\]\u\[\e[1;36;40m\]@\[\e[1;36;40m\]\h \[\e[1;36;40m\]\W\[\e[1;36;40m\]]\[\e[1;36;40m\]# \[\e[0;37;40m\]'
含义参考:https://www.cnblogs.com/sinsenliu/p/17532548.html
说明:root用户与普通用户需要分别在~/.bashrc中配置