Completely solve the problem of terminal Path Display in mac

Source: Internet
Author: User


Completely solve the problem of terminal Path Display in mac first look at your prompt display mode, open Terminal, enter www.2cto.com Bash code echo $ PS1 then it will display similar \ h: \ W \ u \ $ is a piece of information, which is used to define the display mode of the prompt. The details are listed below. Bash code cd ~ Open-e. bash_profile will open TextEdit. According to your requirements, enter the Bash code export PS1 = "\ u \ w $" to save and exit. If there is no. bash_profile file, create it. Enter the Bash code cd ~ Touch. bash_profile reference www.2cto.com PS1 content details \ a ASCII Bell character (you can also type \ 007) \ d "Wed Sep 06" format date \ e ASCII escape character (you can also type \ 033) the full name of the \ h Host Name (for example, "mybox") \ H host (for example, "mybox.mydomain.com ") \ j in this shell, the number of processes suspended by ^ Z \ l terminal device name of this shell (such as "ttyp4 ") \ n linefeed \ r carriage return \ s shell Name (for example, "bash") \ t 24-hour time (for example, "23:01:01 ") \ T 12-hour system time (such as "11:01:01") \ @ 12-hour system time with am/pm \ u User Name \ v bash version (such as 2.04) \ V Bash version (including Patch Level )? /Td> \ w current working directory (for example, "/home/drobbins") \ W current working directory "basename" (for example, "drobbins ")\! Position of the current command in the History buffer \ # command number (as long as you type the content, it will accumulate at every prompt) \ $ if you are not a Super User (root ), insert a "$". If you are a super user, a "#" \ xxx is displayed, and a three-digit xxx is inserted (zero is used to replace unused numbers, for example, "\ 007") represents the ASCII character \ backslash \ [this sequence should appear before the Character Sequence without moving the cursor (such as the color escape sequence. It enables bash to correctly calculate the line feed. \] This sequence should appear after the non-printable character sequence.

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.