For more information about Linux System Terminal prompt settings-general Linux technology-Linux programming and kernel, see the following. The features of the terminal prompt are defined by the system environment variable ps1. Run ''echo $ ps1' to view the current settings.
The PS1 value is composed of a series of static texts or \ and escape character sequences, such:
PS1 = "\ u @ \ H \ w $"
Useful escape sequences include:
\ E ASCII Escape Character
\ H Host Name
\ H complete host name
\ L terminal device name
\ T in 24-hour format
\ T 12-hour time
\ U User Name
\ W current working directory (absolute path)
\ W current working directory (basename)
\! Location of the current command in the History buffer zone
\ $ If the current user is a super user, insert the character #; otherwise, insert the character $
\ [Appear before the Character Sequence without moving the cursor
\] Appears after non-printable characters
It is annoying to always face the black and white screen. We can set the PS1 variable to make the prompt a color. In PS1, set the Character Sequence color format:
\ [\ E [F; Bm \]
''F'' indicates the font color, ranging from 30 to 30 ~ 37; ''B 'indicates the background color, numbered 40 ~ 47.
You can use ''\ e [0m'' to disable color output. In particular, when B is set to 1, bold text is highlighted.
I think this is enough. It's time to customize it. Now post my settings:
If [$ TERM = 'linux ']; then
Export PS1 = "[\ [\ e [36; 1m \] \ u @ \ h \ [\ e [31; 1m \] \ w \ [\ e [32; 1 MB \]>"
Zhcon -- utf8
Clear
Elif [$ TERM = "xterm"]; then
Export PS1 = "[\ [\ e [31; 1m \] \ w \ e [0 m]>"
Fi
-------------------
(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // blogimg.chinaunix.net/blog/upfile2/080219153551.jpg'); ">
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.