Skip to content

Instructions for Installing .NET Software Development Kit (SDK) and Runtime on Ubuntu 24.04 operating system

Guide on Installing .NET SDK and Runtime on Ubuntu 24.04. This tutorial provides a step-by-step process for a seamless development environment setup.

Guide for Installing .NET SDK and .NET Runtime on Ubuntu 24.04 LTS
Guide for Installing .NET SDK and .NET Runtime on Ubuntu 24.04 LTS

Instructions for Installing .NET Software Development Kit (SDK) and Runtime on Ubuntu 24.04 operating system

In this article, we'll guide you through the process of installing and using the .NET SDK and Runtime on Ubuntu 24.04. We'll cover three methods, each with its own advantages, to cater to your version needs.

Method 1: Ubuntu System Repository

For .NET 8 or earlier versions, such as 6 and 7, you can use Ubuntu's native package management. Here's how:

  1. Open a terminal ().
  2. Update package lists:

  1. Install the .NET SDK (for instance, .NET 8):

For .NET 7 or 6, replace with or respectively.

This method installs the SDK and runtime via Ubuntu's native package management.

Method 2: Microsoft-backed PPA

If you're looking for the latest versions, such as .NET 9 SDK and runtimes, you can use the Microsoft-backed PPA. Here's how:

  1. Add Microsoft PPA repository:

  1. Install the .NET 9 SDK:

To install the .NET 9 runtime (ASP.NET Core runtime):

For .NET 8 SDK and runtime, replace and with and respectively.

This PPA supports Ubuntu 24.04 and provides newer versions like .NET 9.

Method 3: Snap Package

For easy updates and side-by-side installations, you can use the Snap Package. Here's how:

  1. Install the .NET snap package with classic confinement:

After installation, you can verify the .NET version by running:

To create a new console app, navigate to the project directory, and run the app:

For developing or running .NET applications, you'll mainly use the CLI.

Summary Table

| Method | Installation Commands | Notes | |----------------------------------|-------------------------------------------------------|----------------------------------| | Ubuntu Repo (native .deb) | | Stable for .NET 8 and earlier | | Microsoft PPA (latest patches) | | For .NET 9 SDK and runtime support| | Snap Package | | Easy updates, side-by-side versions|

Using these methods, you can install and use the .NET SDK and runtime efficiently on Ubuntu 24.04 tailored to your version needs.

Read also:

Latest