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.