You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> .NET 8 was released on November 14, 2023. It may take time for the packages to appear in the package manager feeds.
10
+
> .NET 9 was released on November 12, 2024. It may take time for the packages to appear in the package manager feeds, or for your specific Linux distribution to include it.
> .NET SDK versions offered by Canonical are always in the [.1xx feature band](../../versions/index.md#versioning-details). If you want to use a newer feature band release, use the [Microsoft feed to install the SDK](../linux-ubuntu.md#register-the-microsoft-package-repository). Make sure you review the information in the [.NET package mix ups on Linux](../linux-package-mixup.md?pivots=os-linux-ubuntu#whats-going-on) article to understand the implications of switching between repository feeds.
10
+
> 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](../../versions/index.md#versioning-details). If you want to use a newer feature band release, use the [Microsoft feed to install the SDK](../linux-ubuntu.md#register-the-microsoft-package-repository). Make sure you review the information in the [.NET package mix ups on Linux](../linux-package-mixup.md?pivots=os-linux-ubuntu#whats-going-on) article to understand the implications of switching between repository feeds.
.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. If you want to use the Microsoft package repository, see [How to register the Microsoft package repository](../linux-ubuntu.md#register-the-microsoft-package-repository).
9
+
.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, see [How to register the Microsoft package repository](../linux-ubuntu.md#register-the-microsoft-package-repository).
@@ -40,6 +40,9 @@ One symptom of these problems is that both the `/usr/lib64/dotnet` and `/usr/sha
40
40
41
41
## What's going on
42
42
43
+
> [!IMPORTANT]
44
+
> Starting with .NET 9 (currently in preview), Microsoft only publishes packages for supported Linux distributions that don't publish their own packages. For more information, see [Install .NET on Linux](linux.md#packages).
45
+
43
46
These errors usually occur when two Linux package repositories provide .NET packages. While Microsoft provides a Linux package repository to source .NET packages, some Linux distributions also provide .NET packages. These distributions include:
Copy file name to clipboardExpand all lines: docs/core/install/linux-ubuntu.md
+14-13Lines changed: 14 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,15 +3,15 @@ title: .NET and Ubuntu overview
3
3
description: Learn about the ways you can install .NET on Ubuntu, either from the built-in package feed, the .NET backports repository, or the Microsoft repository.
This article describes how to install .NET on Ubuntu. Starting with Ubuntu 22.04, most supported versions of .NET are available in the built-in Ubuntu feed. The Ubuntu .NET backports package repository contains the remaining supported .NET versions. For more information about available versions, see the [Supported distributions](#supported-distributions) section.
13
13
14
-
Additionally, for Ubuntu 23.10 and previous versions, the Microsoft package repository contains every version of .NET that is currently, or was previously, supported.
14
+
Canonical has taken over publishing .NET on Ubuntu. Starting with Ubuntu 22.04, Microsoft no longer distributes .NET for Ubuntu to the Microsoft package repository.
15
15
16
16
> [!WARNING]
17
17
> It's recommended that you choose between either Ubuntu or Microsoft feeds to source .NET packages. Don't mix .NET packages from multiple package repositories, as this leads to problems when apps try to resolve a specific version of .NET.
@@ -23,6 +23,12 @@ Additionally, for Ubuntu 23.10 and previous versions, the Microsoft package repo
23
23
|[Package manager<br>(Microsoft feed)](#register-the-microsoft-package-repository)| <ul><li>Supported versions always available.</li><li>Patches are available right way.</li><li>Dependencies are included.</li><li>Easy removal.</li></ul> | <ul><li>Not available for Ubuntu 24.04+.</li><li>Requires registering the Microsoft package repository.</li><li>Preview releases aren't available.</li><li>Only supports x64 Ubuntu.</li></ul> |
24
24
|[Script \ Manual extraction](linux-scripted-manual.md)| <ul><li>Control where .NET is installed.</li><li>Preview releases are available.</li></ul> | <ul><li>Manually install updates.</li><li>Manually install dependencies.</li><li>Manual removal.</li></ul> |
25
25
26
+
## Considerations when upgrading Ubuntu
27
+
28
+
Upgrading Ubuntu to 22.04 or later? Consider uninstalling .NET first.
29
+
30
+
If you used a package manager to install .NET from the Microsoft package repository, you'll end up with a package mix-up problem after upgrading Ubuntu. Now that Canonical publishes .NET to the package feeds for Ubuntu 22.04 (and later versions), the package manager won't know about the previously installed .NET version. The packages can't be upgraded to the latest .NET. First, uninstall them, then reinstall them from the [Ubuntu package repository].
31
+
26
32
## Decide how to install .NET
27
33
28
34
When your version of Ubuntu supports .NET through the built-in or .NET backports Ubuntu feed, support for those builds of .NET is provided by Canonical and the builds might be optimized for different workloads. Microsoft provides support for packages in the Microsoft package repository feed.
@@ -44,9 +50,8 @@ Use the following sections to determine how you should install .NET:
44
50
45
51
Install .NET through the Ubuntu feed. For more information, see the following pages:
46
52
53
+
-[Install .NET on Ubuntu 24.10](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2410).
47
54
-[Install .NET on Ubuntu 24.04](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2404).
48
-
-[Install .NET on Ubuntu 23.10](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2310).
49
-
-[Install .NET on Ubuntu 23.04](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2304).
50
55
-[Install .NET on Ubuntu 22.04](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2204).
Review the [Supported distributions](#supported-distributions) section for more information about what versions of .NET are supported for your version of Ubuntu. If you're installing a version that isn't supported, see [Register the Microsoft package repository](#register-the-microsoft-package-repository).
65
68
@@ -113,7 +116,7 @@ Starting with .NET 8 on Ubuntu 24.04, Canonical supports .NET for the IBM System
113
116
114
117
Install .NET through the built-in Ubuntu feed. For more information, see the following page:
115
118
116
-
-[Install .NET 8 on Ubuntu 24.10](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2404&tabs=dotnet8).
119
+
-[Install .NET 8 on Ubuntu 24.10](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2410&tabs=dotnet8).
117
120
118
121
## Supported distributions
119
122
@@ -125,11 +128,8 @@ The following table is a list of currently supported .NET releases and the versi
> This only applies to Ubuntu versions prior to 24.04. Starting with Ubuntu 24.04, Microsoft no longer publishes packages to the Microsoft package repository. Use the [supported distributions table](#supported-distributions) to determine the best way to install .NET.
189
+
187
190
The Microsoft package repository contains all versions of .NET that were previously, or are currently, [supported with your version of Ubuntu](#supported-distributions). If your version of Ubuntu provides .NET packages, you'll need to deprioritize the Ubuntu packages and use the Microsoft repository. For instructions on how to deprioritize the packages, see [I need a version of .NET that isn't provided by my Linux distribution](linux-package-mixup.md?pivots=os-linux-ubuntu#i-need-a-version-of-net-that-isnt-provided-by-my-linux-distribution).
188
191
189
192
> [!IMPORTANT]
@@ -223,7 +226,7 @@ sudo apt update
223
226
224
227
## Install .NET
225
228
226
-
After you've [registered the Microsoft package repository](#register-the-microsoft-package-repository), or if the Ubuntu Feeds supports the .NET package for your Ubuntu version, you can install .NET through the package manager with the `sudo apt install <package-name>` command. Replace `<package-name>` with the name of the .NET package you want to install. For example, to install .NET SDK 8.0, use the command `sudo apt install dotnet-sdk-8.0`. The following table lists the currently supported .NET packages:
229
+
Install .NET through the package manager with the `sudo apt install <package-name>` command. Replace `<package-name>` with the name of the .NET package you want to install. For example, to install .NET SDK 8.0, use the command `sudo apt install dotnet-sdk-8.0`. The following table lists the currently supported .NET packages (which [may vary by your Ubuntu version](#supported-distributions)):
@@ -234,8 +237,6 @@ After you've [registered the Microsoft package repository](#register-the-microso
234
237
|**6.0**| .NET | Runtime |`dotnet-runtime-6.0`|
235
238
|**6.0**| .NET | SDK |`dotnet-sdk-6.0`|
236
239
237
-
If you want to install an unsupported version of .NET, check the [Supported distributions](#supported-distributions) section to see if that version of .NET is available. Then, substitute the **version** of .NET you want to install. For example, to install ASP.NET Core 8.0, use the package name `aspnetcore-runtime-8.0`.
238
-
239
240
> [!TIP]
240
241
> If you're not creating .NET apps, install the ASP.NET Core runtime as it includes the .NET runtime and also supports ASP.NET Core apps.
@@ -19,16 +19,21 @@ This article describes how .NET is available on various Linux distributions. .NE
19
19
20
20
## Packages
21
21
22
-
.NET is available in [official package archives](https://github.com/dotnet/core/blob/main/linux.md)for various Linux distributions and [packages.microsoft.com](https://packages.microsoft.com/).
22
+
Starting with .NET 9 (currently in preview), Microsoft only publishes packages for supported Linux distributions that don't publish their own packages. Packages are published in the Microsoft package repository at <https://packages.microsoft.com/>. This includes the following Linux distributions:
23
23
24
-
-[Alpine](linux-alpine.md)
24
+
-Azure Linux 3.0
25
25
-[Debian](linux-debian.md)
26
-
-[Fedora](linux-fedora.md)
27
-
-[openSUSE](linux-opensuse.md)
26
+
-[openSUSE Leap](linux-opensuse.md)
28
27
-[SUSE Enterprise Linux](linux-sles.md)
29
-
-[Ubuntu](linux-ubuntu.md)
30
28
31
-
.NET is [supported by Microsoft](https://github.com/dotnet/core/blob/main/microsoft-support.md) when downloaded from a Microsoft source. Best effort support is offered from Microsoft when downloaded from elsewhere. You can open issues at [dotnet/core](https://github.com/dotnet/core) if you run into problems.
29
+
The following Linux distributions officially support .NET, and publish their own .NET packages:
0 commit comments