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
* Update latest status of linux
* Found packages for Deb13
* Latest opensuse state
* typo
* Apply suggestions from code review
Co-authored-by: Copilot <[email protected]>
* Update with more state; fix snap-sdk changes from 9+
---------
Co-authored-by: Copilot <[email protected]>
Copy file name to clipboardExpand all lines: docs/core/install/linux-debian.md
+5-9Lines changed: 5 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.custom: linux-related-content
9
9
10
10
# Install the .NET SDK or the .NET Runtime on Debian
11
11
12
-
This article describes how to install .NET on Debian. When a Debian version falls out of support, .NET is no longer supported with that version. However, these instructions may help you to get .NET running on those versions, even though it isn't supported.
12
+
This article describes how to install .NET on Debian. When a Debian version falls out of support, .NET is no longer supported with that version. However, these instructions might help you to get .NET running on those versions, even though it isn't supported.
When a new patch release is available for .NET, you can simply upgrade it through APT with the following commands:
97
+
When a new patch release is available for .NET, you can upgrade it through APT with the following commands:
102
98
103
99
```bash
104
100
sudo apt-get update
105
101
sudo apt-get upgrade
106
102
```
107
103
108
-
If you've upgraded your Linux distribution since installing .NET, you may need to reconfigure the Microsoft package repository. Run the installation instructions for your current distribution version to upgrade to the appropriate package repository for .NET updates.
104
+
If you upgraded your Linux distribution since installing .NET, you might need to reconfigure the Microsoft package repository. Run the installation instructions for your current distribution version to upgrade to the appropriate package repository for .NET updates.
109
105
110
106
## Troubleshooting
111
107
112
-
This section provides information on common errors you may get while using APT to install .NET.
108
+
This section provides information on common errors you might get while using APT to install .NET.
113
109
114
110
### Unable to find package
115
111
@@ -123,7 +119,7 @@ If you're using Debian 12 or later, try the following commands:
Currently, the SLES 15 Microsoft repository setup package installs the *microsoft-prod.repo* file to the wrong directory, preventing zypper from finding the .NET packages. To fix this problem, create a symlink in the correct directory.
76
+
Currently, the SLES 15 Microsoft repository setup package installs the `microsoft-prod.repo` file to the wrong directory, preventing zypper from finding the .NET packages. To fix this problem, create a symlink in the correct directory.
This section provides information on common errors you may get while using the package manager to install .NET.
108
+
This section provides information on common errors you might get while using the package manager to install .NET.
107
109
108
110
### Unable to find package
109
111
@@ -115,13 +117,13 @@ This section provides information on common errors you may get while using the p
115
117
116
118
## Dependencies
117
119
118
-
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:
120
+
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 must make sure these libraries are installed:
119
121
120
122
- krb5
121
123
- libicu
122
124
- libopenssl1_1
123
125
124
-
If the target runtime environment's OpenSSL version is 1.1 or newer, you'll need to install `compat-openssl10`.
126
+
If the target runtime environment's OpenSSL version is 1.1 or newer, install the `compat-openssl10` package.
125
127
126
128
Dependencies can be installed with the `zypper install` command. The following snippet demonstrates installing the `krb5` library:
Snap packages for the .NET SDK are all published under the same identifier:`dotnet-sdk`. A specific version of the SDK can be installed by specifying the channel. The SDK includes both the ASP.NET Core and .NET runtime, versioned to the SDK.
41
+
Starting with .NET 9, snap packages for the .NET SDK are published under version-specific identifiers (for example, `dotnet-sdk-90` for .NET 9 and `dotnet-sdk-100` for .NET 10). Prior to .NET 9, all SDK versions were published under the same identifier `dotnet-sdk`, and you specified the version through a channel. Additionally, .NET 9 and later snap packages support both x64 and Arm64 architectures, while earlier versions only support x64. The SDK includes both the ASP.NET Core and .NET runtime, versioned to the SDK.
41
42
42
43
> [!TIP]
43
44
> The [Snapcraft .NET SDK package page](https://snapcraft.io/dotnet-sdk) includes distribution-specific instructions on how to install Snapcraft and .NET.
44
45
45
46
01. Open a terminal.
46
-
01. Use `snap install` to install the .NET SDK snap package. For example, the following command installs the `latest/stable` channel, which is the default.
47
+
01. Use `snap install` to install the .NET SDK snap package.
47
48
48
-
```bash
49
-
sudo snap install dotnet-sdk --classic
50
-
```
49
+
The `--classic` parameter is required.
50
+
51
+
-**For .NET 9 and later**
52
+
53
+
Install the version-specific package. For example, the following command installs .NET SDK 10:
54
+
55
+
```bash
56
+
sudo snap install dotnet-sdk-100 --classic
57
+
```
58
+
59
+
- **For .NET 8 and earlier**
51
60
52
-
- The `--classic` parameter is required.
53
-
- Use the `--channel` parameter to specify which version to install. If this parameter is omitted, `latest/stable` is used. For example, `--channel 8.0/stable` installs .NET SDK 8.0.
61
+
Install from the `dotnet-sdk` package and specify a channel. If this parameter is omitted, `latest/stable` is used. For example, the following command installs .NET SDK 8:
| 7 | `dotnet-sdk --channel 7.0/stable` (out of support) |
77
+
| 6 | `dotnet-sdk --channel 6.0/stable` (out of support) |
78
+
| 5 | `dotnet-sdk --channel 5.0/stable` (out of support) |
79
+
| 3.1 | `dotnet-sdk --channel 3.1/stable` (out of support) |
80
+
| 2.1 | `dotnet-sdk --channel 2.1/stable` (out of support) |
69
81
70
82
## 2. Export the install location
71
83
72
84
The `DOTNET_ROOT` environment variable is often used by tools to determine where .NET is installed. When .NET is installed through Snap, this environment variable isn't configured. You should configure the *DOTNET_ROOT* environment variable in your profile. The path to the snap uses the following format: `/snap/{package}/current`.
73
85
86
+
For .NET 9 and later, use the version-specific package name:
87
+
88
+
```bash
89
+
export DOTNET_ROOT=/snap/dotnet-sdk-100/current
90
+
```
91
+
92
+
For .NET 8 and earlier, use the shared package name:
93
+
74
94
```bash
75
95
export DOTNET_ROOT=/snap/dotnet-sdk/current
76
96
```
@@ -85,7 +105,7 @@ You can edit your shell profile to permanently add the commands. There are many
85
105
- **Korn Shell**: _~/.kshrc_ or _.profile_
86
106
- **Z Shell**: _~/.zshrc* or _.zprofile_
87
107
88
-
Edit the appropriate source file for your shell and add `export DOTNET_ROOT=/snap/dotnet-sdk/current`.
108
+
Edit the appropriate source file for your shell and add the exportcommandfor your installed .NET version. For .NET 9+, use `export DOTNET_ROOT=/snap/dotnet-sdk-100/current` (adjust the version number as needed). For .NET 8 and earlier, use `export DOTNET_ROOT=/snap/dotnet-sdk/current`.
89
109
90
110
## 3. Use the .NET CLI
91
111
@@ -122,7 +142,15 @@ To learn how to use the .NET CLI, see [.NET CLI overview](../tools/index.md).
122
142
123
143
### The dotnet terminal command doesn't work
124
144
125
-
Snap packages can map an alias to a command provided by the package. By default, the .NET SDK snap packages create an aliasfor the `dotnet` command. If the alias wasn't created or was previously removed, the following command shows how to map the alias:
145
+
Snap packages can map an alias to a command provided by the package. By default, the .NET SDK snap packages create an aliasfor the `dotnet` command. If the alias wasn't created or was previously removed, use the following command to map the alias.
146
+
147
+
For .NET 9 and later:
148
+
149
+
```bash
150
+
sudo snap alias dotnet-sdk-100.dotnet dotnet
151
+
```
152
+
153
+
For .NET 8 and earlier:
126
154
127
155
```bash
128
156
sudo snap alias dotnet-sdk.dotnet dotnet
@@ -161,7 +189,13 @@ Try the following steps to fix the issue:
161
189
- `/usr/local/bin/dotnet`
162
190
- `/usr/share/dotnet`
163
191
164
-
Use the following command to create a symbolic link to the snap package:
192
+
Use the following command to create a symbolic link to the snap package. For .NET 9 and later, use the version-specific package name:
0 commit comments