top of page

Automating Kali Linux Updates With (Bash Scripting)

What type of hacker has got time to run 3 or 4 Linux commands before their tea break hey? Not a good one I would say, so let's automate the tedious time consuming task of updating Kali Linux with 1 simple Bash script:



I created the script in everyones favourite text editor, Nano.


#! /bin/bash

echo "Welcome to the Kali auto updater script, stand by..." Displays a welcome message


sudo apt update -y Update package list and use the -y flag to prevent user question


sudo apt upgrade -y Auto upgrade packages


sudo apt autoremove -y Auto clean up any unnecessary packages


sudo apt clean -y Clean package cache


echo "Final message" to inform the user the job has been completed



After writing the script we need to close Nano and save and then change the files permissions so we can execute it:


$ chmod +x kaliupdatev2.sh


Now we can run the script and watch the magic happen !


$ ./kaliupdatev2.sh



So now in future all Kali updates will be automated using that one command with zero user input after :)


Once the updates have been completed we are advised to go and get a beer! Which is exactly what I am going to do right now!




242 views
bottom of page