How to Update Kali Linux in 2023 Using Virtual Box, Live USB, VMware

Kali Linux is a powerful and popular open-source operating system used by security professionals and researchers for penetration testing, forensics, and other security-related tasks. It is important to keep Kali Linux up to date in order to get the latest security updates and features. In this blog post, we will provide a step-by-step guide on how to update Kali Linux.

If you are unsure whether or not you need to update, there is a simple way to verify this.

To check if Kali Linux is up to date, you can use the apt-show-versions command in the terminal. This command will show you the version number of each package installed on your system, as well as the version number of the latest available package.

To use apt-show-versions, open the terminal, and enter the following command:

apt-show-versions

This will display a list of all the packages installed on your system, along with their version numbers. You can then compare these version numbers to the version numbers of the latest available packages to see if any updates are available.

Now before updating Kali Linux, it is recommended to back up any important data or configurations to ensure that you don’t lose any important information if the updating process goes wrong.

What to know?

  • Before you update Kali Linux, back up any important data or configurations first.
  • To update Kali Linux, you will need to use the apt package manager. This can be done by running the apt update and apt upgrade commands in the terminal, only possible when you have access to the admin command sudo.
  • To update the Linux kernel to the latest version, use the apt dist-upgrade command.
  • You can update the Kali Linux metapackages to the latest version by running the apt install kali-linux-default command.
  • After updating the metapackages, you may also want to update any custom packages that you have installed.
  • It is recommended to reboot your machine after updating Kali Linux to apply the changes.

How to Update Kali Linux?

Kali uses the Debian Package management system, which allows you to update and upgrade using the apt or apt-get command. Follow the steps outlined below to update and upgrade Kali.

  • A system running on Kali Linux operating system.
  • Access to a terminal window/command line (Ctrl+Alt+T)
  • A user account with sudo or root privileges

Step 1: Check the Source List Files

To ensure that the system is connecting to the correct remote repository when downloading updates using the APT package manager, check the URLs in the configuration files /etc/apt/sources.list and /etc/apt/sources.list.d/.

These files contain the URLs from which Kali installs packages and applications. Verify that the URLs point to the official Kali Linux repositories and use a text editor such as nano or vi to edit the files if necessary. To verify the authenticity of the packages being installed, check the GPG keys of the repositories using the apt-key list command and compare them to the ones listed on the Kali Linux website.

Open the configuration files to check the source:

cat /etc/apt/source.list

The first thing before updating, you should check out your repository for a specific file. The file is known as the Kali rolling release. Most of the time it should be there, check out these files.

  • deb http://http.kali.org/kali kali-rolling main contrib non-free
  • deb-src http://http.kali.org/kali kali-rolling main contrib non-free
Display the source list files for Kali Linux.

The same applies to files inside /etc/apt/source.list.d/.

Step 2: Update Package Manager

Before installing the latest version of kali Linux, you need to update the package repository to ensure you are downloading the newest versions. Run the following command to get the latest package lists:

apt update
Update Kali Linux package manager.

in versions of Kali Linux up to 2020.1, there was a default root user. However, starting with Kali Linux 2020.2, the traditional security model of having a non-root user was implemented. This means that in newer versions of Kali Linux, the root user is not enabled by default and a regular user must be used to log in to the system.

If you are using a version of Kali Linux that does not have the root user enabled, you will need to log in as a regular user and use the sudo command to execute commands with root privileges. For example, to run the apt update command as the root user, you would need to use sudo apt update.

Step 3: Upgrade the System

Now you can run the upgrade, which installs the latest packages and patches for Kali Linux. There are three commands you can use to upgrade Kali:

  • apt upgrade
  • apt full-upgrade
  • apt dist-upgrade

To upgrade Kali Linux, you can use one of the following commands:

  • apt upgrade: installs the latest packages and patches for Kali Linux, upgrading all installed packages to their latest versions while trying to keep the current configuration files.
  • apt full-upgrade: installs the latest packages and patches for Kali Linux, upgrading all installed packages to their latest versions regardless of whether a newer version of the configuration files exists. This command may remove or install additional packages to fulfill dependencies.
  • apt dist-upgrade: upgrades the system to the latest version of Kali Linux, upgrading all packages, installing any necessary dependencies, and removing any packages that are no longer needed.

It is recommended to run the apt update command before using any of these upgrade commands to ensure that the package list is up to date and to avoid any potential issues during the upgrade process.

Note that the apt dist-upgrade the command can potentially make significant changes to the system, such as removing packages that are no longer needed or installing new dependencies. It is recommended to review the changes that will be made before proceeding with this command.

Once you decide how to upgrade, type in the command and press Enter. The system will ask you to confirm the installation – type yes or y and press Enter to do so.

Also read: Linux distro for gaming laptops

Update Kali Linux on On Virtual Box

No matter which machine you use Kali Linux, you should always keep updating for a better user experience with Kali Linux, so let’s see how to Update Kali Linux in a Virtualbox.

Updating Kali Linux on virtual is just a few steps process, simply follow these steps with images.

First, you have to download kali OVA’s file or image for Virtual Box, you can easily get it from their official website.

  • Open VirtualBox and select the Kali Linux virtual machine.
  • Click the “Import” button in the toolbar to open the Import Virtual Appliance dialog.
  • Next, click on the “Choose” button and navigate to the location of the OVA file that you downloaded.
  • Select the OVA file and click the “Open” button.
  • Click the “Next” button to proceed with the import process.
  • Keep clicking the “Next” button and answering “Yes” to any options that appear until the import process is complete.
  • Start the Kali Linux virtual machine and open the terminal.
  • In the terminal, enter sudo apt update to update the package manager’s database.
  • Enter sudo apt upgrade to upgrade the system’s packages to their latest versions.
  • When prompted to continue, press “Y” to confirm.

Step-by-Step Guide on updating Kali Linux on virtual box

Step:1 First, download an Image from their official website, it may take some time due to its large space.

Step:2 Once you download the file, now open> Virtual box on your Desktop> head over the top left> Click on Important alliance. Or Use this shortcut Key CTRL+I.

Step:3 Now you can import that file you just download> press the Import button to import it. It will take some time, to wait for its completion.

Step: 4 Once the process is completed, you can now manage your resources such as RAM, Storage, and some basic settings from there.

Step: 5 Now can enter the command $ sudo apt update and $ sudo apt upgrade to update this to the latest version.

Also Read: Linux Mint vs Ubuntu

Updating Kali Linux On VMware

Many Kali Linux users use VMware to run Kali Linux, due to its ease of sharing two operating systems on one machine. And when it comes to updating, be ready to follow these steps, they are no different than updating kali Linux on a desktop.

  • Open VMware
  • Login into Kali Linux
  • $ sudo apt update
  • $ sudo apt upgrade
  • Reboot your Vmware
  • Congrats, you have updated Kali Linux on VMware

Updating Kali Linux on Live USB

To update a Kali Linux on a Live USB the process is the same as we have mentioned already. However, a few important steps you should follow here while doing this.

  1. You must have space on your USB
  2. Each Kali Linux Update requires more than 2+ GB of space.
  3. Before using the $ sudo apt update command on a Live USB.
  4. Use this command $ apt list –upgradable to check which packages are needed to be updated.
  5. You can update only specific packages by this command $ sudo apt update (Package Name)

Updating Kali Linux  2022.2 on Desktop

Everyone knows how to update Kali Linux, but not all of us know some essential things while following this procedure so you will not catch errors later.

Now, you can move on to update your Kali Linux.

Step.2 Hit this command- sudo apt-get update

You will see there something like that in the below image, a list of packages that needed to update.

And tools and new features are available for the newest Kali Linux version, and yes, the below image may not have the same packages that you will get on your side.

Take it as an example.

sudo apt-get update

Step.3 To update them at once, enter this command apt-get upgrade.

Before long, it will ask you to continue or not, press Y to continue updating.

Doing this every single package will start updating. However, it will require an internet connection as well. And up to 2GB of Data may be required.

You can see the below image for a better understanding.

You have almost done it here, however in some rare cases.

The system packages will not get updated with this. It is better to update them as well by entering this command.

  • $ sudo apt dist-upgrade

At this moment, your System has updated the Kali Linux, if everything has been set up on your side, reboot your desktop once to see updated features.

Also read: Install MX Linux Step by Step

Update the Repository of the source list in Kali Linux

You might face errors and feel difficulties in updating; sometimes, one of the big reasons is not updating your repository. You can take it as when updating kali Linux some repository is needed in the source. list file without them the process will not finish.

Moreover, you can also get source packages that come up with a new version by processing this.

By following these steps, you can update your repository.

  1. Click on this link scroll down, and you will see a link for  ‘Kali sources.list Repositories’ get into the page.
  2. Copy the Regular repositories & Source repositories commands from there.
  3. Open the Kali Linux Terminal
  4. nano /etc/apt/sources.list and enters this command, to go to the source.list section.
  5. And again, run the same command to update kali Linux- It will work fine this time.

Can you update Kali Linux offline?

Updating Kali Linux requires a fast and stable internet connection, it is true you can not update Kali Linux offline, however, there are some Debian-based repositories that come offline it is the extreme you can get offline in Kali Linux.

But, we have a way to go for people who want a working solution for this.

It all starts with a USB, yes, if you know how to install Kali Linux in a Live USB then this process will turn out easier for you.

Firstly you have to Install Kali Linux on a Live USB and make sure it has the updated version that you required, ask any friend to do that for you.

After that, you can get the updated version from the USB, which means you can run the updated version on your machine.

It is the only way you can do that offline.

Problems with updating kali Linux and solution

1) How to fix -bash apt-key: command not found when entering apt-update

This problem takes place when you have just installed Kali Linux and are attempting to update.

Here is the solution for this.

  1. Open your Linux Terminal
  2. Enter /etc/apt/sources.list
  3. Paste this file there  “deb https://http.kali.org/kali kali-rolling main contrib non-free” > /etc/apt/sources.list
  4. Run this command (optional) apt-key adv –keyserver hkp://keys.gnupg.net –recv-keys 7D8D0BF6
  5. Update again, it will work this time command

How to fix kali Linux broken packages and Apt update error not working

The problem mostly appears when a user has to face dependency issues, as when updating Kali Linux some old packages which require dependencies cause this error.

Here is how to fix this Problem,

Open your Linux Terminal

  1. Put the same command “apt-get update && apt-get upgrade”
  2. But this time add this command “sudo apt-get autoclean && sudo apt-get clean && sudo apt-get autoremove” to auto-clear dependencies.
  3. It should work now, press Y to continue.

Also read: Fedora vs Ubuntu

Written by

Moiz here, he is a Blogger, a Creative Content Writer, and an SEO intern at the same time. He is passionate about what he does, energetic, incentive, with a positive attitude towards sociology.