Article Updated: 2020-03-25
Article Directory
A custom command prompt
1, can be modified is that part?
Note: We can customize the background color terminal, transparency. Command Prompt and color.
2, modify the $ PS1 variable
Note 1: We need to modify: ~/.bashrc
the variables shown in the following document FIG.
Note 2: The original variables can be commented out rather than deleted, the need to prevent future recovery.
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u\[\033[00m\]\[\033[01;92m\]@\[\033[00m\]\[\033[01;33m\]\w\[\033[00m\]\[\033[01;34m\]|\[\033[00m\] '
3, $ PS1 variable format
Note 1: wherein the color is fixed in a defined format, as follows:
Note 2: The following code \u
is a user name of the variable, the definition of color on both sides of the frame. *
\[\033[01;31m\]\u\[\033[00m\]
* Note 3: 31 wherein the color is red.
30: Black
31: Red
32: Green
33: Yellow
34: Blue
35: Purple
36: Dark Green
37: White
4, how to change the background color
1, the terminal on the right, open the properties buy custom settings.
2, then you can set the background color and transparency of the
5, change the font
Note: to modify the font, and then modify the number of rows can be faster adjustment window.