1) . Add aliases directly in your ~/.bashrc file
For example. append these line to ~/.bashrc file
alias ll='ls -l' alias rm='rm -i'Next time when you type rm the rm -i command will be executed.
2). The second method lets you make a separate aliases file, so you won't have to put them in .bashrc, but to a file of your choice. First, edit your ~/.bashrc file and add or uncomment the following lines, if it is not already
if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fiSave it and close the file. After that, all you have to do is create a ~/.bash_aliases file and add your aliases there, with the same format specified in the first method.
Contents of my ~/.bash_aliases file: