Install .NET on Linux

.NET is available on different Linux distributions. Most Linux platforms and distributions have a major release each year, and most provide a package manager that is used to install .NET. This article describes what is currently supported and which package manager is used.

The rest of this article is a breakdown of each major Linux distribution that .NET supports. All .NET releases remain supported until either the version of .NET reaches end-of-support or the Linux distribution reaches end-of-life.

For the best compatibility, choose a long-term release (LTS) version.

Unsupported releases

The following versions of .NET are ❌ no longer supported. The downloads for these still remain published:

  • 3.0
  • 2.2
  • 2.0

These unsupported versions aren't detailed in the sections below and your mileage may vary if you try to install them.

Manual installation

If you don't want to use a package manager to install .NET on Linux, you can install .NET in one of the following ways:

Be sure to check the appropriate distribution page for more information about any required dependencies that may be missing when you do a manual installation.

Alpine

The following table is a list of currently supported .NET releases and the versions of Alpine they're supported on. These versions remain supported until either the version of .NET reaches end-of-support or the version of Alpine reaches end-of-life.

  • A ✔️ indicates that the version of Alpine or .NET is still supported.
  • A ❌ indicates that the version of Alpine or .NET isn't supported on that Alpine release.
  • When both a version of Alpine and a version of .NET have ✔️, that OS and .NET combination is supported.
Alpine .NET Core 2.1 .NET Core 3.1 .NET 5.0
✔️ 3.13 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 3.12 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 3.11 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 3.10 ✔️ 2.1 ✔️ 3.1 ❌ 5.0
3.9 ✔️ 2.1 ✔️ 3.1 ❌ 5.0
3.8 ✔️ 2.1 ✔️ 3.1 ❌ 5.0

For more information, see Install .NET on Alpine.

CentOS

CentOS 7 uses Yum as a package manager and CentOS 8 uses DNF.

The following table is a list of currently supported .NET releases on both CentOS 7 and CentOS 8. These versions remain supported until either the version of .NET reaches end-of-support or the version of CentOS is no longer supported.

CentOS .NET Core 2.1 .NET Core 3.1 .NET 5.0
✔️ 8 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 7 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0

For more information, see Install .NET on CentOS.

Debian

Debian uses APT (Advanced Package Tool) as a package manager.

The following table is a list of currently supported .NET releases and the versions of Debian they're supported on. These versions remain supported until either the version of .NET reaches end-of-support or the version of Debian reaches end-of-life.

  • A ✔️ indicates that the version of Debian or .NET is still supported.
  • A ❌ indicates that the version of Debian or .NET isn't supported on that Debian release.
  • When both a version of Debian and a version of .NET have ✔️, that OS and .NET combination is supported.
Debian .NET Core 2.1 .NET Core 3.1 .NET 5.0
✔️ 10 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 9 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
8 ✔️ 2.1 ❌ 3.1 ❌ 5.0

For more information, see Install .NET on Debian.

Fedora

Fedora uses DNF as its package manager.

The following table is a list of currently supported .NET releases and the versions of Fedora they're supported on. These versions remain supported until either the version of .NET reaches end-of-support or the version of Fedora reaches end-of-life.

  • A ✔️ indicates that the version of Fedora or .NET is still supported.
  • A ❌ indicates that the version of Fedora or .NET isn't supported on that Fedora release.
  • When both a version of Fedora and a version of .NET have ✔️, that OS and .NET combination is supported.
Fedora .NET Core 2.1 .NET Core 3.1 .NET 5.0
✔️ 33 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 32 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
31 ✔️ 2.1 ✔️ 3.1 ❌ 5.0
30 ✔️ 2.1 ✔️ 3.1 ❌ 5.0
29 ✔️ 2.1 ✔️ 3.1 ❌ 5.0
28 ✔️ 2.1 ❌ 3.1 ❌ 5.0
27 ✔️ 2.1 ❌ 3.1 ❌ 5.0

For more information, see Install .NET on Fedora.

openSUSE

openSUSE uses zypper as the package manager.

The following table is a list of currently supported .NET releases on openSUSE 15. These versions remain supported until either the version of .NET reaches end-of-support or the version of openSUSE is no longer supported.

openSUSE .NET Core 2.1 .NET Core 3.1 .NET 5.0
✔️ 15 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0

For more information, see Install .NET on openSUSE.

Red Hat

Red Hat Enterprise Linux (RHEL) uses yum (RHEL 7) and DNF (RHEL 8) as the package manager.

The following table is a list of currently supported .NET releases on both RHEL 7 and RHEL 8. These versions remain supported until either the version of .NET reaches end-of-support or the version of RHEL is no longer supported.

  • A ✔️ indicates that the version of RHEL or .NET is still supported.
  • A ❌ indicates that the version of RHEL or .NET isn't supported on that RHEL release.
  • When both a version of RHEL and a version of .NET have ✔️, that OS and .NET combination is supported.
RHEL .NET Core 2.1 .NET Core 3.1 .NET 5.0
✔️ 8 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 7 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0

For more information, see Install .NET on RHEL.

SLES

SLES uses zypper as the package manager.

The following table is a list of currently supported .NET releases on both SLES 12 SP2 and SLES 15. These versions remain supported until either the version of .NET reaches end-of-support or the version of SLES is no longer supported.

  • A ✔️ indicates that the version of SLES or .NET is still supported.
  • A ❌ indicates that the version of SLES or .NET isn't supported on that SLES release.
  • When both a version of SLES and a version of .NET have ✔️, that OS and .NET combination is supported.
SLES .NET Core 2.1 .NET Core 3.1 .NET 5.0
✔️ 15 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 12 SP2 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0

For more information, see Install .NET on SLES.

Ubuntu

Ubuntu uses APT (Advanced Package Tool) as a package manager.

The following table represents the support status of Ubuntu and .NET.

  • A ✔️ indicates that the version of Ubuntu or .NET is still supported.
  • A ❌ indicates that the version of Ubuntu or .NET isn't supported on that Ubuntu release.
  • When both a version of Ubuntu and a version of .NET have ✔️, that OS and .NET combination is supported.
Ubuntu .NET Core 2.1 .NET Core 3.1 .NET 5.0
✔️ 20.10 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
✔️ 20.04 (LTS) ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
19.10 ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
19.04 ✔️ 2.1 ✔️ 3.1 ❌ 5.0
18.10 ✔️ 2.1 ❌ 3.1 ❌ 5.0
✔️ 18.04 (LTS) ✔️ 2.1 ✔️ 3.1 ✔️ 5.0
17.10 ✔️ 2.1 ❌ 3.1 ❌ 5.0
17.04 ✔️ 2.1 ❌ 3.1 ❌ 5.0
16.10 ❌ 2.1 ❌ 3.1 ❌ 5.0
✔️ 16.04 (LTS) ✔️ 2.1 ✔️ 3.1 ✔️ 5.0

For more information, see Install .NET on Ubuntu.

Next steps