Are you using a Linux machine ? Are you lazy to type in the commands like "sudo apt-get install #package-name" to install software ?? If yes, then read on.
The basic idea is to create a small hack that you can use to get rid of the nasty "sudo apt-get install" (for Debian based operating systems). But that being said this tutorial can be used by other 'non-debian' distro's as well !!
There may be other ways of achieving the same result but the one that I'm using here is through "bash". (You can visit the link to get a good understanding of what bash is and what it is capable of doing).
Why bash ?
- A it comes pre-installed with all Linux-Unix based Operating systems.
- It's really simple to alter the way that you use some of the standard Linux commands.(As you will see shortly).
What tools do I need to install to follow the tutorial ?
- Well if you have a Linux distro that would be all that you would need.
Ok I have a Linux distro what next ?
- Great !!! without further ado lets get hacking :)
Steps involved:-
- Open your file manager. And go to your home folder.(Usually it has the same name as that of the currently logged in user).
- Show hidden files by pressing "ctrl+h". And look for ".bashrc" file.(If you don't have it just create one.)
- Open the .bashrc file in your favorite text editor.
- Scroll down to the section which say "aliases. (If you created the file by your self then just add the following lines).
- Add an alias that you want. In this case we want to make the "sudo apt-get install" shorter, hmmm lets replace all that only by "install".
- Add the following. [alias install = "sudo apt-get install"]. Note do not include the braces.
- Save the file and exit out of it.
- Next we would want to load this setting by default when ever you login or do a fresh boot.
- Going back to your home folder. Create a file and call it ".bash_profile" (Note do not include the inverted commas).
- Open the ".bash_profile" and paste in the following code. "[ -f $HOME/.bashrc ] && . $HOME/.bashrc". (Note do not include the inverted commas).
- Save this file and exit out.
- Open terminal make sure your are in the home path. And source the .bash_profile that you just created by typing the following command in the terminal.
- "source ~/.bash_profile". (Note do not include the inverted commas").
- Add viola your done. Logout and log back in and install new software by typing "install #package_name".