Install .NET Core
This guide provides instructions for installing .NET Core on various operating systems. Choose your platform to get started.
Install .NET Core on Windows
Follow these steps to install .NET Core on your Windows machine.
Using the Installer
The easiest way to install .NET Core on Windows is by downloading the official installer.
- Visit the official .NET download page.
- Select the desired .NET Core version (e.g., .NET 7.0, .NET 6.0 LTS).
- Download the Windows x64 installer.
- Run the downloaded executable and follow the on-screen instructions.
Using Chocolatey (Package Manager)
If you use Chocolatey, you can install .NET Core with a single command.
choco install dotnet-sdk
Make sure Chocolatey is installed and configured on your system.
Verify Installation
Open Command Prompt or PowerShell and run the following command:
dotnet --version
This should display the installed .NET Core SDK version.
Install .NET Core on macOS
Install .NET Core on macOS using one of the following methods.
Using the Installer
Download the macOS installer from the official .NET website.
- Go to the official .NET download page.
- Select the .NET Core version you need.
- Download the macOS x64 or Arm64 installer (depending on your Mac's processor).
- Open the downloaded package and follow the prompts.
Using Homebrew (Package Manager)
If you use Homebrew, you can install .NET Core easily.
brew install --cask dotnet-sdk
Ensure Homebrew is installed on your macOS system.
Verify Installation
Open Terminal and run:
dotnet --version
Install .NET Core on Linux
Instructions for installing .NET Core on popular Linux distributions.
Using Package Managers (Recommended)
For Debian-based distributions (Ubuntu, Debian):
sudo apt update
sudo apt install -y dotnet-sdk-7.0 # Replace with your desired version (e.g., dotnet-sdk-6.0)
For Red Hat-based distributions (Fedora, CentOS, RHEL):
sudo dnf update
sudo dnf install -y dotnet-sdk-7.0 # Replace with your desired version
Refer to the official Linux installation guide for other distributions and details.
Using Script (Cross-Platform)
You can use the dotnet-install script for a quick installation.
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
chmod +x ./dotnet-install.sh
./dotnet-install.sh --version 7.0 --runtime dotnet # Specify desired version and runtime
This script downloads and installs .NET to your user's home directory.
Verify Installation
Open your terminal and run:
dotnet --version