Skip to content

Latest commit

 

History

History
89 lines (56 loc) · 4.93 KB

linux.md

File metadata and controls

89 lines (56 loc) · 4.93 KB

Linux Distribution Support and Compatibility

.NET can be installed and run on almost any Linux distribution. Packages that are available in a given distribution are compatible with that distribution. Packages and binaries from Microsoft are compatible with a broad set of distributions.

The .NET community provides best effort support across all Linux distributions. Commercial support is provided for some popular distributions.

Containers

The official .NET container images are published to the Microsoft Artifact Registry. These images are built by Microsoft and are kept up-to-date with new .NET versions and base image updates.

Several other vendors distribute their own versions of .NET containers to other registries:

Please note that these other .NET container image distributions will have different support policies from the official images.

Packages

.NET is included in the package archives of the following distributions:

In general, you can install the .NET SDK via a versioned package, like dotnet8 or dotnet-sdk-8.0.

sudo apt update && sudo apt install -y dotnet-sdk-8.0

Microsoft packages

Microsoft offers alternate package feeds at packages.microsoft.com that include the Microsoft binary build of .NET. They are documented at Install .NET on Linux. You can move back and forth between distribution and Microsoft archives using a variety of package manager patterns and previous challenges to guide you.

Microsoft is no longer publishing packages for Ubuntu starting with Ubuntu 24.04 and other distros with .NET 9 Package Publishing.

SDK feature bands are the only significant difference between Microsoft and distro-provided builds. Distro-provided SDK builds are always within the .1xx feature band, while Microsoft SDK builds are always for the latest feature band, for example .2xx.

Dependencies

.NET has multiple dependencies that must be installed. If you install .NET via packages, these packages will typically already be installed.

Portable build compatibility

Portable builds are compiled to provide broad compatibility. The minimum supported libc version is documented in .NET Supported OS Policy.

Microsoft provides portable builds that support both glibc-based and musl libc-based Linux distributions.

The following examples demonstrate how to find the libc version provided for your distribution.

On Alpine 3.13:

# ldd --version
musl libc (aarch64)
Version 1.2.2

On Ubuntu 16.04:

# ldd --version
ldd (Ubuntu GLIBC 2.23-0ubuntu11.3) 2.23

OpenSSL compatibility

Portable builds support both OpenSSL 1.x and 3.x and can be run on distributions with either version of OpenSSL. For example, Ubuntu 22.04 only includes OpenSSL 3 in its official package archive.

The highest OpenSSL version is loaded by default, but it can be configured to use a specific version.

Building .NET from source

.NET can be built from source via dotnet/dotnet.

For distributions publishing packages, follow .NET Packaging Guidelines.