Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
dotnetup is in public preview. Its features and behavior might change before general availability.
Name
dotnetup env set - Apply or reapply dotnetup environment settings.
Synopsis
dotnetup env set [<MODE>] [options]
Arguments
MODE
The optional .NET access mode:
| Access mode | Behavior |
|---|---|
none |
Does not modify these environment variables. Run .NET with dotnetup dotnet. |
shell |
Modifies the shell profile to set these environment variables. Processes started from that shell use the .NET SDKs and Runtimes installed by dotnetup. |
everywhere |
Modifies the system PATH and sets the user-level DOTNET_ROOT environment variable. Only available on Windows. |
For details about each mode and considerations for everywhere, see
dotnetup environment configuration.
When you omit MODE, the command reapplies the stored mode. The command
fails if no readable configuration exists.
Options
| Option | Description |
|---|---|
--dotnetup-on-path <true\|false> |
Add or remove the directory that contains dotnetup from PATH. If omitted, preserve the stored value. The first stored configuration defaults to true. |
-s, --shell [<bash\|zsh\|fish\|pwsh>] |
Select the profile shell. If omitted, detect the current shell. |
-?, -h, --help |
Show command help. |
Examples
Use the managed dotnet from Bash:
dotnetup env set shell --shell bash
Keep only dotnetup on PATH:
dotnetup env set none --dotnetup-on-path true
Correct drift by reapplying stored settings:
dotnetup env set