How to customise your shell prompt
By default, the shell prompt on Mac OS X is somewhat cluttered so I customised it to be nice and minimalistic.
-
Open your terminal
-
Open your bash profile:
vim .bash_profile
-
In your bash profile file, add the following on a new line:
export PS1="\$ \w: "
.\w
gives the Current working directory. If you are not root,\$
inserts a$
. If you are logged in as root, you get a#
. -
Logout from your Mac’s user session and log back in.
-
Open Terminal.
And voilà!
More on how to further customise your shell prompt.