If you’re a developer working on a .NET application **or planning to host one on Ubuntu, you’ll need to install the .NET SDK** and ASP.NET Core Runtime.

This guide is specially written for Ubuntu 24.04.2 LTS users — with every step explained in plain language so even beginners can follow easily.

💡 Why Do We Need to Install This?
.NET SDK is needed if you want to build or develop .NET applications.
ASP.NET Core Runtime is required if you only want to run web applications built with ASP.NET Core (for example, hosting on a Linux VM).

🖥️ OS Requirement
This guide is tested on:
OS: Ubuntu 24.04.2 LTS

To check your OS version:
$ lsb_release -a

Image description

🧩 Step 1: Update Your Package List
Before installing anything, always update your system’s package list:

sudo apt update

👉 Why?
This command makes sure Ubuntu is aware of the latest available software versions. Think of it as refreshing the app store before installing something new.

📦 Step 2: Install the .NET SDK 8.0
Run this command:

sudo apt install -y dotnet-sdk-8.0

👉 Why?
This installs the .NET Software Development Kit (SDK), which includes everything you need to build and run .NET 8 apps from the command line.

The -y flag auto-confirms the installation to save time.

🌐 Step 3: Install ASP.NET Core Runtime 8.0

sudo apt install -y aspnetcore-runtime-8.0

👉 Why?
This installs only the runtime environment for ASP.NET Core web applications. Useful if you’re hosting a web app, not developing it.

You can install both SDK and Runtime — no issues. The SDK includes a runtime too, but adding aspnetcore-runtime ensures full compatibility for web apps.

Step 4: Verify the Installation
Let’s make sure everything is installed correctly.

  1. Check the installed .NET version:
dotnet --version

This shows the version of the SDK currently active.

  1. Check where the dotnet CLI is installed:
which dotnet

This confirms the dotnet command is available in your system's PATH.

  1. List all installed .NET-related packages:
dpkg -l | grep dotnet

This shows all installed .NET packages using Ubuntu’s package system.

Image description

🎉 You’re Ready to Build!
You now have the full setup ready to build and run .NET 8.0 and ASP.NET Core apps on Ubuntu 24.04.2 LTS.

You can now create your first app:

dotnet new console -o HelloApp
cd HelloApp
dotnet run

Image description

💬 Questions?
If you run into any issues or have questions, feel free to reach out in the comments. Happy coding! 🚀