Linux community (LinuxIDC.com) Today I will share with you a few small code for the beautification of the UbuntuLinux terminal. First look at the effect: I don't know if you like it or not. The Code is as follows: PS1 = "example-[\ d] [\ u @ \ h: \ w] \ n example-& gt: PS1 = "\ [\ 033 [0; 32m \] \ A \ [\ 033 [0; 31m \] \ u \ [\ 033 [0; 34m \] @ \ [\ 033 [0; 35m \] \ h \ [\ 033 [
Linux community (LinuxIDC.com) Today I will share with you some small code for the beautification of Ubuntu Linux terminals. First look at the effect:
I don't know if you like it or not. The Code is as follows:
PS1 = "─ ── [\ d] [\ u @ \ h: \ w] \ n └ ──>"
In this Code:
PS1 = "\ [\ 033 [0; 32m \] \ A \ [\ 033 [0; 31m \] \ u \ [\ 033 [0; 34m \] @ \ [\ 033 [0; 35m \] \ h \ [\ 033 [0; 34m \]: \ [\ 033 [00; 36m \] \ W \ [\ 033 [0; 33m \] $ \ [\ 033 [0m \]"
The screen is as follows:
You can directly paste the code to the terminal and execute it as I did, so that you can temporarily modify it. Find a satisfactory method to modify it as follows:
Sudo gedit ~ /. Bashrc
Paste the desired one to the end and save it. See
Restart the terminal or execute .~ /. Bashrc (note that there is a point at the top ).
There are several other codes:
PS1 = "\ [\ 033 [0; 32m \] ┌ ┼ ── \[ \ 033 [0m \ 033 [0; 32m \] \ u \ [\ 033 [0m \] @ \ [\ 033 [0; 36m \] \ h \ [\ 033 [0m \ 033 [0; 32m \]-Zookeeper-\ [\ 033 [0m \] \ t \ d \ [\ 033 [0; 32m \]-Zookeeper-\ [\ 033 [0; 31m \] \ w \ [\ 033 [0; 32m \]-bytes \ n \ [\ 033 [0; 32m \] zookeeper \ [\ 033 [0m \ 033 [0; 32m \] \ $ \ [\ 033 [0m \ 033 [0; 32m \]-bytes \ [\ 033 [0m \]"
PS1 = "\ [\ e [0; 1m \] ┌ ── (\ [\ e [31; 1m \] \ u \ [\ e [0; 1m \]) -(\ [\ e [36; 1m \] \ w \ [\ e [0; 1m \]) \ n ── else \ [\ e [0m \]"
Additional reading:Color characters: customized Ubuntu Linux terminalHttp://www.linuxidc.com/Linux/2009-11/22757.htm