1) Go to teminal. open ~/.bashrc
. Add if not exists
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
2) open ~/.bash_aliases
. If not exists: touch ~/.bash_aliases && open ~/.bash_aliases
3) To add new alias rather
- edit .bash_aliases
file and restart terminal or print source ~/.bash_aliases
- print echo "alias clr='clear'" >> ~/.bash_aliases && source ~/.bash_aliases
where your alias is alias clr='clear'
.
4) Add line source ~/.bash_aliases
to ~/.bash_profile
file. It needs to load aliases in each init of terminal.