修改PS1变量即可实现
临时修改
export PS1='\[\e[1;32m\][\u@\h \W]\$ \[\e[0m\]'
永久修改
echo "export PS1='\[\e[1;32m\][\u@\h \W]\\$ \[\e[0m\]'" >> /etc/bashrc
标签:命令提示符,centos,绿色,32m,export,PS1,0m From: https://www.cnblogs.com/outsrkem/p/16603254.html
export PS1='\[\e[1;32m\][\u@\h \W]\$ \[\e[0m\]'
echo "export PS1='\[\e[1;32m\][\u@\h \W]\\$ \[\e[0m\]'" >> /etc/bashrc
标签:命令提示符,centos,绿色,32m,export,PS1,0m From: https://www.cnblogs.com/outsrkem/p/16603254.html