OSX: Make bash alias

1. Open ~/.bash_profile or create a new one

nano ~/.bash_profile

2. Add new alias to bottom of file

For example i add alias to get my ip address:
alias myip='ipconfig getifaddr en0'

3. Add refresh bash environment on terminal start up

Open terminal's preferences and add source ~/.bash_profile;clear like this:

Restart terminal and try command myip
Now alias will available wherever you open a new terminal or new tab.