Skip to content

'dotnet' command not found


1. Download and install .NET (version 8 or 9)

Section titled “1. Download and install .NET (version 8 or 9)”

Download and install .NET if you haven’t already.

Then close and reopen your terminal to test the command again.


2. Add the ‘.dotnet’ folder to your PATH

Section titled “2. Add the ‘.dotnet’ folder to your PATH”

To add ‘dotnet’ to your PATH, run the following command:

Terminal window
echo "export PATH=\"\$PATH:\$HOME/.dotnet\"" >> ~/.zshrc
echo "export PATH=\"\$DOTNET_ROOT:\$HOME/.dotnet\"" >> ~/.zshrc
source ~/.zshrc

If you are still having issues, try following the steps on the 3. .zshrc permission issues page first, then come back to repeat the steps above.