<a id="install-dotnet"></a>

# How to set up a development environment for .NET on Ubuntu

This guide covers the available methods for installing .NET on Ubuntu and how to choose between them.

## Installing .NET

There are multiple methods for installing the .NET toolchain on Ubuntu:

- Using the [`dotnet` snap](https://snapcraft.io/dotnet) – a .NET toolchain installer that makes it easy to install the latest releases of .NET  SDKs/runtimes in parallel.
- Using Ubuntu packages from Ubuntu package feeds – official packages maintained by the Ubuntu team and installed through the Ubuntu package-management system.
- Using Microsoft packages from the Microsoft package feed – official packages maintained by Microsoft and installed through the Ubuntu package-management  system.
- Using Microsoft’s installation script – a script you download and run in your terminal that allows you to install any .NET release.
- Manual installation – download the release binaries as a tarball and install them manually.

#### WARNING
It’s recommended to install the .NET toolchain from.**Do not mix multiple installation methods**, as this may lead to problems when applications try to resolve a specific version of .NET or when you try to update your installation to a new release.

### Deciding how to install .NET

#### TIP
**We recommend to use the `dotnet` snap** as we created it specifically to make installing .NET on Ubuntu easy, but there are cases where this may not fit your needs.

With the many options available to install .NET on Ubuntu, it can seem overwhelming at first, which method to choose. Below you find an overview and more details for specific cases that should help you select an installation method:

| Method                                                                                            | Pros                                                                                                                                                                                                                                  | Cons                                                                                                                                                                                                                                                                                             |
|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`dotnet` snap]()                                                                                 | - **easy & simple installation experience**                                                                                                                                                                                           | - currently only supports `x64` and `arm64` system architectures<br/>- currently only supports Ubuntu 22.04 or newer                                                                                                                                                                             |
| [Ubuntu packages](#dotnet-installation-ubuntu-packages)                                    | - preview releases are available<br/>- supports IBM System Z and POWER system architectures for .NET 8+                                                                                                                               | - some .NET versions are only available after installing an<br/>  APT repository<br/>- by default, non-security updates are made available with a<br/>  delay of 1+ week(s); APT can be configured to install them<br/>  as soon as they are available<br/>- only supports Ubuntu 22.04 or newer |
| [Microsoft packages](#dotnet-installation-microsoft-packages)                                 | - supports Ubuntu 16.04, 18.04, 20.04<br/>- higher SDK feature bands are available (> x.x.1xx)                                                                                                                                        | - requires installing an APT repository<br/>- APT may needs to be configure to resolve conflicts with<br/>  Ubuntu packages<br/>- no support for Ubuntu 24.04 or newer¹<br/>- only supports the `x64` system architecture                                                                        |
| Microsoft’s [scripted]() /<br/>[manual](#dotnet-installation-microsoft-manual) installation | - control where .NET is installed<br/>- preview releases are available<br/>- old (unsupported) versions of .NET are available<br/>- higher SDK feature bands are available (> x.x.1xx)<br/>- supports the `arm32` system architecture | - error-prone<br/>- updates need to be installed manually<br/>- dependencies have to be installed manually<br/>- no support for IBM System Z and POWER  system architectures                                                                                                                     |

¹ Clarification: Canonical maintains .NET packages since 2023. The maintainer team has asked Microsoft to discontinue their package feed for newer Ubuntu versions in favor of Canonical Ubuntu packages.

<!--

#### I need to install old (unsupported) .NET versions

TODO

#### I need to install .NET preview versions

TODO

#### I need to install a newer .NET SDK feature band (> x.x.1xx)

TODO

#### I need to install .NET on an Arm based system

TODO

#### I need to install .NET on a IBM System Z or POWER platform

TODO

#### I want to use an APT/\`.deb\` based installation method

TODO

-->

---

<a id="dotnet-installation-snap"></a>

### Installing .NET with the `dotnet` snap

Install the `dotnet` snap:

```text
sudo snap install --classic dotnet
```

Now you are effectively done. If you run the `dotnet` command without any .NET component installed, the snap automatically installs the latest .NET LTS SDK before proceeding with the invoked command.

#### Listing installed/available components and versions

To list components and versions that are installed or available for installation, run the following command in a terminal:

```text
dotnet-installer list
```

#### TIP
By default, unsupported (end of life) versions are not listed. To list all available versions, add the `--all` flag.

Example output:

`user@host:~$ ``┌────────────┬────────────────────┬──────────────────────┬─────────────────────┬─────────────┐
> │ Version    │ .NET Runtime       │ ASP.NET Core Runtime │ SDK                 │ End of Life │
> ├────────────┼────────────────────┼──────────────────────┼─────────────────────┼─────────────┤
> │ .NET 9     │ Available [9.0.2]  │ Available [9.0.2]    │ Available [9.0.103] │ 5/12/2026   │
> │ .NET 8 LTS │ Installed [8.0.13] │ Installed [8.0.13]   │ Installed [8.0.113] │ 11/10/2026  │
> └────────────┴────────────────────┴──────────────────────┴─────────────────────┴─────────────┘`

#### Installing .NET components

To install a .NET component, run the following command:

```text
dotnet-installer install [<component> [<version>]]
```

See valid [Components](https://documentation.ubuntu.com/ubuntu-for-developers/reference/availability/dotnet.md#dotnet-snap-components) and [Versions](https://documentation.ubuntu.com/ubuntu-for-developers/reference/availability/dotnet.md#dotnet-snap-versions) values.

Examples:

- To install the runtime of the latest .NET release, run:
  ```text
  dotnet-installer install runtime latest
  ```
- To install the SDK of the latest .NET LTS release, run:
  ```text
  dotnet-installer install sdk lts
  ```
- To install the .NET 8 ASP.NET Core runtime, run:
  ```text
  dotnet-installer install aspnetcore-runtime 8
  ```
- To install the .NET 9 SDK, run:
  ```text
  dotnet-installer install sdk 9.0
  ```

#### Uninstalling .NET components

To install a .NET component, run the following command:

```text
dotnet-installer remove <component> <versison>
```

The command works similar to the `dotnet installer install` command (documented above) – just uninstalling instead of installing. One difference to the syntax of the installation command is that the parameters `<component>` and
`<version>` are required.

#### Uninstalling the `dotnet` snap

To remove the `dotnet` snap and all installed components, run:

```text
snap remove dotnet
```

<a id="dotnet-installation-ubuntu-packages"></a>

### Installing .NET from Ubuntu packages

Choose your Ubuntu version:

#### TIP
You can see your Ubuntu versions by running the following command in a terminal:

```text
lsb_release -rs
```

### 26.04 LTS

Choose the .NET version you want to install:

### .NET 10

<!-- Content for Ubuntu 26.04 (Resolute Raccoon) and .NET 10 -->

Available for architectures:
: `amd64` (aka `x64`), `arm64`, `s390x` (aka IBM System Z), `ppc64el` (aka POWER)

**Installing proposed updates (optional)**

Every .NET release that does not contain security fixes is only available with a delay of at least a week and sometimes much longer.

To install updates as soon as they are available, see the section [Installing proposed .NET updates](#dotnet-install-proposed-updates); otherwise you can skip this part.

**Installing the SDK**

The .NET SDK allows you to develop apps with .NET. To install the .NET SDK:

```text
sudo apt update && sudo apt install --install-suggests dotnet-sdk-10.0
```

#### NOTE
Additionally, the package `dotnet-sdk-aot-10.0` is installed as a recommended dependency. This package contains components to build your .NET application as native ahead-of-time compiled code. To not install this package, add the `--no-install-recommends` flag.

The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `dotnet-sdk-dbg-10.0`
* `aspnetcore-runtime-dbg-10.0`
* `dotnet-runtime-dbg-10.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

#### TIP
There also exists a package with the name `dotnet10`. This is an alias for the `dotnet-sdk-10.0` package.

**Installing the runtime**

#### NOTE
If you installed the .NET SDK, the corresponding runtime is installed automatically as a required dependency.

A .NET runtime allows you to run .NET apps that don’t provide a runtime. The following command installs the ASP.NET Core Runtime, which is the most compatible runtime for .NET:

```text
sudo apt update && sudo apt install --install-suggests aspnetcore-runtime-10.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `aspnetcore-runtime-dbg-10.0`
* `dotnet-runtime-dbg-10.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

Alternatively, you can install the .NET runtime without the ASP.NET Core components:

```text
sudo apt update && sudo apt install --install-suggests dotnet-runtime-10.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependency `dotnet-runtime-dbg-10.0`. This package provide PDB debug symbols. Remove this flag if you do not want to install this package.

### .NET 9

<!-- Content for Ubuntu 26.04 (Resolute Raccoon) and .NET 9 -->

Available for architectures:
: `amd64` (aka `x64`), `arm64`, `s390x` (aka IBM System Z), `ppc64el` (aka POWER)

**Installing proposed updates (optional)**

Every .NET release that does not contain security fixes is only available with a delay of at least a week and sometimes much longer.

To install updates as soon as they are available, see the section [Installing proposed .NET updates](#dotnet-install-proposed-updates); otherwise you can skip this part.

**Installing the SDK**

The .NET SDK allows you to develop apps with .NET. To install the .NET SDK:

```text
sudo apt update && sudo apt install --install-suggests dotnet-sdk-9.0
```

#### NOTE
Additionally, the package `dotnet-sdk-aot-9.0` is installed as a recommended dependency. This package contains components to build your .NET application as native ahead-of-time compiled code. To not install this package, add the `--no-install-recommends` flag.

The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `dotnet-sdk-dbg-9.0`
* `aspnetcore-runtime-dbg-9.0`
* `dotnet-runtime-dbg-9.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

#### TIP
There also exists a package with the name `dotnet9`. This is an alias for the `dotnet-sdk-9.0` package.

**Installing the runtime**

#### NOTE
If you installed the .NET SDK, the corresponding runtime is installed automatically as a required dependency.

A .NET runtime allows you to run .NET apps that don’t provide a runtime. The following command installs the ASP.NET Core Runtime, which is the most compatible runtime for .NET:

```text
sudo apt update && sudo apt install --install-suggests aspnetcore-runtime-9.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `aspnetcore-runtime-dbg-9.0`
* `dotnet-runtime-dbg-9.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

Alternatively, you can install the .NET runtime without the ASP.NET Core components:

```text
sudo apt update && sudo apt install --install-suggests dotnet-runtime-9.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependency `dotnet-runtime-dbg-9.0`. This package provides PDB debug symbols. Remove this flag if you do not want to install this package.

### .NET 8

<!-- Content for Ubuntu 26.04 (Resolute Raccoon) and .NET 8 -->

Available for architectures:
: `amd64` (aka `x64`), `arm64`, `s390x` (aka IBM System Z), `ppc64el` (aka POWER)

**Registering the .NET backports PPA**

This version of .NET is not available in the Ubuntu archive because Canonical is not committed to maintaining this version of .NET for the lifetime of this Ubuntu version. But Canonical maintains builds in the [.NET backports PPA](https://documentation.ubuntu.com/ubuntu-for-developers/reference/availability/dotnet.md#dotnet-backports-ppa). The maintenance is on a best-effort basis and limited to the upstream lifetime of this .NET version: [.NET Support Policy](https://dotnet.microsoft.com/en-us/platform/support/policy).

Add the .NET backports PPA as a source for APT:

```text
sudo add-apt-repository ppa:dotnet/backports
```

If you later want to remove the .NET backports PPA, run the above command with the `--remove` flag.

### Command `add-apt-repository` could not be found?

 is a command provided by the `software-properties-common` package. On most Ubuntu systems, this package is installed by default. If your system reports that the command `add-apt-repository` could not be found, install the `software-properties-common` package:

```text
sudo apt update && sudo apt install software-properties-common
```

**Installing the SDK**

The .NET SDK allows you to develop apps with .NET. To install the .NET SDK:

```text
sudo apt update && sudo apt install --install-suggests dotnet-sdk-8.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `dotnet-sdk-dbg-8.0`
* `aspnetcore-runtime-dbg-8.0`
* `dotnet-runtime-dbg-8.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

#### TIP
There also exists a package with the name `dotnet8`. This is an alias for the `dotnet-sdk-8.0` package.

**Installing the runtime**

#### NOTE
If you installed the .NET SDK, the corresponding runtime is installed automatically as a required dependency.

A .NET runtime allows you to run .NET apps that don’t provide a runtime. To install the ASP.NET Core Runtime (the most compatible runtime for .NET):

```text
sudo apt update && sudo apt install --install-suggests aspnetcore-runtime-8.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `aspnetcore-runtime-dbg-8.0`
* `dotnet-runtime-dbg-8.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

Alternatively, you can install the .NET runtime without the ASP.NET Core components:

```text
sudo apt update && sudo apt install --install-suggests dotnet-runtime-8.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependency `dotnet-runtime-dbg-8.0`. This packages provides PDB debug symbols. Remove this flag if you do not want to install this package.

### .NET 7

<!-- Content for Ubuntu 26.04 (Resolute Raccoon) and .NET 7 -->

.NET 7 isn’t supported on Ubuntu 26.04 LTS (Resolute Raccoon).

### .NET 6

<!-- Content for Ubuntu 26.04 (Resolute Raccoon) and .NET 6 -->

.NET 6 isn’t supported on Ubuntu 26.04 LTS (Resolute Raccoon).

### 25.10

Choose the .NET version you want to install:

### .NET 10

<!-- Content for Ubuntu 25.10 (Questing Quokka) and .NET 10 -->

Available for architectures:
: `amd64` (aka `x64`), `arm64`, `s390x` (aka IBM System Z), `ppc64el` (aka POWER)

**Installing proposed updates (optional)**

Every .NET release that does not contain security fixes is only available with a delay of at least a week and sometimes much longer.

To install updates as soon as they are available, see the section [Installing proposed .NET updates](#dotnet-install-proposed-updates); otherwise you can skip this part.

**Installing the SDK**

The .NET SDK allows you to develop apps with .NET. To install the .NET SDK:

```text
sudo apt update && sudo apt install --install-suggests dotnet-sdk-10.0
```

#### NOTE
Additionally, the package `dotnet-sdk-aot-10.0` is installed as a recommended dependency. This package contains components to build your .NET application as native ahead-of-time compiled code. To not install this package, add the `--no-install-recommends` flag.

The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `dotnet-sdk-dbg-10.0`
* `aspnetcore-runtime-dbg-10.0`
* `dotnet-runtime-dbg-10.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

#### TIP
There also exists a package with the name `dotnet10`. This is an alias for the `dotnet-sdk-10.0` package.

**Installing the runtime**

#### NOTE
If you installed the .NET SDK, the corresponding runtime is installed automatically as a required dependency.

A .NET runtime allows you to run .NET apps that don’t provide a runtime. The following command installs the ASP.NET Core Runtime, which is the most compatible runtime for .NET:

```text
sudo apt update && sudo apt install --install-suggests aspnetcore-runtime-10.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `aspnetcore-runtime-dbg-10.0`
* `dotnet-runtime-dbg-10.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

Alternatively, you can install the .NET runtime without the ASP.NET Core components:

```text
sudo apt update && sudo apt install --install-suggests dotnet-runtime-10.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependency `dotnet-runtime-dbg-10.0`. This package provide PDB debug symbols. Remove this flag if you do not want to install this package.

### .NET 9

<!-- Content for Ubuntu 25.10 (Questing Quokka) and .NET 9 -->

Available for architectures:
: `amd64` (aka `x64`), `arm64`, `s390x` (aka IBM System Z), `ppc64el` (aka POWER)

**Installing proposed updates (optional)**

Every .NET release that does not contain security fixes is only available with a delay of at least a week and sometimes much longer.

To install updates as soon as they are available, see the section [Installing proposed .NET updates](#dotnet-install-proposed-updates); otherwise you can skip this part.

**Installing the SDK**

The .NET SDK allows you to develop apps with .NET. To install the .NET SDK:

```text
sudo apt update && sudo apt install --install-suggests dotnet-sdk-9.0
```

#### NOTE
Additionally, the package `dotnet-sdk-aot-9.0` is installed as a recommended dependency. This package contains components to build your .NET application as native ahead-of-time compiled code. To not install this package, add the `--no-install-recommends` flag.

The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `dotnet-sdk-dbg-9.0`
* `aspnetcore-runtime-dbg-9.0`
* `dotnet-runtime-dbg-9.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

#### TIP
There also exists a package with the name `dotnet9`. This is an alias for the `dotnet-sdk-9.0` package.

**Installing the runtime**

#### NOTE
If you installed the .NET SDK, the corresponding runtime is installed automatically as a required dependency.

A .NET runtime allows you to run .NET apps that don’t provide a runtime. The following command installs the ASP.NET Core Runtime, which is the most compatible runtime for .NET:

```text
sudo apt update && sudo apt install --install-suggests aspnetcore-runtime-9.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `aspnetcore-runtime-dbg-9.0`
* `dotnet-runtime-dbg-9.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

Alternatively, you can install the .NET runtime without the ASP.NET Core components:

```text
sudo apt update && sudo apt install --install-suggests dotnet-runtime-9.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependency `dotnet-runtime-dbg-9.0`. This package provides PDB debug symbols. Remove this flag if you do not want to install this package.

### .NET 8

<!-- Content for Ubuntu 25.10 (Questing Quokka) and .NET 8 -->

Available for architectures:
: `amd64` (aka `x64`), `arm64`, `s390x` (aka IBM System Z), `ppc64el` (aka POWER)

**Installing proposed updates (optional)**

Every .NET release that does not contain security fixes is only available with a delay of at least a week and sometimes much longer.

To install updates as soon as they are available, see the section [Installing proposed .NET updates](#dotnet-install-proposed-updates); otherwise you can skip this part.

**Installing the SDK**

The .NET SDK allows you to develop apps with .NET. To install the .NET SDK:

```text
sudo apt update && sudo apt install --install-suggests dotnet-sdk-8.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `dotnet-sdk-dbg-8.0`
* `aspnetcore-runtime-dbg-8.0`
* `dotnet-runtime-dbg-8.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

#### TIP
There also exists a package with the name `dotnet8`. This is an alias for the `dotnet-sdk-8.0` package.

**Installing the runtime**

#### NOTE
If you installed the .NET SDK, the corresponding runtime is installed automatically as a required dependency.

A .NET runtime allows you to run .NET apps that don’t provide a runtime. To install the ASP.NET Core Runtime (the most compatible runtime for .NET):

```text
sudo apt update && sudo apt install --install-suggests aspnetcore-runtime-8.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `aspnetcore-runtime-dbg-8.0`
* `dotnet-runtime-dbg-8.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

Alternatively, you can install the .NET runtime without the ASP.NET Core components:

```text
sudo apt update && sudo apt install --install-suggests dotnet-runtime-8.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependency `dotnet-runtime-dbg-8.0`. This packages provides PDB debug symbols. Remove this flag if you do not want to install this package.

### .NET 7

<!-- Content for Ubuntu 25.10 (Questing Quokka) and .NET 7 -->

.NET 7 isn’t supported on Ubuntu 25.10 (Questing Quokka).

### .NET 6

<!-- Content for 25.10 (Questing Quokka) and .NET 6 -->

.NET 6 isn’t supported on Ubuntu 25.10 (Questing Quokka).

### 25.04

Choose the .NET version you want to install:

### .NET 10

<!-- Content for Ubuntu 25.04 (Plucky Puffin) and .NET 10 -->

We are working on getting this version of .NET in the Ubuntu archive. In the meantime we recommend [installing this version of .NET via the dotnet snap](#dotnet-installation-snap).

### .NET 9

<!-- Content for Ubuntu 25.04 (Plucky Puffin) and .NET 9 -->

Available for architectures:
: `amd64` (aka `x64`), `arm64`, `s390x` (aka IBM System Z), `ppc64el` (aka POWER)

**Installing proposed updates (optional)**

Every .NET release that does not contain security fixes is only available with a delay of at least a week and sometimes much longer.

To install updates as soon as they are available, see the section [Installing proposed .NET updates](#dotnet-install-proposed-updates); otherwise you can skip this part.

**Installing the SDK**

The .NET SDK allows you to develop apps with .NET. To install the .NET SDK:

```text
sudo apt update && sudo apt install --install-suggests dotnet-sdk-9.0
```

#### NOTE
Additionally, the package `dotnet-sdk-aot-9.0` is installed as a recommended dependency. This package contains components to build your .NET application as native ahead-of-time compiled code. To not install this package, add the `--no-install-recommends` flag.

The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `dotnet-sdk-dbg-9.0`
* `aspnetcore-runtime-dbg-9.0`
* `dotnet-runtime-dbg-9.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

#### TIP
There also exists a package with the name `dotnet9`. This is an alias for the `dotnet-sdk-9.0` package.

**Installing the runtime**

#### NOTE
If you installed the .NET SDK, the corresponding runtime is installed automatically as a required dependency.

A .NET runtime allows you to run .NET apps that don’t provide a runtime. The following command installs the ASP.NET Core Runtime, which is the most compatible runtime for .NET:

```text
sudo apt update && sudo apt install --install-suggests aspnetcore-runtime-9.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `aspnetcore-runtime-dbg-9.0`
* `dotnet-runtime-dbg-9.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

Alternatively, you can install the .NET runtime without the ASP.NET Core components:

```text
sudo apt update && sudo apt install --install-suggests dotnet-runtime-9.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependency `dotnet-runtime-dbg-9.0`. This package provides PDB debug symbols. Remove this flag if you do not want to install this package.

### .NET 8

<!-- Content for Ubuntu 25.04 (Plucky Puffin) and .NET 8 -->

Available for architectures:
: `amd64` (aka `x64`), `arm64`, `s390x` (aka IBM System Z), `ppc64el` (aka POWER)

**Installing proposed updates (optional)**

Every .NET release that does not contain security fixes is only available with a delay of at least a week and sometimes much longer.

To install updates as soon as they are available, see the section [Installing proposed .NET updates](#dotnet-install-proposed-updates); otherwise you can skip this part.

**Installing the SDK**

The .NET SDK allows you to develop apps with .NET. To install the .NET SDK:

```text
sudo apt update && sudo apt install --install-suggests dotnet-sdk-8.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `dotnet-sdk-dbg-8.0`
* `aspnetcore-runtime-dbg-8.0`
* `dotnet-runtime-dbg-8.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

#### TIP
There also exists a package with the name `dotnet8`. This is an alias for the `dotnet-sdk-8.0` package.

**Installing the runtime**

#### NOTE
If you installed the .NET SDK, the corresponding runtime is installed automatically as a required dependency.

A .NET runtime allows you to run .NET apps that don’t provide a runtime. To install the ASP.NET Core Runtime (the most compatible runtime for .NET):

```text
sudo apt update && sudo apt install --install-suggests aspnetcore-runtime-8.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `aspnetcore-runtime-dbg-8.0`
* `dotnet-runtime-dbg-8.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

Alternatively, you can install the .NET runtime without the ASP.NET Core components:

```text
sudo apt update && sudo apt install --install-suggests dotnet-runtime-8.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependency `dotnet-runtime-dbg-8.0`. This packages provides PDB debug symbols. Remove this flag if you do not want to install this package.

### .NET 7

<!-- Content for Ubuntu 25.04 (Plucky Puffin) and .NET 7 -->

.NET 7 isn’t supported on Ubuntu 25.04 (Plucky Puffin).

### .NET 6

<!-- Content for 25.04 (Plucky Puffin) and .NET 6 -->

.NET 6 isn’t supported on Ubuntu 25.04 (Plucky Puffin).

### 24.04 LTS

Choose the .NET version you want to install:

### .NET 10

<!-- Content for Ubuntu 24.04 LTS (Noble Numbat) and .NET 10 -->

We are working on getting this version of .NET in the Ubuntu archive. In the meantime we recommend [installing this version of .NET via the dotnet snap](#dotnet-installation-snap).

### .NET 9

<!-- Content for Ubuntu 24.04 LTS (Noble Numbat) and .NET 9 -->

Available for architectures:
: `amd64` (aka `x64`), `arm64`, `s390x` (aka IBM System Z), `ppc64el` (aka POWER)

**Registering the .NET backports PPA**

This version of .NET is not available in the Ubuntu archive because Canonical is not committed to maintaining this version of .NET for the lifetime of this Ubuntu version. But Canonical maintains builds in the [.NET backports PPA](https://documentation.ubuntu.com/ubuntu-for-developers/reference/availability/dotnet.md#dotnet-backports-ppa). The maintenance is on a best-effort basis and limited to the upstream lifetime of this .NET version: [.NET Support Policy](https://dotnet.microsoft.com/en-us/platform/support/policy).

Add the .NET backports PPA as a source for APT:

```text
sudo add-apt-repository ppa:dotnet/backports
```

If you later want to remove the .NET backports PPA, run the above command with the `--remove` flag.

### Command `add-apt-repository` could not be found?

 is a command provided by the `software-properties-common` package. On most Ubuntu systems, this package is installed by default. If your system reports that the command `add-apt-repository` could not be found, install the `software-properties-common` package:

```text
sudo apt update && sudo apt install software-properties-common
```

**Installing the SDK**

The .NET SDK allows you to develop apps with .NET. To install the .NET SDK:

```text
sudo apt update && sudo apt install --install-suggests dotnet-sdk-9.0
```

#### NOTE
Additionally, the package `dotnet-sdk-aot-9.0` is installed as a recommended dependency. This package contains components to build your .NET application as native ahead-of-time compiled code. To not install this package, add the `--no-install-recommends` flag.

The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `dotnet-sdk-dbg-9.0`
* `aspnetcore-runtime-dbg-9.0`
* `dotnet-runtime-dbg-9.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

#### TIP
There also exists a package with the name `dotnet9`. This is an alias for the `dotnet-sdk-9.0` package.

**Installing the runtime**

#### NOTE
If you installed the .NET SDK, the corresponding runtime is installed automatically as a required dependency.

A .NET runtime allows you to run .NET apps that don’t provide a runtime. The following command installs the ASP.NET Core Runtime, which is the most compatible runtime for .NET:

```text
sudo apt update && sudo apt install --install-suggests aspnetcore-runtime-9.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `aspnetcore-runtime-dbg-9.0`
* `dotnet-runtime-dbg-9.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

Alternatively, you can install the .NET runtime without the ASP.NET Core components:

```text
sudo apt update && sudo apt install --install-suggests dotnet-runtime-9.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependency `dotnet-runtime-dbg-9.0`. This package provides PDB debug symbols. Remove this flag if you do not want to install this package.

### .NET 8

<!-- Content for Ubuntu 24.04 LTS (Noble Numbat) and .NET 8 -->

Available for architectures:
: `amd64` (aka `x64`), `arm64`, `s390x` (aka IBM System Z), `ppc64el` (aka POWER)

**Installing proposed updates (optional)**

Every .NET release that does not contain security fixes is only available with a delay of at least a week and sometimes much longer.

To install updates as soon as they are available, see the section [Installing proposed .NET updates](#dotnet-install-proposed-updates); otherwise you can skip this part.

**Installing the SDK**

The .NET SDK allows you to develop apps with .NET. To install the .NET SDK:

```text
sudo apt update && sudo apt install --install-suggests dotnet-sdk-8.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `dotnet-sdk-dbg-8.0`
* `aspnetcore-runtime-dbg-8.0`
* `dotnet-runtime-dbg-8.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

#### TIP
There also exists a package with the name `dotnet8`. This is an alias for the `dotnet-sdk-8.0` package.

**Installing the runtime**

#### NOTE
If you installed the .NET SDK, the corresponding runtime is installed automatically as a required dependency.

A .NET runtime allows you to run .NET apps that don’t provide a runtime. To install the ASP.NET Core Runtime (the most compatible runtime for .NET):

```text
sudo apt update && sudo apt install --install-suggests aspnetcore-runtime-8.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `aspnetcore-runtime-dbg-8.0`
* `dotnet-runtime-dbg-8.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

Alternatively, you can install the .NET runtime without the ASP.NET Core components:

```text
sudo apt update && sudo apt install --install-suggests dotnet-runtime-8.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependency `dotnet-runtime-dbg-8.0`. This packages provides PDB debug symbols. Remove this flag if you do not want to install this package.

### .NET 7

<!-- Content for Ubuntu 24.04 LTS (Noble Numbat) and .NET 7 -->

#### CAUTION
This .NET version is no longer maintained.

Available for architectures:
: `amd64` (aka `x64`), `arm64`

**Registering the .NET backports PPA**

This version of .NET is not available in the Ubuntu archive because Canonical is not committed to maintaining this version of .NET for the lifetime of this Ubuntu version. But Canonical maintains builds in the [.NET backports PPA](https://documentation.ubuntu.com/ubuntu-for-developers/reference/availability/dotnet.md#dotnet-backports-ppa). The maintenance is on a best-effort basis and limited to the upstream lifetime of this .NET version: [.NET Support Policy](https://dotnet.microsoft.com/en-us/platform/support/policy).

Add the .NET backports PPA as a source for APT:

```text
sudo add-apt-repository ppa:dotnet/backports
```

If you later want to remove the .NET backports PPA, run the above command with the `--remove` flag.

### Command `add-apt-repository` could not be found?

 is a command provided by the `software-properties-common` package. On most Ubuntu systems, this package is installed by default. If your system reports that the command `add-apt-repository` could not be found, install the `software-properties-common` package:

```text
sudo apt update && sudo apt install software-properties-common
```

**Installing the SDK**

The .NET SDK allows you to develop apps with .NET. To install the .NET SDK, run the following command:

```text
sudo apt update && sudo apt install dotnet-sdk-7.0
```

#### TIP
There also exists a package with the name `dotnet7`. This is an alias for the `dotnet-sdk-7.0` package.

**Installing the runtime**

#### NOTE
If you installed the .NET SDK, the corresponding runtime is installed automatically as a required dependency.

A .NET runtime allows you to run .NET apps that don’t provide a runtime. The following command installs the ASP.NET Core Runtime, which is the most compatible runtime for .NET:

```text
sudo apt update && sudo apt install aspnetcore-runtime-7.0
```

Alternatively, you can just install the .NET runtime without the ASP.NET Core components:

```text
sudo apt update && sudo apt install dotnet-runtime-7.0
```

### .NET 6

<!-- Content for Ubuntu 24.04 LTS (Noble Numbat) and .NET 6 -->

#### CAUTION
This .NET version is no longer maintained.

Available for architectures:
: `amd64` (aka `x64`), `arm64`

**Registering the .NET backports PPA**

This version of .NET is not available in the Ubuntu archive because Canonical is not committed to maintaining this version of .NET for the lifetime of this Ubuntu version. But Canonical maintains builds in the [.NET backports PPA](https://documentation.ubuntu.com/ubuntu-for-developers/reference/availability/dotnet.md#dotnet-backports-ppa). The maintenance is on a best-effort basis and limited to the upstream lifetime of this .NET version: [.NET Support Policy](https://dotnet.microsoft.com/en-us/platform/support/policy).

Add the .NET backports PPA as a source for APT:

```text
sudo add-apt-repository ppa:dotnet/backports
```

If you later want to remove the .NET backports PPA, run the above command with the `--remove` flag.

### Command `add-apt-repository` could not be found?

 is a command provided by the `software-properties-common` package. On most Ubuntu systems, this package is installed by default. If your system reports that the command `add-apt-repository` could not be found, install the `software-properties-common` package:

```text
sudo apt update && sudo apt install software-properties-common
```

**Installing the SDK**

The .NET SDK allows you to develop apps with .NET. To install the .NET SDK, run the following command:

```text
sudo apt update && sudo apt install dotnet-sdk-6.0
```

#### TIP
There also exists a package with the name `dotnet6`. This is an alias for the `dotnet-sdk-6.0` package.

**Installing the runtime**

#### NOTE
If you installed the .NET SDK, the corresponding runtime is installed automatically as a required dependency.

A .NET runtime allows you to run .NET apps that don’t provide a runtime. The following command installs the ASP.NET Core Runtime, which is the most compatible runtime for .NET:

```text
sudo apt update && sudo apt install aspnetcore-runtime-6.0
```

Alternatively, you can just install the .NET runtime without the ASP.NET Core components:

```text
sudo apt update && sudo apt install dotnet-runtime-6.0
```

### 22.04 LTS

Choose the .NET version you want to install:

### .NET 10

<!-- Content for Ubuntu 22.04 LTS (Jammy Jellyfish) and .NET 10 -->

Available for architectures:
: `amd64` (aka `x64`), `arm64`, `s390x` (aka IBM System Z), `ppc64el` (aka POWER)

**Registering the .NET backports PPA**

This version of .NET is not available in the Ubuntu archive because Canonical is not committed to maintaining this version of .NET for the lifetime of this Ubuntu version. But Canonical maintains builds in the [.NET backports PPA](https://documentation.ubuntu.com/ubuntu-for-developers/reference/availability/dotnet.md#dotnet-backports-ppa). The maintenance is on a best-effort basis and limited to the upstream lifetime of this .NET version: [.NET Support Policy](https://dotnet.microsoft.com/en-us/platform/support/policy).

Add the .NET backports PPA as a source for APT:

```text
sudo add-apt-repository ppa:dotnet/backports
```

If you later want to remove the .NET backports PPA, run the above command with the `--remove` flag.

### Command `add-apt-repository` could not be found?

 is a command provided by the `software-properties-common` package. On most Ubuntu systems, this package is installed by default. If your system reports that the command `add-apt-repository` could not be found, install the `software-properties-common` package:

```text
sudo apt update && sudo apt install software-properties-common
```

**Installing the SDK**

The .NET SDK allows you to develop apps with .NET. To install the .NET SDK:

```text
sudo apt update && sudo apt install --install-suggests dotnet-sdk-10.0
```

#### NOTE
Additionally, the package `dotnet-sdk-aot-10.0` is installed as a recommended dependency. This package contains components to build your .NET application as native ahead-of-time compiled code. To not install this package, add the `--no-install-recommends` flag.

The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `dotnet-sdk-dbg-10.0`
* `aspnetcore-runtime-dbg-10.0`
* `dotnet-runtime-dbg-10.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

#### TIP
There also exists a package with the name `dotnet10`. This is an alias for the `dotnet-sdk-10.0` package.

**Installing the runtime**

#### NOTE
If you installed the .NET SDK, the corresponding runtime is installed automatically as a required dependency.

A .NET runtime allows you to run .NET apps that don’t provide a runtime. The following command installs the ASP.NET Core Runtime, which is the most compatible runtime for .NET:

```text
sudo apt update && sudo apt install --install-suggests aspnetcore-runtime-10.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `aspnetcore-runtime-dbg-10.0`
* `dotnet-runtime-dbg-10.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

Alternatively, you can install the .NET runtime without the ASP.NET Core components:

```text
sudo apt update && sudo apt install --install-suggests dotnet-runtime-10.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependency `dotnet-runtime-dbg-10.0`. This package provide PDB debug symbols. Remove this flag if you do not want to install this package.

### .NET 9

<!-- Content for Ubuntu 22.04 LTS (Jammy Jellyfish) and .NET 9 -->

Available for architectures:
: `amd64` (aka `x64`), `arm64`, `s390x` (aka IBM System Z), `ppc64el` (aka POWER)

**Registering the .NET backports PPA**

This version of .NET is not available in the Ubuntu archive because Canonical is not committed to maintaining this version of .NET for the lifetime of this Ubuntu version. But Canonical maintains builds in the [.NET backports PPA](https://documentation.ubuntu.com/ubuntu-for-developers/reference/availability/dotnet.md#dotnet-backports-ppa). The maintenance is on a best-effort basis and limited to the upstream lifetime of this .NET version: [.NET Support Policy](https://dotnet.microsoft.com/en-us/platform/support/policy).

Add the .NET backports PPA as a source for APT:

```text
sudo add-apt-repository ppa:dotnet/backports
```

If you later want to remove the .NET backports PPA, run the above command with the `--remove` flag.

### Command `add-apt-repository` could not be found?

 is a command provided by the `software-properties-common` package. On most Ubuntu systems, this package is installed by default. If your system reports that the command `add-apt-repository` could not be found, install the `software-properties-common` package:

```text
sudo apt update && sudo apt install software-properties-common
```

**Installing the SDK**

The .NET SDK allows you to develop apps with .NET. To install the .NET SDK:

```text
sudo apt update && sudo apt install --install-suggests dotnet-sdk-9.0
```

#### NOTE
Additionally, the package `dotnet-sdk-aot-9.0` is installed as a recommended dependency. This package contains components to build your .NET application as native ahead-of-time compiled code. To not install this package, add the `--no-install-recommends` flag.

The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `dotnet-sdk-dbg-9.0`
* `aspnetcore-runtime-dbg-9.0`
* `dotnet-runtime-dbg-9.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

#### TIP
There also exists a package with the name `dotnet9`. This is an alias for the `dotnet-sdk-9.0` package.

**Installing the runtime**

#### NOTE
If you installed the .NET SDK, the corresponding runtime is installed automatically as a required dependency.

A .NET runtime allows you to run .NET apps that don’t provide a runtime. The following command installs the ASP.NET Core Runtime, which is the most compatible runtime for .NET:

```text
sudo apt update && sudo apt install --install-suggests aspnetcore-runtime-9.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `aspnetcore-runtime-dbg-9.0`
* `dotnet-runtime-dbg-9.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

Alternatively, you can install the .NET runtime without the ASP.NET Core components:

```text
sudo apt update && sudo apt install --install-suggests dotnet-runtime-9.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependency `dotnet-runtime-dbg-9.0`. This package provides PDB debug symbols. Remove this flag if you do not want to install this package.

### .NET 8

<!-- Content for Ubuntu 22.04 LTS (Jammy Jellyfish) and .NET 8 -->

Available for architectures:
: `amd64` (aka `x64`), `arm64`, `s390x` (aka IBM System Z), `ppc64el` (aka POWER)

**Installing proposed updates (optional)**

Every .NET release that does not contain security fixes is only available with a delay of at least a week and sometimes much longer.

To install updates as soon as they are available, see the section [Installing proposed .NET updates](#dotnet-install-proposed-updates); otherwise you can skip this part.

**Installing the SDK**

The .NET SDK allows you to develop apps with .NET. To install the .NET SDK:

```text
sudo apt update && sudo apt install --install-suggests dotnet-sdk-8.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `dotnet-sdk-dbg-8.0`
* `aspnetcore-runtime-dbg-8.0`
* `dotnet-runtime-dbg-8.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

#### TIP
There also exists a package with the name `dotnet8`. This is an alias for the `dotnet-sdk-8.0` package.

**Installing the runtime**

#### NOTE
If you installed the .NET SDK, the corresponding runtime is installed automatically as a required dependency.

A .NET runtime allows you to run .NET apps that don’t provide a runtime. To install the ASP.NET Core Runtime (the most compatible runtime for .NET):

```text
sudo apt update && sudo apt install --install-suggests aspnetcore-runtime-8.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependencies:

* `aspnetcore-runtime-dbg-8.0`
* `dotnet-runtime-dbg-8.0`

These packages provide PDB debug symbols. Remove this flag if you do not want to install them.

Alternatively, you can install the .NET runtime without the ASP.NET Core components:

```text
sudo apt update && sudo apt install --install-suggests dotnet-runtime-8.0
```

#### NOTE
The flag `--install-suggests` instructs APT to install the suggested dependency `dotnet-runtime-dbg-8.0`. This packages provides PDB debug symbols. Remove this flag if you do not want to install this package.

### .NET 7

<!-- Content for Ubuntu 22.04 LTS (Jammy Jellyfish) and .NET 7 -->

Available for architectures:
: `amd64` (aka `x64`), `arm64`

**Installing proposed updates (optional)**

Every .NET release that does not contain security fixes is only available with a delay of at least a week and sometimes much longer.

To install updates as soon as they are available, see the section [Installing proposed .NET updates](#dotnet-install-proposed-updates); otherwise you can skip this part.

**Installing the SDK**

The .NET SDK allows you to develop apps with .NET. To install the .NET SDK, run the following command:

```text
sudo apt update && sudo apt install dotnet-sdk-7.0
```

#### TIP
There also exists a package with the name `dotnet7`. This is an alias for the `dotnet-sdk-7.0` package.

**Installing the runtime**

#### NOTE
If you installed the .NET SDK, the corresponding runtime is installed automatically as a required dependency.

A .NET runtime allows you to run .NET apps that don’t provide a runtime. The following command installs the ASP.NET Core Runtime, which is the most compatible runtime for .NET:

```text
sudo apt update && sudo apt install aspnetcore-runtime-7.0
```

Alternatively, you can just install the .NET runtime without the ASP.NET Core components:

```text
sudo apt update && sudo apt install dotnet-runtime-7.0
```

### .NET 6

<!-- Content for Ubuntu 22.04 LTS (Jammy Jellyfish) and .NET 6 -->

Available for architectures:
: `amd64` (aka `x64`), `arm64`

**Installing proposed updates (optional)**

Every .NET release that does not contain security fixes is only available with a delay of at least a week and sometimes much longer.

To install updates as soon as they are available, see the section [Installing proposed .NET updates](#dotnet-install-proposed-updates); otherwise you can skip this part.

**Installing the SDK**

The .NET SDK allows you to develop apps with .NET. To install the .NET SDK, run the following command:

```text
sudo apt update && sudo apt install dotnet-sdk-6.0
```

#### TIP
There also exists a package with the name `dotnet6`. This is an alias for the `dotnet-sdk-6.0` package.

**Installing the runtime**

#### NOTE
If you installed the .NET SDK, the corresponding runtime is installed automatically as a required dependency.

A .NET runtime allows you to run .NET apps that don’t provide a runtime. The following command installs the ASP.NET Core Runtime, which is the most compatible runtime for .NET:

```text
sudo apt update && sudo apt install aspnetcore-runtime-6.0
```

Alternatively, you can just install the .NET runtime without the ASP.NET Core components:

```text
sudo apt update && sudo apt install dotnet-runtime-6.0
```

<a id="dotnet-install-proposed-updates"></a>

#### Installing proposed .NET updates

This section shows how to install proposed updates for Ubuntu .NET packages from the Ubuntu archive.

##### Motivation

Every .NET release that does not contain security fixes has to follow the Ubuntu [stable release update (SRU) process](https://documentation.ubuntu.com/sru/en/latest/). This process delays the deployment of .NET releases by at least a week and sometimes much longer (depending on the backlog of the SRU reviewers).

If you want to install new .NET releases as soon as they are available, you can configure APT to install the proposed updates to skip this delay.

#### NOTE
Canonical is collaborating with Microsoft and other .NET partners. .NET releases are thoroughly tested before they are uploaded to the Ubuntu archive. Historically, no significant regressions have been reported for .NET proposed updates. Therefore, the risk of installing proposed updates for .NET can be considered minimal or at least insignificantly small compared to waiting for the SRU completion.

##### Adding the proposed Ubuntu updates APT repository

First add the proposed Ubuntu updates APT repository as a source for APT to install updates from.

If the file `/etc/apt/sources.list.d/ubuntu.sources` exists on your system, add `<release>-proposed` to the `Suites:` line. For example:

```text
Types: deb
URIs: http://archive.ubuntu.com/ubuntu
Suites: noble noble-updates noble-backports noble-proposed
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
```

Otherwise, modify the software sources manually by adding the proposed archive to your APT sources:

- for `amd64` (aka `x64`) systems:
  ```text
  sudo tee /etc/apt/sources.list.d/ubuntu-$(lsb_release -cs)-proposed.list >/dev/null <<EOF
  # Enable Ubuntu proposed archive
  deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe
  EOF
  ```
- for `arm64`, `s390x` (aka IBM System Z) or `ppc64el` (aka POWER) systems
  ```text
  sudo tee /etc/apt/sources.list.d/ubuntu-$(lsb_release -cs)-proposed.list >/dev/null <<EOF
  # Enable Ubuntu proposed archive
  deb http://ports.ubuntu.com/ubuntu-ports $(lsb_release -cs)-proposed restricted main multiverse universe
  EOF
  ```

Now update APT to fetch the package index from the added archive:

```text
sudo apt update
```

#### IMPORTANT
If using Ubuntu 22.04 or lower, configure APT to not install proposed updates by default. This is already the default since Ubuntu 24.04. Otherwise APT installs proposed updates for all packages.

```text
sudo tee /etc/apt/preferences.d/proposed-updates >/dev/null <<EOF
# Configure apt to allow selective installs of packages from proposed
Package: *
Pin: release a=$(lsb_release -cs)-proposed
Pin-Priority: 400
EOF
```

##### Configuring APT to install proposed .NET updates

Finally, configure APT to consider .NET packages from the proposed archive for installation:

```text
sudo tee /etc/apt/preferences.d/dotnet-proposed-updates >/dev/null <<EOF
# Configure apt to install dotnet packages from proposed
Package: src:dotnet*
Pin: release a=$(lsb_release -cs)-proposed
Pin-Priority: 500
EOF
```

##### Disabling installation of proposed updates

To stop the package management system from installing proposed .NET updates:

1. Delete the configuration you created.
2. Update the APT package index:
   ```text
   sudo apt update
   ```

#### NOTE
Already installed proposed updates remain installed. To remove them, uninstall and re-install the affected packages.

<a id="dotnet-installation-microsoft-packages"></a>

### Installing .NET from Microsoft packages

<!-- 

TODO: add doumentation about conflicts with Ubuntu provided packages 
      and how to resolve them
-->

For this installation method, see Microsoft’s documentation: [Install .NET SDK or .NET Runtime on Ubuntu](https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-install).

<a id="dotnet-installation-microsoft-script"></a>

### Installing .NET with the Microsoft installation script

For this installation method, see Microsoft’s documentation: [Install .NET on Linux by using an install script or by extracting binaries](https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual).

<a id="dotnet-installation-microsoft-manual"></a>

### Installing .NET manually

For this installation method, see Microsoft’s documentation: [Manual install](https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#manual-install).

## Checking installed versions and components

To display installed .NET SDKs, runtimes, and other useful information, run the following command:

```text
dotnet --info
```

To list installed .NET SDKs, run the following command:

```text
dotnet --list-sdks
```

To list installed .NET runtimes, run the following command:

```text
dotnet --list-runtimes
```

Example output:

`dev@ubuntu:~$ ``dotnet --info`
```text
.NET SDK:
 Version:           8.0.113
 Commit:            67977f6ab7
 Workload version:  8.0.100-manifests.bbbf61fd

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  24.04
 OS Platform: Linux
 RID:         ubuntu.22.04-x64
 Base Path:   /var/snap/dotnet/common/dotnet/sdk/8.0.113/

.NET workloads installed:
 Workload version: 8.0.100-manifests.bbbf61fd
There are no installed workloads to display.

Host:
  Version:      9.0.1
  Architecture: x64
  Commit:       1cf154a56d

.NET SDKs installed:
  8.0.113 [/var/snap/dotnet/common/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.13 [/var/snap/dotnet/common/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.13 [/var/snap/dotnet/common/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

8.0.113 [/var/snap/dotnet/common/dotnet/sdk]

Microsoft.AspNetCore.App 8.0.13 [/var/snap/dotnet/common/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.13 [/var/snap/dotnet/common/dotnet/shared/Microsoft.NETCore.App]
```

<a id="setting-up-dotnet-ide"></a>

## Setting up a .NET IDE

Many editors and IDEs (Integrated Development Environment) come with various degrees of support for .NET workloads. Here are some popular ones:

### JetBrains Rider

JetBrains Rider currently offers the best developer experience for .NET projects on Linux. It integrates extensive debugging and profiling tools. It is free for non-commercial use.

To install [JetBrains Rider](https://snapcraft.io/rider), run the following command:

```text
sudo snap install rider --classic
```

### Visual Studio Code

The following popular .NET extensions are available for VS Code:

| Extension                                                                                 | Description                                                       | Terms                                                                                                                                                 |
|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
| [C#](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp):          | Base language support for C#                                      | free                                                                                                                                                  |
| [C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) | Extended language support and builds on top of the “C#” extension | - free for individuals, academia, and open-source development<br/>- paid for organizations<br/><br/>see [details](https://aka.ms/vs/csdevkit/license) |
| [Ionide for F#](https://marketplace.visualstudio.com/items?itemName=Ionide.Ionide-fsharp) | F# language support                                               | free                                                                                                                                                  |

To install [VS Code](https://snapcraft.io/code) run the following command:

```text
sudo snap install code --classic
```

### VS Codium

The following popular .NET extensions are available for VS Codium:

| Extension                                                            | Description                                                                                                                                      | Terms   |
|----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|---------|
| [C#](https://open-vsx.org/extension/muhammad-sammy/csharp):          | Base language support for C#<br/><br/>(fork of the Microsoft extension that replaces the proprietary debugger with Samsung’s FOSS .NET debugger) | free    |
| [Ionide for F#](https://open-vsx.org/extension/Ionide/Ionide-fsharp) | F# language support                                                                                                                              | free    |

To install [VS Codium](https://snapcraft.io/codium), run the following command:

dotnet –list-runtimes

```text
sudo snap install codium --classic
```

## What next

See the tutorial introducing the use of .NET and related tooling: [Develop with .NET on Ubuntu](https://documentation.ubuntu.com/ubuntu-for-developers/tutorials/dotnet-use.md#use-dotnet).
