Skip to content

Commit d7e1195

Browse files
authored
Default location of .NET on Linux varies (#34834)
1 parent 1420cd6 commit d7e1195

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

docs/core/tools/dotnet-environment-variables.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: .NET environment variables
33
description: Learn about the environment variables that you can use to configure the .NET SDK, .NET CLI, and .NET runtime.
4-
ms.date: 09/07/2022
4+
ms.date: 03/30/2023
55
---
66

77
# .NET environment variables
@@ -181,7 +181,13 @@ See [EventPipe environment variables](../diagnostics/eventpipe.md#trace-using-en
181181

182182
### `DOTNET_ROOT`, `DOTNET_ROOT(x86)`
183183

184-
Specifies the location of the .NET runtimes, if they are not installed in the default location. The default location on Windows is `C:\Program Files\dotnet`. The default location on Linux and macOS is `/usr/local/share/dotnet`. This environment variable is used only when running apps via generated executables (apphosts). `DOTNET_ROOT(x86)` is used instead when running a 32-bit executable on a 64-bit OS.
184+
Specifies the location of the .NET runtimes, if they are not installed in the default location. The default location on Windows is `C:\Program Files\dotnet`. The default location on macOS is `/usr/local/share/dotnet`. The default location on Linux varies depending on distro and installment method. The default location on Ubuntu 22.04 is `/usr/share/dotnet` (when installed from `packages.microsoft.com`) or `/usr/lib/dotnet` (when installed from Jammy feed). For more information, see the following resources:
185+
186+
* [Troubleshoot app launch failures](../runtime-discovery/troubleshoot-app-launch.md?pivots=os-linux)
187+
* GitHub issue [dotnet/core#7699](https://github.com/dotnet/core/issues/7699)
188+
* GitHub issue [dotnet/runtime#79237](https://github.com/dotnet/runtime/issues/79237)
189+
190+
This environment variable is used only when running apps via generated executables (apphosts). `DOTNET_ROOT(x86)` is used instead when running a 32-bit executable on a 64-bit OS.
185191

186192
### `NUGET_PACKAGES`
187193

0 commit comments

Comments
 (0)