.NET can be installed on Linux in multiple ways, via packages, scripts, or tarballs. It can be installed globally, locally/privately, or with an app.
.NET is supported on Linux per .NET Support and Compatibility for Linux Distributions.
.NET is included in the package archives of the following distributions:
In general, you can install the .NET SDK via a versioned package, like dotnet7
or dotnet-sdk-7.0
. For example, on Ubuntu 22.10, you can install .NET via the following.
sudo apt update && sudo apt install -y dotnet-sdk-7.0
Microsoft offers alternate package feeds at packages.microsoft.com that include the Microsoft binary build of .NET. They are document 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.
.NET containers are published to multiple registries.
Microsoft publishes container images per .NET container publishing policy. Other distributions may have different policies.
.NET can be built from source via dotnet/dotnet.
For distributions publishing packages, follow .NET Packaging Guidelines.