Fedora can run the current .NET development stack directly from DNF, so most developers do not need a separate repository or manual tarball to build C#, ASP.NET Core, or command-line projects. To install .NET SDK on Fedora, use the Fedora-packaged SDK for normal development, then switch to Microsoft’s install script only when you need a per-user install, a preview build, or a specific SDK patch outside the package feed.
On Fedora 44, DNF currently resolves .NET 10 and .NET 8 SDK packages from the Fedora fedora and updates repositories. If you searched for the older “.NET Core SDK” wording, the current Fedora package names use modern .NET branding, such as dotnet-sdk-10.0 and dotnet-sdk-8.0. Microsoft Learn documents the same package-name pattern for Fedora, but this DNF workflow does not require adding packages-microsoft-prod. Use the Microsoft script method later in this article when you specifically need a Microsoft-managed download path instead of a system package.
Install .NET SDK on Fedora with DNF
Start by refreshing package metadata and applying pending updates. This keeps the SDK, runtime, OpenSSL, ICU, and other shared dependencies in sync before you install the development tools.
sudo dnf upgrade --refresh
If you want a quick refresher on Fedora’s DNF syntax before continuing, the DNF5 install examples for Fedora cover common install, remove, and query patterns.
Check Available .NET SDK Packages
Search the enabled Fedora repositories for SDK packages:
dnf search dotnet-sdk
Relevant output on Fedora 44 includes:
Matched fields: name dotnet-sdk-10.0.x86_64 .NET 10.0 Software Development Kit dotnet-sdk-8.0.x86_64 .NET 8.0 Software Development Kit dotnet-sdk-9.0.x86_64 .NET 9.0 Software Development Kit dotnet-sdk-aot-10.0.x86_64 Ahead-of-Time (AOT) support for the .NET 10.0 Software Development Kit dotnet-sdk-dbg-10.0.x86_64 Managed debug symbols for the .NET 10.0 Software Development Kit
The plain dotnet-sdk-10.0 package is the normal choice for new development. The dotnet-sdk-aot-* and dotnet-sdk-dbg-* packages are companion packages for specialized build and debugging workflows, not replacements for the main SDK.
Choose a Supported .NET Version
Microsoft publishes a new .NET major version each November. LTS releases receive three years of support, while STS releases receive two years. For Fedora package installs, choose the SDK branch that matches your project target:
| Version | Fedora package | Support track | End of support | Use case |
|---|---|---|---|---|
| .NET 10 | dotnet-sdk-10.0 | LTS | November 14, 2028 | New projects and long-lived development |
| .NET 9 | dotnet-sdk-9.0 | STS | November 10, 2026 | Existing projects that already target .NET 9 |
| .NET 8 | dotnet-sdk-8.0 | LTS | November 10, 2026 | Existing .NET 8 applications and compatibility testing |
For the authoritative lifecycle table, check Microsoft’s .NET and .NET Core support policy. Fedora packages can lag the newest Microsoft patch by a short period, so use DNF updates to stay on the latest Fedora-published build for your branch.
Install the .NET 10 SDK
Install the .NET 10 SDK for a full development setup. The SDK pulls in the matching .NET runtime, ASP.NET Core runtime, templates, targeting packs, and host components as dependencies.
sudo dnf install dotnet-sdk-10.0
If you maintain an application that still targets .NET 8, install the previous LTS SDK instead:
sudo dnf install dotnet-sdk-8.0
Install Runtime Packages Only
Servers that only run deployed applications do not always need the full SDK. Install the ASP.NET Core runtime for web applications, APIs, and services:
sudo dnf install aspnetcore-runtime-10.0
Install the base .NET runtime only when the application is a console app, worker, or service that does not use ASP.NET Core:
sudo dnf install dotnet-runtime-10.0
When in doubt on a development machine, install the SDK. For production hosts, match the runtime package to the application type so the server carries only the pieces it needs.
Verify the DNF Installation
Check the installed SDK version:
dotnet --version
10.0.107
List installed SDKs and their Fedora package location:
dotnet --list-sdks
10.0.107 [/usr/lib64/dotnet/sdk]
List installed runtimes:
dotnet --list-runtimes
Microsoft.AspNetCore.App 10.0.7 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 10.0.7 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
Your patch numbers may be newer than this sample output after Fedora publishes additional updates.
Test .NET After Installation
Create a Console App
Create a small console project in a disposable test directory:
mkdir -p ~/dotnet-test
cd ~/dotnet-test
dotnet new console -n HelloWorldApp
Relevant output includes:
The template "Console App" was created successfully. Processing post-creation actions... Restoring /home/user/dotnet-test/HelloWorldApp/HelloWorldApp.csproj: Determining projects to restore... Restored /home/user/dotnet-test/HelloWorldApp/HelloWorldApp.csproj. Restore succeeded.
Run the generated application:
dotnet run --project HelloWorldApp
Hello, World!
Create an ASP.NET Core App
The SDK also includes ASP.NET Core templates. Create an MVC project and bind the development server to a local-only HTTP port:
dotnet new mvc -n HelloWorldWebApp
cd HelloWorldWebApp
dotnet run --urls http://127.0.0.1:5080
Relevant output includes:
Using launch settings from Properties/launchSettings.json...
Building...
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://127.0.0.1:5080
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
Open http://127.0.0.1:5080 in a browser, or test the listener from another terminal with curl:
curl -I http://127.0.0.1:5080
Press Ctrl+C in the terminal running dotnet run when you finish testing. If you no longer need the sample projects, remove the test directory:
cd ~
rm -rf ~/dotnet-test
Install .NET with Microsoft’s Installer Script
Microsoft’s dotnet-install script performs a non-admin install under your home directory. Microsoft designs this script mainly for CI systems, temporary builds, and package-manager-free installs; use Fedora’s DNF packages for a normal workstation unless you need the script’s version control or no-root behavior.
Download and Verify the Script
The script does not resolve operating-system dependencies for you. Fedora Workstation usually already has most of these packages, but minimal installs should install the download, signature, and runtime dependency packages first:
sudo dnf install curl gnupg2 glibc libgcc ca-certificates openssl-libs libstdc++ libicu tzdata krb5-libs zlib
Download the script, signature, and Microsoft install-script public key:
curl -fsSLO https://dot.net/v1/dotnet-install.sh
curl -fsSLO https://dot.net/v1/dotnet-install.sig
curl -fsSLO https://dot.net/v1/dotnet-install.asc
Import the key into your user GPG keyring and verify the script signature:
gpg --import dotnet-install.asc
gpg --verify dotnet-install.sig dotnet-install.sh
A valid script reports a good signature from Microsoft’s install-script key:
gpg: Good signature from "Microsoft DevUXTeamPrague <devuxteamprague@microsoft.com>" [unknown] Primary key fingerprint: 2B93 0AB1 228D 11D5 D7F6 B6AC B9CF 1A51 FC7D 3ACF
The [unknown] trust label is normal unless you have personally marked the key as trusted. The important part for this check is that the signature is good and the fingerprint matches Microsoft’s published key for the install script.
Make the script executable:
chmod +x ./dotnet-install.sh
Install a Script-Managed SDK
Install the latest .NET 10 SDK into ~/.dotnet:
./dotnet-install.sh --channel 10.0
Install the latest LTS release without naming a specific major version:
./dotnet-install.sh --channel LTS
Install the .NET 8 SDK for projects that still target the previous LTS branch:
./dotnet-install.sh --channel 8.0
For a runtime-only install, choose the runtime type explicitly. The ASP.NET Core runtime includes the base .NET runtime plus the ASP.NET Core shared framework:
./dotnet-install.sh --channel 10.0 --runtime aspnetcore
Use the script’s dry-run mode when you need a deterministic command for CI or a repeatable build log:
./dotnet-install.sh --channel 10.0 --dry-run
Add Script Installs to PATH
The script can update PATH for the current process, but it does not permanently update your shell profile. Add DOTNET_ROOT, the install directory, and the per-user tools directory to Bash:
touch ~/.bashrc
grep -qxF 'export DOTNET_ROOT=$HOME/.dotnet' ~/.bashrc || echo 'export DOTNET_ROOT=$HOME/.dotnet' >> ~/.bashrc
grep -qxF 'export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools' ~/.bashrc || echo 'export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools' >> ~/.bashrc
source ~/.bashrc
The grep checks prevent duplicate export lines if you rerun the snippet later.
Verify the script-managed SDK:
dotnet --version
command -v dotnet
If DNF-installed .NET is already present, command -v dotnet may still show /usr/bin/dotnet because the PATH line from the script method keeps system directories first. Use $HOME/.dotnet/dotnet for the script-managed copy, or deliberately place $DOTNET_ROOT before $PATH only if you want the per-user SDK to take priority.
Manage .NET SDK Versions
Install Multiple Fedora SDK Branches
DNF can install multiple supported SDK branches side by side. This is useful when one project targets .NET 10 while another still builds against .NET 8:
sudo dnf install dotnet-sdk-10.0 dotnet-sdk-8.0
List installed SDKs before you pin a project:
dotnet --list-sdks
Pin a Project with global.json
The .NET CLI uses the newest installed SDK by default. To pin a project to a specific SDK patch, run dotnet --list-sdks, choose the exact version shown on your system, and create a global.json file in the project directory:
dotnet new globaljson --sdk-version 8.0.126
Replace 8.0.126 with the exact SDK patch installed on your Fedora system. If the project later reports that the requested SDK cannot be found, compare global.json with dotnet --list-sdks and either install that SDK branch or update the pinned version.
Update .NET Packages
DNF-installed .NET packages update with the rest of Fedora:
sudo dnf upgrade --refresh
For script-based installs, rerun the same channel command you used originally. For example, refresh the latest .NET 10 SDK with:
./dotnet-install.sh --channel 10.0
The installer script is the reusable updater for this method because it resolves the current SDK for the selected channel each time it runs. If you download a fresh copy of dotnet-install.sh before updating, repeat the signature check from the script section before running it.
Avoid Mixing DNF, Script, and Homebrew Installs
DNF, Microsoft’s script, and Homebrew use different prefixes. DNF is the best default for this Fedora workflow, the script is useful for no-root or CI installs, and Homebrew on Fedora is a separate developer-tool prefix when you already manage tools that way. Before troubleshooting a version mismatch, check which dotnet binary your shell finds first:
command -v dotnet
A path under /usr/bin points to Fedora’s DNF package, a path under ~/.dotnet points to the Microsoft script install, and a path under /home/linuxbrew/.linuxbrew points to a Homebrew-managed command.
Disable .NET Telemetry
The .NET SDK sends anonymous CLI usage telemetry to Microsoft by default. To opt out for your user account, add the telemetry environment variable to Bash:
touch ~/.bashrc
grep -qxF 'export DOTNET_CLI_TELEMETRY_OPTOUT=1' ~/.bashrc || echo 'export DOTNET_CLI_TELEMETRY_OPTOUT=1' >> ~/.bashrc
source ~/.bashrc
Confirm the setting:
echo "$DOTNET_CLI_TELEMETRY_OPTOUT"
1
Troubleshoot .NET on Fedora
DNF Cannot Find dotnet-sdk-10.0
First confirm that Fedora’s standard repositories are enabled and that metadata is fresh:
dnf repolist --enabled | grep -E '^(fedora|updates)[[:space:]]'
sudo dnf clean metadata
dnf search dotnet-sdk
If the package still does not appear, check Microsoft’s Fedora install documentation for .NET and the Fedora dotnet-sdk-10.0 package page before switching methods. Preview builds and some patch-specific downloads are not available through DNF, so the installer script may be the right path for those cases.
dotnet Command Not Found After Script Install
Script installs usually fail to resolve when the shell profile is missing ~/.dotnet. Check the command path and the script install directory:
command -v dotnet || echo "dotnet is not on PATH"
test -x "$HOME/.dotnet/dotnet" && echo "script install exists"
If $HOME/.dotnet/dotnet exists, reload the PATH lines from the script method or run the command by absolute path until your shell profile is fixed:
$HOME/.dotnet/dotnet --version
Application Requires a Missing Runtime
If an application reports that you must install .NET, list installed runtimes first:
dotnet --list-runtimes
Install the branch and runtime family the application requests. Web applications usually need ASP.NET Core:
sudo dnf install aspnetcore-runtime-10.0
Console and worker applications that do not use ASP.NET Core can use the smaller base runtime:
sudo dnf install dotnet-runtime-10.0
Remove .NET SDK from Fedora
Remove DNF-Installed .NET
Remove the SDK branch you installed with DNF:
sudo dnf remove dotnet-sdk-10.0
Verify the package is no longer installed:
rpm -q dotnet-sdk-10.0 || true
package dotnet-sdk-10.0 is not installed
If you installed runtime-only packages, remove the matching runtime package names instead:
sudo dnf remove aspnetcore-runtime-10.0 dotnet-runtime-10.0
After package removal, clear the shell command cache before checking whether dotnet still resolves:
hash -r
command -v dotnet || echo "dotnet command not found"
dotnet command not found
Remove Script-Installed .NET
Deleting
~/.dotnetpermanently removes the script-managed .NET directory under your home folder, including SDKs, runtimes, templates, and global tools stored there. Back up anything custom under~/.dotnetbefore removing it.
rm -rf ~/.dotnet
Then edit ~/.bashrc and remove the lines that set DOTNET_ROOT, add $DOTNET_ROOT to PATH, or set DOTNET_CLI_TELEMETRY_OPTOUT if you no longer need that telemetry setting. Open a new terminal afterward, or reload the file with source ~/.bashrc.
If DNF-installed .NET is not present, the command check should no longer find dotnet:
hash -r
command -v dotnet || echo "dotnet command not found"
Conclusion
For most Fedora development work, sudo dnf install dotnet-sdk-10.0 is the cleanest path: updates stay tied to Fedora, the SDK includes the matching runtime, and removal is a normal RPM transaction. Keep the Microsoft install script for CI, preview testing, no-root installs, or exact SDK patch control, and verify the script signature before running it. If you want an editor setup for C# projects, the Visual Studio Code on Fedora guide is a natural next step.


Formatting tips for your comment
You can use basic HTML to format your comment. Useful tags currently allowed in published comments:
<code>command</code>command<strong>bold</strong><em>italic</em><blockquote>quote</blockquote>