Kali Linux Rolling Distribution Upgrades

This allows for faster adoption of new features and bug fixes, but also means that there may be more frequent updates and potential compatibility issues with older applications or hardware.

Kali Linux is a popular rolling release distribution based on Debian, which provides regular security and stability updates through its own repositories as well as those from upstream projects like the Linux kernel. However, these updates can sometimes cause conflicts or break existing configurations, particularly if they are not carefully managed.

To upgrade Kali Linux to a newer version of Ubuntu or its kernel, you can use the do-release-upgrade command in a terminal window:


# This script updates and upgrades the packages on a Linux system.
# The && operator allows for multiple commands to be executed in one line.
# The sudo command allows for the following commands to be executed with root privileges.

sudo apt update # This command updates the list of available packages.
sudo apt dist-upgrade -y # This command upgrades the installed packages to their latest versions.
# The -y flag automatically answers "yes" to any prompts during the upgrade process.

# Note: It is recommended to use the do-release-upgrade command for upgrading to a newer version of Ubuntu or its kernel, as it handles any potential conflicts or configuration issues.

This will check for any new releases and offer an option to upgrade your current installation. If there’s no update available, it won’t do anything. However, if there is one, it will proceed with upgrading both the system and its kernel to their latest versions.

To avoid rolling distribution upgrades altogether, you can switch to a more traditional release cycle by using Kali Linux LTS (Long Term Support) releases instead of the rolling version. These are released every two years and provide stable updates for five years after their initial release date. To upgrade to an LTS release, follow these steps:

1. Open a terminal window and run the following command to check if there is a newer LTS release available:


# This script updates the package list and upgrades all installed packages to their latest versions.
# The -y flag automatically confirms any prompts during the upgrade process.

sudo apt update && sudo apt dist-upgrade -y

2. If a new LTS release is found, you can upgrade by running this command:


# This script is used to upgrade to a new LTS release of Ubuntu.
# It checks for a new LTS release and if found, runs the command to upgrade.

# Use sudo to run the command with root privileges.
sudo do-release-upgrade -d

# The -d flag is used to upgrade to the development release, which is the new LTS release.
# This flag is necessary because LTS releases are not automatically upgraded to.
# It must be explicitly specified in the command.

# The do-release-upgrade command checks for a new LTS release by querying the Ubuntu servers.
# If a new LTS release is found, it prompts the user to confirm the upgrade.
# If the user confirms, the upgrade process begins.

# The upgrade process involves updating the package lists, downloading and installing new packages, and making system configuration changes.
# It may take some time to complete, depending on the speed of your internet connection and the number of packages to be downloaded.

# Once the upgrade is complete, the system will prompt the user to restart the system.
# It is important to restart the system to ensure all changes are applied and the new LTS release is fully installed.

# After the system restarts, it will be running the new LTS release of Ubuntu.
# It is recommended to check for any updates and install them to ensure the system is up to date.

This will download and install the latest LTS release on your system.

3. Once the upgrade is complete, reboot your computer to ensure that all changes are applied correctly.

4. To prevent future rolling distribution upgrades from being installed automatically, you can add this line to your /etc/apt/preferences file:

# This script is used to prevent automatic installation of rolling distribution upgrades on Kali Linux.

# The first line specifies the package to be affected, in this case, all packages.
Package: *

# The second line specifies the release to be pinned, in this case, Kali Linux-rolling.
# The "o=" indicates the origin of the release.
Pin: release o=Kali Linux-rolling

# The third line sets the priority of the release to -1000, which is the lowest possible priority.
# This ensures that any other release with a higher priority will be installed instead.
Pin-Priority: -1000

This will ensure that any updates for packages in the Kali Linux rolling repository are ignored, and only updates from the LTS repository are installed.

However, if you prefer to keep your system on the latest updates and are comfortable with potential compatibility issues, you can continue using Kali Linux’s rolling distribution by regularly checking for new releases and installing them as they become available. Just be sure to test any critical applications before upgrading to ensure that they will still function properly after the upgrade is complete.

In this workshop, we have covered how to manually compile a custom kernel on Kali Linux using the latest source code from GitHub. We also discussed rolling distribution upgrades and provided tips for avoiding them if desired. By following these steps, you can ensure that your system remains stable and secure while still providing access to new features and bug fixes as they become available.

SICORPS