Bash inside the variable PS1 is the user's usual prompt, the system defaults to [[email protected] working directory]$. For more information about PS1, see: http://www.cnblogs.com/starspace/archive/2009/ 02/21/1395382.html
In the article, it is introduced that the PS1 modification is required to be written to the ~/.bash_profile in the restart, but this is for the login shell (that is, the various TTY terminal interfaces, etc.), for the nonlogin of the command-line terminal that enters the Xwindow boot. The shell doesn't work, because the read profile process is different between the two terminals (from the bird's private dish)
Nonlogin Shell is only read ~/. BASHRC, so the settings for PS1 should be placed in this file, as follows: Add at the end of the file:
ps1= "\[\e[36m\][\[email protected]\h \w #\#] $ \[\e[m\]"
Export PS1
and then save
Enter source ~/.BASHRC (. ~/.bashrc) in the terminal to make the changes take effect immediately
It can be seen similar to the following effects:
The structure color of the font has changed