Recently, I tried installing .NET on my Mac using the official script provided by Microsoft. While it works, I ran into a couple of small quirks that I’d like to share — so you don’t have to stumble over the same things.
#


Step 1: Download the Script
#

Microsoft provides a handy install script: [dotnet-install.sh](https://learn.microsoft.com/en-us/dotnet/core/install/macos#install-net-with-a-script).

You can either:

  • Use curl to grab it, or
  • Download it directly in the browser.

⚠ Important: Make sure the file isn’t empty — you’ll want a real dotnet-install.sh script, not a zero-byte placeholder. 😉


Step 2: Put It Somewhere Safe
#

I moved the script into my home directory, so it won’t get deleted accidentally when cleaning up my Downloads folder (you know how that goes
).


Step 3: Run the Script
#

Running the script directly will install (depending on the configuration of the tool) the current LTS (Long Term Support), which (at the time of writing) is .NET 8.


Step 4: Update Your Terminal Path
#

To make .NET globally available, you’ll need to update your shell config.

I’m using zsh, so I edited my .zshrc and added the following lines at the bottom:

1
2
export PATH="$HOME/.dotnet/tools:$PATH"
export PATH="$HOME/.dotnet:$PATH"

Then reload the file:

1
source ~/.zshrc

Now you can check if .NET is installed:

1
dotnet --list-sdks

Step 5: Installing .NET 9 and .NET 10 Preview
#

For me, it was important to have not only .NET 8, but also .NET 9 and .NET 10 Preview.

.NET 9 is easy:

1
./dotnet-install.sh -c 9.0

.NET 10 Preview requires one more trick: you need to specify the quality parameter.

⚠ Heads-up: the short form -q didn’t work for me. You also need to put --quality before the -c parameter.

1
./dotnet-install.sh --quality preview -c 10.0

Bonus: Script Documentation 📖
#

If you’re curious what else the install script can do, check out the official documentation:
 👉 dotnet-install script reference


Takeaway 🎯
#

If you’re installing .NET on macOS:

  • Download the script,
  • Place it somewhere safe,
  • Update your shell config, and
  • Use the right parameters for .NET 9 and 10.

And just like that, you’re running multiple .NET versions side by side on your Mac. 🚀