DEV Community

Shaikh Al Amin
Shaikh Al Amin

Posted on

How to install dotnet 6 in ubuntu 20.04

Download and install the below package:

wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
Enter fullscreen mode Exit fullscreen mode
sudo dpkg -i packages-microsoft-prod.deb
Enter fullscreen mode Exit fullscreen mode

How update the system and install transport https:

sudo apt install apt-transport-https && sudo apt update
Enter fullscreen mode Exit fullscreen mode

Now install dotnet SDK 6:

sudo apt install dotnet-sdk-6.0
Enter fullscreen mode Exit fullscreen mode

Also install dotnet core 6:

sudo apt install dotnet-runtime-6.0
Enter fullscreen mode Exit fullscreen mode

Check dotnet version:

dotnet --version
Enter fullscreen mode Exit fullscreen mode

Create hello world application:

dotnet new console -0 HelloWorld
Enter fullscreen mode Exit fullscreen mode

Run the hello world application :

cd HelloWorld/ && dotnet run
Enter fullscreen mode Exit fullscreen mode

For ubuntu 20.04 reference:

https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-2004

For ubuntu 22.04 reference:

https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-2204

Another good one:

https://tecadmin.net/how-to-install-dotnet-core-on-ubuntu-22-04/

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay