Skip to content

Instantly share code, notes, and snippets.

@jhochwald
Last active January 31, 2021 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhochwald/26775f48138741f984d2700377247be9 to your computer and use it in GitHub Desktop.
Save jhochwald/26775f48138741f984d2700377247be9 to your computer and use it in GitHub Desktop.
Disable the .NET Telemetry on a MacOS server or workstation (Works on Linux as well)
# Put this to the users .bashrc and/or .profile
# OR
# Put it into /etc/bashrc (On linux it might be /etc/bash.bashrc) and/or /etc/profile
#
# On Linux you might want to create a seperate shell script an put this into /etc/profile.d/ <- It is recommended to do that!
which dotnet > /dev/null 2>&1
if [ $? == 0 ]; then
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export MLDOTNET_CLI_TELEMETRY_OPTOUT=1
# Tweak the 1st run experience
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
fi
alias dotnet > /dev/null 2>&1
if [ $? == 0 ]; then
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export MLDOTNET_CLI_TELEMETRY_OPTOUT=1
# Tweak the 1st run experience
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
fi
@jhochwald
Copy link
Author

I get that Microsoft wants to have some telemetry for .NET! And this is nothing bad, but I don't want to send any telemetry data from production servers or workstations with any critical workloads.

I have it enabled on my development systems! I'm not paranoid ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment