LinuxmacOSWindows

Where Is the dotnet CLI Home Directory?

dotnet CLI home directory with tools, templates and telemetry settings, and its override.

Last updated

The .NET CLI keeps a per user home directory with global tools, custom templates, telemetry settings and first run markers. SDK installs live separately in system locations, so wiping and reinstalling the SDK never touches your tools and templates.

The DOTNET_CLI_HOME variable relocates the profile, the documented route for roaming profiles, containers and cramped home drives. Telemetry lives here too: the opt out sentinel sits in this tree, which is why the choice follows you across SDK upgrades instead of resetting.

Where .NET stores this, by platform

Linux
~/.dotnet

Key children include tools for global tools, template packages, and the telemetry opt out state. Set DOTNET_CLI_HOME in your shell rc or environment to relocate. SDKs themselves stay in system paths outside this tree.

macOS
~/.dotnet

Same layout as Linux. Homebrew and installer based SDKs share this profile location, so tools installed under one SDK remain available after upgrading to the next.

Windows
%USERPROFILE%\.dotnet

Same role as on Unix: global tools, templates and telemetry state. SDKs live under Program Files. Relocate with DOTNET_CLI_HOME when roaming profiles cap your AppData size.

Frequently asked questions

how do i move the dotnet folder to another drive

Set DOTNET_CLI_HOME to the new path before running dotnet commands, then move the .dotnet directory there. Tools, templates and first run state all resolve from that variable, so one move migrates the CLI profile.

is dotnet home the same as the sdk install folder

No. The SDK install under Program Files or /usr/share/dotnet is the runtime itself, while ~/.dotnet holds your CLI profile: installed global tools, custom templates and telemetry opt out. Reinstalls replace the first and leave the second alone.

Notice an outdated path? Let us know.