Creating Custom Alias Commands in Linux
This tutorial is for Ubuntu users. Creating your own custom commands can free up some typing time, especially if you do a lot of command line work. One of the most common commands on Ubuntu is using the "apt-get" command to download updates/install software. Instead of dialing in "sudo apt-get install application blah blah blah", wouldn't it be easier if there were a shorter command? Let's create some alias's!
Open up your ~/.bashrc file:
Scroll to the bottom and add something like the following:
alias aptup="sudo apt-get update" Now command aptin apache2 is the new custom command to install apache2, for example...
Remember the following convention:
**May need to reboot after editing .bashrc file.
Alias's are not limited to Ubuntu. Depending on your flavor of Linux, you may need to hunt down the bash file. Enjoy!