Install .NET on Ubuntu 24.04 (Noble)

Microsoft official + side-by-side + script + reset
Quick Notes
  • SDK installs tooling + runtimes
  • Runtimes only = run apps
  • Use Microsoft repo for apt
  • Use install script for per-user
Photos (examples)
Terminal / developer setup
Code on screen
Linux / coding vibe
Replace these image URLs with your own if desired.

Add Microsoft package repo
sudo apt update
sudo apt install -y wget apt-transport-https
wget https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt update

Install latest SDK
sudo apt install -y dotnet-sdk-8.0

Install runtimes only (no SDK)
sudo apt install -y aspnetcore-runtime-8.0
sudo apt install -y dotnet-runtime-8.0

Verify
dotnet --info

sudo apt install -y dotnet-sdk-6.0 dotnet-sdk-7.0 dotnet-sdk-8.0
dotnet --list-sdks
Multiple versions / tooling

Install
wget https://dot.net/v1/dotnet-install.sh
chmod +x dotnet-install.sh
./dotnet-install.sh --channel 8.0
export PATH=$HOME/.dotnet:$PATH

Persist PATH
echo 'export PATH=$HOME/.dotnet:$PATH' >> ~/.bashrc
source ~/.bashrc
Shell script

sudo apt remove --purge 'dotnet*' 'aspnetcore*'
sudo rm -rf /usr/share/dotnet ~/.dotnet
sudo apt autoremove
Cleanup / repair
Quality, Reliability & Service
Thank You For Visiting
Brooks Computing Systems - Jacksonville
Visit https://bcs.archman.us