How To Update Kali Linux [VirtualBox, VMware & USB]

If you are looking for a detailed guide on how to update kali linux, you came to the right place! In this detailed step by step guide, we will review the common steps you should take to update kali Linux as well as updating the repository. In addition, we will provide a specific guide on how to update kali Linux in Virtualbox.

As always remember it’s quite easy to upgrade to the latest released version. The latest operating systems will always come with new attractive features and have previous bugs fixed. You should know where to find a cto which can easily help your online business and do most of the IT work for you

How to Update Kali Linux in VirtualBox

In 2020, Kali’s latest version has been introduced by the makers. This is the second version so far in this year. This second version has lots of features. It provides xcfe, gnome, and KDE plasma themes. Moreover, login screen has improved too. You can install Powershell during installation process. The release has also replace CherryTree with Joplin. Let us now have a simple process to install Kali on Virtualbox.

First you need to download virtualbox image of Kali system. The same can be performed in any framework but we are discussing here the kali update in Oracle virtualbox 6.

  • After having ova file, you can now open virtualbox. Go to File->import appliance. You can access the same using keyboard shortcut CTRL+I
  • Browse for OVA file now, which you have downloaded recently
  • After selecting OVA file, click “Next”
  • If any changes are needed for VM settings like RAM, HD etc, you can do them here or you can leave them default if needed
  • Click “Import”
  • Now, click “Agree” for software license agreement. This starts importing process
  • After you are done importing, start the machine now
  • You will now get login screen
  • You should now login using the credentials kali:kali. They are set mostly as defaults
  • Finally; you can see Kali’s final interface on VM

How to Update Kali Linux Repository

Here, we are going to discuss update Kali Linux’s network repositories. 

  1. Before you start, please don’t forget to take machine’s backup. You should also set it up on latest version. Do this by below-mentioned command.

sudo apt-get update

  1. Now, you can upgrade the downloaded update (from previous command) by:

sudo apt-get upgrade

  1. Now, you are ready to start inputting or updating the repositories
  2. First make sure that you are having all the files where you will be adding/deleting/modifying repositories. This is only required if you are performing fresh Kali Linux installation.
  3. You can find these files by simple below-mentioned command 

sudo -i

  1. The command mentioned above will be having all admin and root user rights. You should open the file containing standard repositories
  2. /etc/apt/sources.list is the one where you can find them. You can make the best use of any text editor to open them. Most commonly used one is Leafpad but it is up to you. Command with leafpad will be like:

leafpad /etc/apt/sources.list

  1. After that, file be opened with standard repositories. 

“deb-src http://http://kali.org/kali kali-rolling main non-free contrib”

“deb http://http://kali.org/kali kali-rolling main non-free contrib”

“deb-src http://http://kali.org/kali kali-last-snapshot main non-free contrib”

“deb-src http://http://kali.org/kali kali-experimental main non-free contrib”

  1. After you find them all (from step 8), you can leave them as they are.  Below that, you can add new repositories. You can also delete all of them and put new (it’s up to you)

 

  1. After modifying and adding your ones, you need to reboot your machine and update the same. This will let your system run smoothly. For restarting, you can use the below command

shutdown -r +5

  1. The above command means that PC will restart in 5 minutes and you better need to save your work

 

  1. Rebooting can also be done by the following:

systemctl reboot

How to Update Kali Linux in VMware

No doubt, it is recommended to perform updates if new version releases. This is because the new versions always comprise of new features, better performance, fast results, enhanced security, and necessary improvements. As we already know that Kali Linux can be updated to latest version through Terminal. You better should take necessary backups before making any updates. 

If you are using Kali on VMware virtualization program, you can have a new snapshot for better system backups. let us discuss in this piece of content about updating steps for Kali Linux on VMware machines.

Let us have a quick look on the steps below.

Step 1 – Find Current System Version

This is for sure the first step where you at first take complete backup. After that, you run Kali OS and turn on the terminal on the desktop.

You should first find current system version. This can be accomplished by using the following command:

cat /etc/os-release

Step 2 – Check Your Repository List

After finishing previous step, you can now check your repository list. This is a PRE-REQUISITE and system update can’t really take place without completing this step.

You need to run the below-mentioned command to make things work.

cat /etc/apt/sources.list

The above-mentioned command will provide you with all addresses, which are not having # character. There can be a possibility where no repository address is present. For this purpose, you need to run the following command where you can open and edit Kali Sources List manually by yourself.

nano /etc/apt/sources.list

You can now add customized below-given address to your sources list and then press CTRL+X / Y / Enter for saving the same.

deb https://http://kali.org/kali kali-rolling main non-free contrib

Step 3 – Update Application Packs

After repository configuration, run this command.

apt-get update

This command will not update system versions but brings only packages and applications currently installed on the system. Simply, it checks and saves new versions (if there are any).

Step 4 – Update LINUX

When the new version for Linux is released, it provides users with the best experience including major bug-fixes, enhanced security, and updated applications. For updating Linux, run the same command mentioned in previous step on terminal. 

If you want full system upgrades, you can use full-upgrade command on the terminal.

After verifying the smooth internet connection, you can update Kali Linux by using below command.

apt-get update && apt-get -y full-upgrade

apt-get upgrade actually updates entire system to new one but full-upgrade command performs system upgrades to latest beta versions.

Step 5 – System Reboot

After you are done installing latest Kali Linux version, you should now reboot the system. You need to run the following command for rebooting purposes.

shutdown -r now

This will reboot your system and verify Kali version after restarting.

How to Update Kali Linux by Live USB Method

Kali Linux “LIVE” provides users with the two best options. First includes data preservation on Kali LIVE USB and other across Kali Live reboots. This is really beneficial in most of the cases and helps retaining documents and data, keep testing results and configurations safe. When running Kali “Live”  from USB even across different systems, it works like a charm.

Data is stored on USB, which can be made encrypted too.

Let  us assume you are the root user and user USB drive is /dev/sdb. Moreover, your USB capacity is 8 GB minimum where Kali takes 3 GB space and 4 GB empty partition will be created to preserve data.

The system lets us create new partition and puts ext3 FS on it creating a persistence.conf file on new one.

  1. First step you have to follow is about imaging the Kali Linux ISO to USB
  2. Secondly, Let’s assume the partition names as sdb1 and sdb2. You can check partitions by the command fdisk -l.

It is better if you create and format any additional partitions on USB. First, create new one in empty space above Kali partitions. This will be done by using the command gparted, which will read ISO. You need to shrink that block to only adjust itself for Kali Live partition.

end=7GiB

read start_ < <(du -bcm kali-linux-2020.3-live-amd64.iso | tail -1); echo $start 

parted /dev/sdb mkpart primary ${start}MiB $end

 

The command above will advice you that exact start value can’t be used. When parted is done, new partition will exist in sdb3 and can be verified using fdisk.

  1. Thirdly, you have to create ext3 file system and name it as persistence

You can create mount point where you can mount new partition and then you can make configuration file for enabling persistence. After that, you can unmount the partition.

Commands are:

mkdir -p /mnt/my_usb

mount /dev/sdb3 /mnt/my_usb

echo “/ union” > /mt/my_usb/persistence.conf

unmount /dev/sdb3

In this step, you can also apply LUKS encryption if needed. You will get warning about data i.e. it will be overridden.  You can type Yes if you really are sure about that. You can enter now your selected paraphrase and remember it for future use. If you forget this, your  data will remain persistent but unusable

  1. Fourthly, you can now close encrypted channels

Apply the following.

cryptsetup luksClose /dev/mapper/my_usb

That is it. You can now plug your USB to have persistent features and can bootup Kali Live. Just make sure that your BIOS settings are set to boot from USB mode to make things work.

When kali Linux screen appears, you should choose persistent option, which you have setup on USB wither normal or encrypted.

We have discussed the ways we can up[date Kali Linux but these are not limited. It is up to you how you make the best use of OS. Kali Linux is used by various businessmen worldwide and provides lots of features to the valuable users. It provides ext3 extension and there is no exe file virus issues in the same too. 

 System management plus disk management process is also perfect and directory listing has been made user-friendly. Why updating Kali Linux is important; let us have a quick look

  • Fantastic system for penetration testing and security evaluations and comprise of all necessary security tools
  • Update is needed for latest features and building tools
  • Frequent updates outweigh drawbacks
  • Keep you informed about issues (if there are any)
  • You can save yourself from ethical hacking plus any illegal connections
  • Testing is made easy
  • Provides free LINUX tools in latest upgrades
  • Kali is open source and can be accessed by users. Constant updates make it more worthy
  • Better support and security enhancements are available for latest versions with numerous features

Incredible Features to Expect in Kali Linux 2020.1 Release

What are some of the best features or tools that push you to have your Kali Linux updated to the latest version? Well, here are some of the hot features you should be expecting:

  • A change from GNOME to Xfce. The default DE is currently Xfce. You are also free to choose either KDE or Gnome and several others during installation.
  • Theme Adjustments. You should also expect new themes for GNOME. Light and dark.
  • Non-Root by default. You can alter a standard user account during installation to log in to live image boot by using Kali/Kali credentials.
  • Kali-Undercover. Kali undercover is now more similar to Windows to ease things.
  • Kali single installer image.  This is now a combined and simplified offline installation. It comprises of all default package selections. You will find XFCE, KDE GNOME, and many others. 
  • Python 2 terminated. Tools relying on python two are removed.
  • New Tools. They include Splinter, Sherlock, email harvester, phpggc, and cloud-enum.

How to Update Kali Linux Using a combination of two commands

Updating your Kali Linux is one of the most manageable tasks to undertake. The commands that we’ll use to update Kali Linux are apt update and apt upgrade.

Solution: The most recommended the easiest solution

We are only going to use one solution that will be very easy to understand and help you update your Kali Linux immediately. We will then discuss this solution into detail so that you know every part of it.

Here are the only steps you need to follow:

  • Start your Kali Linux and Open the terminal.
  • Type this single command:

apt update && apt upgrade -y

All You Need To Know About Kali Linux Update Single Line Command

Kali Linux and Ubuntu are Debian based. This means that the two are more similar. Both Kali Linux and Ubuntu use Debian’s package management system ‘apt.’

You can only use the apt command whenever you want to install, uninstall, or update packages such as your system software. This certifies apt command to be named a package manager.

Back to our case, we combined two commands using the ‘&&’ option and ‘update’ and ‘upgrade.’ Using these options will leave many confused thus, there is a need to explain it into detail. Here are what you need to know:

apt update

This command will only refresh all the repositories available in your system. The check will be mainly to target any available new package from Kali Linux servers. It would be best if you kept in mind that this command neither installs nor updates any available package but only finds the information about the packages.

apt upgrade

This is the command that will update your system. Immediately you will run this command in your computer, and your system will begin downloading package updates. Upon completion, it will then upgrade them to their latest versions.

apt update && apt upgrade –y

Using the ‘&&’ will save you the time from typing the commands after another. The commands will run automatically when the first command completes.

Are you mind-boggling on why the ‘-y’ option was used? Using the ‘-y’ option also saves you the time of hitting the Enter button after typing the commands. ‘-y’ stands for yes hence no need of pressing the enter key.

Common Steps to Update Kali Linux

Let us discuss the two most commonly used steps to update Kali.

Step 1: Configure Kali Linux Repositories

First step is about configuring Kali Linux repositories. You have to set accurate Kali Linux repositories here where you need to first make sure that sources.list file is having below-mentioned official kali repositories. This sources.list can be found under etc/apt.

deb https://http://kali.org/kali kali-rolling main non-free contrib

deb-sources https://http://kali.org/kali kali-rolling main non-free contrib

Note: You should use only Kali Linux’s official repositories. Any others 3rd party and unofficial ones within sources.list file may break, corrupt, or compromise your entire Kali system

Step2: The Sudo Command

Before updating Kali Linux system, you first need to first check if the index list package is updated or not. If not, you should update it first. For this, you need to run the follow admin sudo command,

sudo apt update

You can now display all packages remaining for updates.

apt list –upgradable

At this point, we can update each package individually if we need using he command apt install PACKAGE_NAME. But it’s better if we update all packages together using the command below.

sudo apt upgrade

Congratulations! Your Kali Linux system is now fully updated and should be working smooth now.

Conclusion

What are you waiting for? Open your terminal and type the mentioned single line command, and you are good to go! The new features are worth the update. Update your Kali Linux today! Good luck!