Linux 设置提示符号

放在~/.bashrc文件中
# vim ~/.bashrc
PS1='\[\e[1;32m\][\[\e[0m\]\t \[\e[1;33m\]\u\[\e[36m\]@\h\[\e[1;31m\] \W\[\e[1;32m\]]\[\e[0m\]\$ ' 
# source ~/.bashrc

#默认是:[\u@\h \W]\$

  

posted @ 2022-07-28 16:11  LB_运维技术  阅读(19)  评论(0编辑  收藏  举报