Ubuntu Terminal shows the path name is too long how to modify?

Source: Internet
Author: User
Tags command line

Ubuntu Terminal shows the path name is too long how to modify? Ubuntu default terminal, after entering many levels of the directory, the previous prompt will show the full path, so that the command line is too long, people feel uncomfortable, now teach you a way to modify the command line to display only the last level of directory name, so it looks good, You can see the full pathname with PWD.

1, find the configuration file for backup first: CP ~/.BASHRC ~/.bashrc-bak, find configuration file modification: VI ~/.BASHRC, Backup is to prevent configuration modification error, you can restore;

2, the following is my/HOME/VAGRANT/.BASHRC, really modified to a line of code, find: Ps1= ' ${debian_chroot:+ ($debian _chroot)}u@h:w$ ', modify the lowercase w to uppercase W save, Do SOURCE/HOME/VAGRANT/.BASHRC or reboot the terminal. You can display both the last level and the current full path.

Note: Be sure to find the correct location for the modification.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.