The current stable version of .NET core is 6, which is a Long Term Support (LTS) version that will be supported for 3 years, and comes with better git integration with Visual Studio 2022. If you are a developer and want to build .NET apps, the best way to do it on Ubuntu Linux is to install the Software Development Kit (SDK), which also includes the .NET Runtime by default. This will allow you to develop and run .NET Framework applications in Ubuntu Linux.

How to install dotnet (.NET) SDK on Ubuntu Linux

As mentioned above, Microsoft .NET core SDK is a cross-platform and open-source framework that supports Linux and Mac OS systems out of the box. Below is how to install it on Ubuntu Linux. Before installing .NET core SDK, you will want to install some basic packages. This package allows you to install the .NET SDK securely via HTTPS To do that, make sure to install the apt-transport-HTTP package using the command below.

Add .NET Repository

Now that the package is installed above, run the command below to add Microsoft’s package repository to your system. The lines above will create a /etc/apt/sources.list.d/microsoft-prod. list the repository file on your Ubuntu Linux system with appropriate config settings. If you’re using a different version of Ubuntu Linux, make sure to replace the highlighted version number in the commands above.

Install .NET Core SDK on Ubuntu Linux

Now that a repository is created, run the commands below to install the version of .NET SDK for your system. As of this writing, the current version is 6.0. After installing, you should get a success message similar to the one below: Once .NET SDK is installed, you can verify by running the commands below. The command above will display the version of .NET installed. Also, verify that the .NET runtime is functioning. That should display similar lines as shown below: The commands below can also be used to install .NET Framework independently.

How to install .NET Core SDK on Ubuntu via Snap

Alternatively, one can install .NET Core SDK via Snap package management. Some people will prefer installing .NET SDK via Snap as it might be the quickest and easiest. Snaps are containerized software packages that are simple to create and install. Snap applications are packaged with all their dependencies to run on all popular Linux distributions from a single build which allow them to update automatically and roll back gracefully. To install .NET via snap, run the commands below: After installing, you can begin building great applications. That should do it! Conclusion: This post showed you how to install and use .NET Core SDK on Ubuntu Linux. If you find any error above or have something to add, please use the comment form below.