Install .NET 8 SDK on Ubuntu
.NET Core SDK 8.0.100-preview.3 was release on April 11st 2023. This article shows you how to install this latest SDK on a Ubuntu machine.
This article assumes you already have .NET Core SDK 6.0 or 7.0 installed on your Ubuntu machine. If you have not done that, you can install .NET Core 7 using the following command:
sudo apt-get update && \ sudo apt-get install -y dotnet-sdk-7.0
We cannot use the above approach to install .NET Core 8 until it is officially released and added.
Download .NET Core 8 SDK
Download .NET 8 SDK from official website https://dotnet.microsoft.com/en-us/download/dotnet/8.0. Choose the right version. For me, the version is Linux x64.
Install .NET 8 SDK
Once the package is downloaded, we can install it manually via the following command.
1) First create a variable named DOTNET_FILE which has the value of the download package path. Please replace it accordingly.
2) Then extract the package to default dotnet folder using the following command:
tar zxf "$DOTNET_FILE" -C "$DOTNET_ROOT"
3) Verify the installation:
The output looks like the following screenshot: