Change the identifier and color of a Linux switch user

Source: Internet
Author: User
Original, from Amunlinux

Change the default environment identifier for the CentOS operating system,

Before the change:

Normal user is ' $ ' symbol, no variable color display

Super user is ' # ' symbol, no variable color display

After the change:

Only valid for current user

Most all users are in effect

Personally think it is pretty good, removed the original brackets ' [] ', and added a color,


#export ps1= ' \[\e]2;\[email protected]\h\a\]\[\e[01;36m\]\u\[\e[01;35m\]@\[\e[01;32m\]\h\[\e[00m\]:\[\e[01;34m\] \w#\[\e[00m\] '

Default:

Ps1= "[\[email protected]\h:\l \w]\\$"


You can read/ETC/BASHRC's script.




Change the identifier and color of a Linux switch user

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.