Instructions for Installing .NET Software Development Kit (SDK) and Runtime on Ubuntu 24.04 operating system
In this article, we'll guide you through the process of installing and using the .NET SDK and Runtime on Ubuntu 24.04. We'll cover three methods, each with its own advantages, to cater to your version needs.
Method 1: Ubuntu System Repository
For .NET 8 or earlier versions, such as 6 and 7, you can use Ubuntu's native package management. Here's how:
- Open a terminal ().
- Update package lists:
- Install the .NET SDK (for instance, .NET 8):
For .NET 7 or 6, replace with or respectively.
This method installs the SDK and runtime via Ubuntu's native package management.
Method 2: Microsoft-backed PPA
If you're looking for the latest versions, such as .NET 9 SDK and runtimes, you can use the Microsoft-backed PPA. Here's how:
- Add Microsoft PPA repository:
- Install the .NET 9 SDK:
To install the .NET 9 runtime (ASP.NET Core runtime):
For .NET 8 SDK and runtime, replace and with and respectively.
This PPA supports Ubuntu 24.04 and provides newer versions like .NET 9.
Method 3: Snap Package
For easy updates and side-by-side installations, you can use the Snap Package. Here's how:
- Install the .NET snap package with classic confinement:
After installation, you can verify the .NET version by running:
To create a new console app, navigate to the project directory, and run the app:
For developing or running .NET applications, you'll mainly use the CLI.
Summary Table
| Method | Installation Commands | Notes | |----------------------------------|-------------------------------------------------------|----------------------------------| | Ubuntu Repo (native .deb) | | Stable for .NET 8 and earlier | | Microsoft PPA (latest patches) | | For .NET 9 SDK and runtime support| | Snap Package | | Easy updates, side-by-side versions|
Using these methods, you can install and use the .NET SDK and runtime efficiently on Ubuntu 24.04 tailored to your version needs.
Read also:
- "Wireless Equipment Empowerment by RF Venue at Austin's Stone Church" or "RF Venue's Wireless Equipment Powers Austin Stone Church".
- discovery of substantial 'white gold' reserves worth $540 billion beneath California's Salton Sea, potential game-changer for U.S. energy self-sufficiency confirmed by scientists
- Organic Avocado Mattress for sleep: Essential for a Healthy Rest
- Increase in Green Jobs by 48% in India, primarily fueled by Generation Z and secondary cities: Study reveals