Go MAC: Remove the computer name of the terminal default prefix

Source: Internet
Author: User

MAC: Remove the computer name of the terminal default prefix

1, open the terminal input sudo vi/etc/bashrc, prompted to enter the password is the computer's password.

2. Click I to change the edit mode to insert to modify the document, use the # comment ps1= ' \h:\w \u\$ ' and add ps1= ' \w \$ ' at the same time.

#PS1 = ' \h:\w \u\$ '

ps1= ' \w \$ '

3. Save the document, colon +wq+! Enter to complete the modification of the document. (because the document default permission is not allowed to modify, so add an exclamation mark to modify the success)

: wq!

4, exit the terminal and then enter, the prefix computer name is removed, only the $.

Original link: MAC: Remove the computer name of the terminal default prefix

Go MAC: Remove the computer name of the terminal default prefix

Related Article

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.