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
curlto 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:
| |
Then reload the file:
| |
Now you can check if .NET is installed:
| |
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:
| |
.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.
| |
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. đ
