Install .NET

Get started with .NET by installing the latest SDK or runtime. Choose your operating system and preferred installation method.

Windows

Installers

Download and run the recommended installers for Windows. These installers include the .NET SDK (which contains the runtime) and are the easiest way to get started.

Note: Installing the SDK includes the runtime. If you only need to run .NET applications, you can install just the runtime.

Command Line (winget)

Use the Windows Package Manager (winget) for a command-line installation experience.

winget install --id Microsoft.DotNet.SDK.8

To install only the runtime:

winget install --id Microsoft.DotNet.Runtime.8

macOS

Installers

Download and run the package installers for macOS.

Homebrew

If you use Homebrew, you can install .NET with a simple command.

brew install dotnet

Linux

Package Managers

Install .NET using your distribution's package manager.

Ubuntu/Debian:

sudo apt update
sudo apt install dotnet-sdk-8.0
                

Fedora:

sudo dnf install dotnet-sdk-8.0
                

CentOS/RHEL:

sudo yum install dotnet-sdk-8.0
                

Manual Installation (Tarball)

Download the tarball and extract it to your desired location.

Download the latest SDK tarball from the official .NET download page.

# Example for Linux x64
wget https://download.visualstudio.microsoft.com/download/pr/YOUR_SDK_URL_HERE/dotnet-sdk-8.0.X-linux-x64.tar.gz
mkdir -p $HOME/.dotnet
tar zxf dotnet-sdk-8.0.X-linux-x64.tar.gz -C $HOME/.dotnet
export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
                
Important: Ensure you add the .NET directories to your PATH environment variable.

Verify Installation

After installation, you can verify that .NET is installed correctly by opening a new terminal or command prompt and running:

dotnet --info

This command will display information about your installed .NET SDK and runtime versions.