How to add alias commands in Ubuntu

How to…

Use aliases for commands in Ubuntu

I sometimes get tired of typing long commands over and over (for example, to install packages from apt-get) so I looked up how to create aliases (shortcut commands).  If you could type something like “gimme” instead of “sudo apt-get install” it can make life so much sweeter!  This was done using Ubuntu 14.04.

Open .bashrc file for edit

sudo vi ~/etc/.bashrc

Add the following line:

alias yourCommand=’oldCommand’
alias gimme=’sudo apt-get install’

Save and exit



sudo reboot