Linux gives us lot of general commands and we have to use a lot many commands to finish a specific task. What if we can create our own command and fire them to do our specific task / repetitive task.
You care create alisa which can contain set of commands. For example each time when I have to check if mongo is running on my box I have to type a big command, how about being creative a publish command with name psm => which means it will ps all process and will figure out the mongo process 😉
alias psm=”ps -eaf | grep mongo”
syntax : alias commandName=“cmd1 ; cmd 2 ; cmd 3”
To persist alais as command forever, save that in .bash_profile
and reload it using command source ~/.bash_profile
# create your own command for session
> unalias prem => will remove the alias for that session, you might want to remove from .bash_profile to remove it permanently.