Edit Mac Terminal Prompt
As you SSH around different devices running varying operating systems and shells you see quite a variety of shell prompts. I’ve decided that my prompt should give me the username and host of the machine I am trying to connect to, as well as the full path of the working directory. This way the prompt is always ready to be copied for an scp
argument. I’ve decided that I want to standardize my prompts with this information, and it’s pretty easy to do.
Open ~/.profile
in vim
or nano
and add
export PS1="\u@\h:\w $ "
to the end of the file. That’s it.
For more information on customizing your terminal prompts system wide check out this page at osxdaily.com.