Open In App

How to Install .NET on Linux?

Improve
Improve
Like Article
Like
Save
Share
Report

.NET is a free, cross-platform, open-source developer platform for building many different types of applications.

With .NET you can build various kinds of applications including :

  • Web Application
  • Mobile Apps
  • Desktop Apps
  • Games
  • IOT

You can write .NET apps in one of the following languages : 

  • C#
  • F#
  • Visual basic

Downloading and Installation on Linux:

.NET can be downloaded from its official website  and can be installed with the help of the following steps:

Step 1: Add the package repository to download it by running the following command : 

wget https://packages.microsoft.com/config/ubuntu/21.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

Install .NET on Linux

Step 2: Now install .NET SDK with this command:

sudo apt-get update; \
  sudo apt-get install -y apt-transport-https && \
  sudo apt-get update && \
  sudo apt-get install -y dotnet-sdk-6.0

Optional Step: This is an optional step to install the runtime, but you don’t need to install it if you have .NET SDK previously installed

sudo apt-get update; \
  sudo apt-get install -y apt-transport-https && \
  sudo apt-get update && \
  sudo apt-get install -y aspnetcore-runtime-6.0

To verify the installation run the following command to check the version of the .NET SDK and runtimes

dotnet --list-sdks

dotnet --list-runtimes

verify the .Net installation


Last Updated : 26 Nov, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads