So I recently got a brand new Macbook Pro for Work, but I am coming from a Fedora Machine; which to be honest may seem almost like a downgrade at this point. One thing I noticed is that I hated the look and feel of the stock Mac terminal. It felt really cluttered and at times cumbersome. To make your Mac more like Fedora’s bash do the following:
1) Make a backup of your existing .bash_profile
mv ~/.bash_profile ~/.bash_profile.bak
2) Open a new ~/.bash_profile and enter:
#!/bin/bash
export PS1="[\u@\h \W]$ "
alias ls="ls -G"
alias cp="cp -i"
alias mv="mv -i"
alias rm="rm -i"
3) Optional – Edit your root accounts bash profile as well to have a # instead of the $ (useful to prevent cumbersome mistakes)
#!/bin/bash
export PS1="[\u@\h \W]# "
alias ls="ls -G"
alias cp="cp -i"
alias mv="mv -i"
alias rm="rm -i"
Also add this to your .profile:
if [ -f ~/.bash_profile ]; then
. ~/.bash_profile
fi
Thanks to OSX Daily for the post!
http://osxdaily.com/2006/12/11/how-to-customize-your-terminal-prompt/