This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
This article discusses how to install .NET on Ubuntu.
Important
.NET 10 was released on November 11, 2025. It may take time for the packages to appear in the package manager feeds or for your specific Linux distribution to include it.
Install the SDK (which includes the runtime) if you want to develop .NET apps. Or, if you only need to run apps, install the Runtime. If you're installing the Runtime, we suggest you install theASP.NET Core Runtime as it includes both .NET and ASP.NET Core runtimes.
Use thedotnet --list-sdks anddotnet --list-runtimes commands to see which versions are installed. For more information, seeHow to check that .NET is already installed.
Important
Using a package manager to install .NET from theMicrosoft package feed only supports thex64 architecture. Other architectures, such asArm64, aren't supported by theMicrosoft package feed. Use the Ubuntu feeds or manually install .NET. Be cautious of package mix up problems when using multiple feeds. For more information, see.NET package mix ups on Linux.
For more information on installing .NETwithout a package manager, see one of the following articles:
.NET is available in the Ubuntu package manager feeds. The Microsoft package repository no longer contains .NET packages for Ubuntu.
The following versions of .NET are supported or available for Ubuntu 25.10:
| Supported .NET versions | Available in built-in Ubuntu feed | Available in backports Ubuntu feed | Available in Microsoft feed |
|---|---|---|---|
| 10.0, 9.0, 8.0 | 9.0, 8.0 | None | None |
When anUbuntu version falls out of support, .NET is no longer supported with that version.
Important
.NET 10 was released on November 11, 2025. It may take time for the packages to appear in the package manager feeds or for your specific Linux distribution to include it.
The .NET SDK allows you to develop apps with .NET. If you install the .NET SDK, you don't need to install the corresponding runtime. To install the .NET SDK, run the following commands:
sudo apt-get update && \ sudo apt-get install -y dotnet-sdk-10.0To learn how to use the .NET CLI, see.NET CLI overview.
The ASP.NET Core Runtime allows you to run apps that were made with .NET that didn't provide the runtime. The following commands install the ASP.NET Core Runtime, which is the most compatible runtime for .NET. In your terminal, run the following commands:
sudo apt-get update && \ sudo apt-get install -y aspnetcore-runtime-10.0As an alternative to the ASP.NET Core Runtime, you can install the .NET Runtime, which doesn't include ASP.NET Core support: replaceaspnetcore-runtime-10.0 in the previous command withdotnet-runtime-10.0:
sudo apt-get install -y dotnet-runtime-10.0To learn how to use the .NET CLI, see.NET CLI overview.
When you install with a package manager, these libraries are installed for you. But, if you manually install .NET or you publish a self-contained app, you'll need to make sure these libraries are installed:
Dependencies can be installed with theapt install command. The following snippet demonstrates installing thezlib1g library:
sudo apt install zlib1g.NET is available in the Ubuntu package manager feeds. The Microsoft package repository no longer contains .NET packages for Ubuntu.
The following versions of .NET are supported or available for Ubuntu 25.04:
| Supported .NET versions | Available in built-in Ubuntu feed | Available in backports Ubuntu feed | Available in Microsoft feed |
|---|---|---|---|
| 10.0, 9.0, 8.0 | 9.0, 8.0 | None | None |
When anUbuntu version falls out of support, .NET is no longer supported with that version.
Important
.NET 10 was released on November 11, 2025. It may take time for the packages to appear in the package manager feeds or for your specific Linux distribution to include it.
The .NET SDK allows you to develop apps with .NET. If you install the .NET SDK, you don't need to install the corresponding runtime. To install the .NET SDK, run the following commands:
sudo apt-get update && \ sudo apt-get install -y dotnet-sdk-10.0To learn how to use the .NET CLI, see.NET CLI overview.
The ASP.NET Core Runtime allows you to run apps that were made with .NET that didn't provide the runtime. The following commands install the ASP.NET Core Runtime, which is the most compatible runtime for .NET. In your terminal, run the following commands:
sudo apt-get update && \ sudo apt-get install -y aspnetcore-runtime-10.0As an alternative to the ASP.NET Core Runtime, you can install the .NET Runtime, which doesn't include ASP.NET Core support: replaceaspnetcore-runtime-10.0 in the previous command withdotnet-runtime-10.0:
sudo apt-get install -y dotnet-runtime-10.0To learn how to use the .NET CLI, see.NET CLI overview.
When you install with a package manager, these libraries are installed for you. But, if you manually install .NET or you publish a self-contained app, you'll need to make sure these libraries are installed:
Dependencies can be installed with theapt install command. The following snippet demonstrates installing thezlib1g library:
sudo apt install zlib1g.NET is available in the Ubuntu package manager feeds. The Microsoft package repository no longer contains .NET packages for Ubuntu.
The following versions of .NET are supported or available for Ubuntu 24.04:
| Supported .NET versions | Available in built-in Ubuntu feed | Available in backports Ubuntu feed | Available in Microsoft feed |
|---|---|---|---|
| 10.0, 9.0, 8.0 | 8.0 | 9.0, 7.0, 6.0 | None |
When anUbuntu version falls out of support, .NET is no longer supported with that version.
Important
.NET 10 was released on November 11, 2025. It may take time for the packages to appear in the package manager feeds or for your specific Linux distribution to include it.
.NET is available in the Ubuntu .NET backports package repository. To add the repository, open a terminal and run the following command:
sudo add-apt-repository ppa:dotnet/backportsThe .NET SDK allows you to develop apps with .NET. If you install the .NET SDK, you don't need to install the corresponding runtime. To install the .NET SDK, run the following commands:
sudo apt-get update && \ sudo apt-get install -y dotnet-sdk-10.0To learn how to use the .NET CLI, see.NET CLI overview.
The ASP.NET Core Runtime allows you to run apps that were made with .NET that didn't provide the runtime. The following commands install the ASP.NET Core Runtime, which is the most compatible runtime for .NET. In your terminal, run the following commands:
sudo apt-get update && \ sudo apt-get install -y aspnetcore-runtime-10.0As an alternative to the ASP.NET Core Runtime, you can install the .NET Runtime, which doesn't include ASP.NET Core support: replaceaspnetcore-runtime-10.0 in the previous command withdotnet-runtime-10.0:
sudo apt-get install -y dotnet-runtime-10.0To learn how to use the .NET CLI, see.NET CLI overview.
When you install with a package manager, these libraries are installed for you. But, if you manually install .NET or you publish a self-contained app, you'll need to make sure these libraries are installed:
Dependencies can be installed with theapt install command. The following snippet demonstrates installing thezlib1g library:
sudo apt install zlib1g.NET is available in the Ubuntu package manager feeds, as well as the Microsoft package repository. However, you should only use one or the other to install .NET. Microsoft recommends that you use the Ubuntu package manager feeds. If you want to use the Microsoft package repository, seeHow to register the Microsoft package repository.
The following versions of .NET are supported or available for Ubuntu 22.04:
| Supported .NET versions | Available in built-in Ubuntu feed | Available in .NET backports Ubuntu feed | Available in Microsoft feed |
|---|---|---|---|
| 10.0, 9.0, 8.0 | 8.0, 7.0, 6.0 | 9.0 | 8.0, 7.0, 6.0, 3.1 |
Important
If you're using .NET 8 SDK and Ubuntu 22.04, understand that SDK versions offered by Canonical are always in the.1xx feature band. If you want to use a newer feature band release, use theMicrosoft feed to install the SDK. Make sure you review the information in the.NET package mix ups on Linux article to understand the implications of switching between repository feeds.
When anUbuntu version falls out of support, .NET is no longer supported with that version.
Important
.NET 10 was released on November 11, 2025. It may take time for the packages to appear in the package manager feeds or for your specific Linux distribution to include it.
.NET is available in the Ubuntu .NET backports package repository. To add the repository, open a terminal and run the following command:
sudo add-apt-repository ppa:dotnet/backportsThe .NET SDK allows you to develop apps with .NET. If you install the .NET SDK, you don't need to install the corresponding runtime. To install the .NET SDK, run the following commands:
sudo apt-get update && \ sudo apt-get install -y dotnet-sdk-10.0To learn how to use the .NET CLI, see.NET CLI overview.
The ASP.NET Core Runtime allows you to run apps that were made with .NET that didn't provide the runtime. The following commands install the ASP.NET Core Runtime, which is the most compatible runtime for .NET. In your terminal, run the following commands:
sudo apt-get update && \ sudo apt-get install -y aspnetcore-runtime-10.0As an alternative to the ASP.NET Core Runtime, you can install the .NET Runtime, which doesn't include ASP.NET Core support: replaceaspnetcore-runtime-10.0 in the previous command withdotnet-runtime-10.0:
sudo apt-get install -y dotnet-runtime-10.0To learn how to use the .NET CLI, see.NET CLI overview.
When you install with a package manager, these libraries are installed for you. But, if you manually install .NET or you publish a self-contained app, you'll need to make sure these libraries are installed:
Dependencies can be installed with theapt install command. The following snippet demonstrates installing thezlib1g library:
sudo apt install zlib1gThe following versions of .NET are ❌ no longer supported:
.NET package names are standardized across all Linux distributions. The following table lists the packages:
All versions of .NET are available for download athttps://dotnet.microsoft.com/download/dotnet, but requiremanual installation. You can try to use the package manager to install a different version of .NET. However, the requested version might not be available.
The packages added to package manager feeds are named in a hackable format, for example:{product}-{type}-{version}.
product
The type of .NET product to install. Valid options are:
dotnetaspnetcoretype
Chooses the SDK or the runtime. Valid options are:
sdk (only available for thedotnet product)runtimeversion
The version of the SDK or runtime to install. Valid options are any released version, such as:
9.08.03.12.1It's possible the SDK/runtime you're trying to download isn't available for your Linux distribution. For a list of supported distributions, seeInstall .NET on Linux.
aspnetcore-runtime-9.0dotnet-runtime-2.1dotnet-sdk-5.0dotnet-sdk-3.1Note
Some package might not be available on your Linux distribution.
If the package-version combination doesn't work, it's not available. For example, there isn't an ASP.NET Core SDK. The SDK components for ASP.NET Core are included with the .NET SDK. The valueaspnetcore-sdk-8.0 is incorrect and should bedotnet-sdk-8.0. For a list of Linux distributions supported by .NET, see.NET dependencies and requirements.
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?
Was this page helpful?
Want to try using Ask Learn to clarify or guide you through this topic?