Links
Install dotnet on Linux at microsoft.com Scripted install docs at microsoft.com
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
sudo chmod +x ./dotnet-install.sh
./dotnet-install.sh --version latest
./dotnet-install.sh --version latest --runtime aspnetcore
You can install a specific major version with the --channel parameter to indicate the specific version. The following command installs .NET 7.0 SDK.
./dotnet-install.sh --channel 7.0