In Linux the end of the input command, because all are black white paper, always do not know that line is the command of their own input, which is the result of the command.
In the Internet search, the original to modify the/ETC/BASHRC global configuration file or the ~/.BASHRC file.
1.ps1
to modify the Linux terminal command line color, we need to use the PS1,PS1 is an environment variable for Linux end users to describe the command line prompt settings. In the terminal input command: #set, you can find the definition of PS1 in the output as follows: PS1= ' [\[email protected]\h \w]\$ ' PS1 the definition of a commonly used parameter is as follows: \d: #代表日期, formatted as weekday Month date, for example:"Mon 1" \h: #完整的主机名称 \h: #仅取主机的第一个名字 \ t: #显示时间为24小时格式, such as: HH:MM:SS \ t: #显 Display time is 12 hours format \a: #显示时间为24小时格式: hh:mm \u: #当前用户的账号名称 \v: #BASH的版本信息 \w: #完整的工作目录名称 \w: #利用base Name gets the working directory names, so only the last directory is listed \#: #下达的第几个命令 \$: #提示字符, if it is root, the prompt is: #, the average user is : $
2. Color settings
(Source: http://www.cnblogs.com/Robotke1/archive/2013/05/10/3071634.html)
3. My personal ps1:export ps1= "\[\e[31;47m\]\[email protected]\h \ t \[\e[34;47m\]\w \$ \[\e[;m\]"
Note: [\e[31;47m\]\u set the user name (i.e. eblly) of the character and background colors.
Article: http://www.cnblogs.com/Robotke1/archive/2013/05/10/3071634.html
Http://www.cnblogs.com/welen/articles/3493354.html