Great question, and the answer is not easy. There is no "show all versions of .net core" command, but there is hope.
EDIT:
I'm not sure when it was added, but the info command now includes this information in its output. It will print the installed runtimes and SDKs, as well as some other information:
dotnet --info
If you want to see only the SDK: dotnet --list-sdks
If you want to see only installed dotnet --list-runtimes : dotnet --list-runtimes
I'm on Windows, but I think this will work on Mac or Linux with the current version.
Alternatively, you can refer to the .NET Core Download Archive to help you decrypt versions of the SDK.
SENIOR INFORMATION: Everything below this item is old information that is less relevant but can still be useful.
See Installed Runtimes:
Open C:\Program Files\dotnet\shared\Microsoft.NETCore.App in Windows Explorer.
See the installed SDKs :
Open C:\Program Files\dotnet\sdk in Windows Explorer.
(Source for locations: developer blog )
In addition, you can see the latest installed versions of Runtime and SDK by entering these commands at the command line:
dotnet The latest version of Runtime is the first on the list. DISCLAIMER: This no longer works, but may work for older versions.
dotnet --version Latest SDK DISCLAIMER: Apparently, any global.json configuration files may affect the result.
On macOS, you can check the .net kernel version using the command below.
ls /usr/local/share/dotnet/shared/Microsoft.NETCore.App/
On Ubuntu or Alpine:
ls /usr/share/dotnet/shared/Microsoft.NETCore.App/
A list of folders with the name of the installed version will be displayed.