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

Source: Internet
Author: User
Tags backup

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.

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.