The Wayback Machine - https://web.archive.org/web/20240106091315/https://www.geeksforgeeks.org/how-to-install-net-on-linux/
Open In App
Related Articles

How to Install .NET on Linux?

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
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

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore.
Last Updated : 26 Nov, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials