Update.sh!

Want to update linux apt and software by typing only one command.
Then here it is,in my case that one command i will be using is update.
If you want to use any other string then just simply replace update by your preferred string.
The commands that will run as an end result of this process will be:
sudo apt-get update 
sudo apt-get upgrade
sudo apt-get dist-upgrade
Now just follow my steps:
1) First create a bash file to run our command in sequence,to do that copy paste this command on your linux:
sudo nano /usr/bin/update.sh
2) Then copy paste these commands on your nano terminal:
#!/bin/bash
sudo apt-get update
sudo apt-get upgrade 
sudo apt-get dist-upgrade
3) Press cntrl-o to save your file,and then cntrl-x to exit.
4) Now perform the last step,add it to your aliases by just copy paste this command to your terminal:
echo alias update="bash update.sh" | tee ~/.bash_aliases
5)Restart your terminal.
And you are done here, Now the only thing left to do is for you to test the command,for that type update from on your terminal,no-matter where you are.

Comments

Post a Comment

Popular posts from this blog

Tic_Tac_Toe