Linux terminal settings display only the current directory and the terminal beautification

Source: Internet
Author: User

1. Show only Current directory

Vim ~/.BASHRC

Find Location:

if " $color _prompt "  Then     PS1=      ' Else PS1 = ' ' fi

Replace the two lowercase w with the upper case W, then source ~/.BASHRC


2. Terminal color beautification

Vim ~/.BASHRC then this line of comment is removed, open the switch of this variable, you can use the color command line prompt

# Force_color_prompt=yes

The effect of turning off Force_color_prompt is as follows:

And the effect after opening is as follows:

In addition, you can customize PS1 colors and other information, such as:

if " $color _prompt "  Then     PS1=''

The effect is as follows:

For more settings, refer to the following link:

Output color text http://www.linuxidc.com/Linux/2011-08/41473.htm under Linux terminal
Output of colors under Linux Terminal [text] http://www.linuxidc.com/Linux/2009-03/18792.htm
Ubuntu Linux Terminal Landscaping http://www.linuxidc.com/Linux/2012-07/65520.htm

Linux terminal settings display only the current directory and the terminal beautification

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.