Simple bash script to update and upgrade ubuntu in bash.
To make this executable from anywhere by simply typing 'autoupd', follow these steps:
Step 1
Download the file and place it in a folder that it will live permanently, eg ~/scripts
Step 2
Add the filepath to .bashrc
$ nano ~/.bashrc
Scroll to the end and add
export PATH=$PATH:~/scripts/
Apply the changes
source ~/.bashrc
Step 3
Give the script executable rights.
chmod u+x ~/scripts/autoupd
Check the new permissions.
$ ls -l ~/scripts/autoupd
Output should look like:
-rwxrw-r-- 1 user user 697 Oct 8 16:48 autoupd note the x for executable
Success! You should now be able to execute the command autoupd from anywhere