How to Install .NET 8 on Rocky Linux 9

Table Of Contents
Introduction
.NET is a popular free, cross-platform, open-source developer platform for building many different types of applications. With .NET, you can use multiple languages, editors, and libraries to build for web, mobile, desktop, games, and IoT. This guide will walk you through the steps to install .NET 8 on Rocky Linux 9.
Prerequisites
- A machine running Rocky Linux 9.
- Sudo or root access on the machine.
Step-by-Step Installation Guide
Step 1: Update Your System
Before installing any new package, it’s a good practice to update your system’s package index. Open a terminal and run:
sudo dnf update
Step 2: Install Microsoft’s Package Signing Key
Microsoft provides a package repository for Linux distributions, which includes .NET. To ensure authenticity and integrity of the packages, first install Microsoft’s package signing key:
sudo rpm -Uvh https://packages.microsoft.com/config/centos/8/packages-microsoft-prod.rpm
Step 3: Install .NET SDK or Runtime
Depending on your needs, you can install either the .NET Software Development Kit (SDK) for development purposes or the .NET Runtime for running applications.
Install the .NET SDK:
To develop .NET applications, you’ll need the SDK. Install it using:
sudo dnf install dotnet-sdk-8.0
Install the .NET Runtime:
If you only need to run .NET applications, the runtime is sufficient. Install it using:
sudo dnf install dotnet-runtime-8.0
Step 4: Verify the Installation
After the installation, verify it by checking the installed .NET version:
dotnet --info
This command will display detailed information about the installed .NET SDK and runtime versions.
Step 5: Start Developing!
With .NET 8 installed, you’re all set to start developing applications on Rocky Linux 9. You can begin by creating a new application or running an existing one.
Conclusion
Installing .NET 8 on Rocky Linux 9 is straightforward. Whether you’re developing .NET applications or just need to run them, the steps above will help you set up your environment efficiently. Happy coding!
Feedback and Questions
Your insights drive us! For any questions, feedback, or thoughts, feel free to connect:
- Email: shady@shadynagy.com
- Twitter: @ShadyNagy_
- LinkedIn: Shady Nagy
- GitHub: ShadyNagy
If you found this guide beneficial, don’t hesitate to share it with your network. Until the next guide, happy coding!







