首页 > 系统服务 > 详细

Linux实现彩色提示符

时间:2015-03-24 01:25:36      阅读:435      评论:0      收藏:0      [点我收藏+]

更改用户目录下的.bashrc

加入:

export PS1=‘\[\e[33m\][\u@\h:\W]\$ \[\e[m\]‘ 

例如:

 1 # .bashrc 
 2  
 3 # User specific aliases and functions 
 4  
 5 alias rm=rm -i 
 6 alias cp=cp -i 
 7 alias mv=mv -i 
 8 export PS1=\[\e[33m\][\u@\h:\W]\$ \[\e[m\] 
 9  
10 # Source global definitions 
11 if [ -f /etc/bashrc ]; then 
12         . /etc/bashrc 
13 fi 
14  
15 # less man page colors 
16 export GROFF_NO_SGR=1 
17 export LESS="FRSXQ" 
18 export LESS_TERMCAP_mb=$\E[01;31m 
19 export LESS_TERMCAP_md=$\E[01;31m 
20 export LESS_TERMCAP_me=$\E[0m 
21 export LESS_TERMCAP_so=$\E[01;44;33m 
22 export LESS_TERMCAP_se=$\E[0m 
23 export LESS_TERMCAP_us=$\E[01;32m 
24 export LESS_TERMCAP_ue=$\E[0m 
25  
26 # grep colors 
27 export GREP_OPTIONS=--color=auto 
28 export GREP_COLOR=1;32 
29  
30 export TERMINFO=/usr/share/terminfo 
31 #export TERM=xterm-256color 33  
34 export HISTIGNORE="&:[bf]g:exit" 
35 export HISTCONTROL=ignoredups 
36 export HISTFILESIZE=10000 
37 export HISTSIZE=10000 
38 export HISTTIMEFORMAT="%F %T " 

 

Linux实现彩色提示符

原文:http://www.cnblogs.com/wenqiushi/p/4361542.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!