Post

Installing .NET 8 SDK on Kali Linux: Complete Tutorial

Installing .NET 8 SDK on Kali Linux: Complete Tutorial

Video Tutorial

Quick Installation

Step 1: Download the .NET 8 SDK

First, go to the .NET SDK download page and click on the “Download .NET 8.0 SDK” button.

.NET SDK download page

Step 2: Find Package Manager Instructions

Click on “Package manager instructions” under SDK 8.* section.

You will see “Packages are available for the following Linux distributions:”

Step 3: Select Debian

Since Kali Linux is based on Debian, click on the Debian option.

Step 4: Follow Debian 12 Instructions

Scroll to the Debian 12 section:

1
2
3
Debian 12

Installing with APT can be done with a few commands. Before you install .NET, run the following commands to add the Microsoft package signing key to your list of trusted keys and add the package repository.

Make sure .NET 8 is selected in the version dropdown and follow those instructions.

Important Note: The commands shown in this tutorial may change over time. Always refer to the official documentation for the most up-to-date instructions.


Note: The following steps are provided as a backup reference. Users should follow the official instructions from Step 4 as they are the same and will be kept updated by Microsoft.

Step 5: Add Microsoft Package Repository

Run the following commands to add the Microsoft package repository:

1
2
3
wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

Step 6: Install .NET 8 SDK

Install the .NET 8 SDK with the following command:

1
2
sudo apt-get update && \
  sudo apt-get install -y dotnet-sdk-8.0

Step 7: Install ASP.NET Core Runtime (Optional)

If you need ASP.NET Core Runtime, install it with:

1
2
sudo apt-get update && \
  sudo apt-get install -y aspnetcore-runtime-8.0

Step 8: Install .NET Runtime (Optional)

If you only need the .NET Runtime, install it with:

1
sudo apt-get install -y dotnet-runtime-8.0

Step 9: Verify Installation

Verify the installation by checking the installed .NET version:

1
dotnet --version

Updating .NET

When a new patch release is available for .NET, you can upgrade it through APT with:

1
2
sudo apt-get update
sudo apt-get upgrade
This post is licensed under CC BY 4.0 by the author.