Ubuntu system many files and windows are displayed in the form of code, including the terminal user name, if the Ubuntu system can change the terminal user name to red , it is convenient for users to view. This article will introduce the Ubuntu system to change the terminal user name to red.
Since the input leads to a specific symbol distortion, distortion display portion ellipsis, exclamation points show some screen shots
overall operation code and the final image shows the results of flow
Enter "echo $PS1
Display: above
Enter in the personal user folder
Enter gedit ~/.bashrc
Modify these lines of code
if [ “$color_prompt” = yes ]; then
PS1=. . . .
else
PS1==. . .
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
Change to:
# if [ “$color_prompt” = yes ]; then
#PS1=‘$. . . . . . . . . \\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ ’
#els
# PS1=‘$. . . . . . . . . . . . . . . . . . . . . . . \\u@\\h:\\w\\$ ’
# fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
Then add the last line of the file:
(The next line is a screenshot) PS1=‘$. . . . . . . . . . . . . . . . . . \\033[01;31m\\]\\u\\[\\033[00m\\]@\\h:\\w\\$ ’
Exit and save, then source, that is, enter "source ~/." bashrc
in the position of the root file folder inside /root also operate again.
The above is a personal modification.
The following is an online reference: (again, the screenshot below)
customer: PS1=‘$. . . . . . . . . . . . . . . . . . . . . . . \\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ ’
root: PS1=‘$. . . . . . . . . . . . . . . . . . . . . . . \\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ ’
The above is the Ubuntu system to change the terminal user name to red. From the final display, the red terminal user name is still very eye-catching.
Linux system, if you need to prohibit specific ip address access to ensure the secu
Ubuntu 12.04 system boot, the interface stopped in half can not enter the system, showing Checking B
In Linux, using the rz/sz tool to transfer files between Linux and Windows, how do
The ping command in Linux system can be used for network fault diagnosis and check
How do Linux systems use the at/crontab directive?
How to use function to get ns level time under Linux
How to use the Linux cd command?
How to use Autofs to mount files in RHEL5
After Ubuntu 12.04 restarts, Ubuntu is running in low-graphics mode
How to change the jenkins port number on Ubuntu
How to install and use Trickle in Linux
How to mount an external device in a Linux system
The principle of implementing breakpoint resume in Linux
What should I do if there are garbled characters in Linux Chinese characters?
Linux file default permissions and hidden permissions resolution
Linux system settings automatically adjust the screen brightness method
Easily hide all IE windows in one second.
Win7's automatic update prompt "Some settings are managed by your system administrator"
How to unlock this program to the taskbar menu
How to upgrade Win7 Home Edition to win7 Ultimate
What if the xp system comes with a font library? The built-in font library retrieval method
How to quickly deal with Windows7 no sound problem
Win9 native support for digital ink
How to install .NET Framework 3.5
How to make the MSN icon appear on the taskbar tray under the rainforest woodwind win7 system