To determine which versions of .NET SDK are installed on your Mac or Windows computer, you can use one of the following commands.
1. If you only want to get a single result, execute the following command:
You will see an output like this:
This command may miss results if you have more than one version of the .NET SDK.
2. This command lists all of the .NET SDK versions on your machine:
You will see something similar to this:
5.0.400 [/usr/local/share/dotnet/sdk] 6.0.100-rc.1.21458.32 [/usr/local/share/dotnet/sdk]
3. If you want to reveal all of the .NET runtime versions on your computer, run this one:
versions of the .NET runtime
Microsoft.AspNetCore.App 5.0.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-rc.1.21452.15 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 5.0.9 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.1.21451.13 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]