.NET 6 is now included in Ubuntu 22.04 repositories, so let’s see what the collaboration between Canonical and Microsoft brings us.
Believe it or not, Linux is a highly reliable development platform for Microsoft-oriented applications, particularly .NET ones. This statement, which would have elicited only a condescending smile 20 years ago, is now an everyday reality.
Nowadays, when .NET Core is entirely cross-platform, you can use Visual Studio Code, available for Windows, Linux, and Mac, to develop and publish applications for any platform.
But let’s make some clarifications first. Before .NET 6, there were two distinct .NET products: .NET Framework and .NET Core. .NET Framework was the first version of .NET that was not open source. However, with .NET 6 and afterward, there is only one version of .NET, and it is just .NET.
.NET 6 is the latest version of .NET, released in November 2021. It is an open-source software framework developed by Microsoft that enables developers to create cloud, web, desktop, mobile, gaming, IoT, and AI applications.
From August 16, all Microsoft-oriented Linux developers can install .NET 6 on their Ubuntu 22.04 LTS ‘Jammy Jellyfish’ systems with a single APT command.
Several months ago, folks at Canonical and Microsoft started working together with the goal of making Ubuntu an even better environment for .NET devs. We’re really excited that .NET 6 is available in Ubuntu 22.04 and that Canonical chose to work with us as their launch partner for Chiseled Ubuntu images.Richard Lander, Program Manager — .NET at Microsoft
Furthermore, Canonical and Microsoft have agreed to collaborate to guarantee that new .NET releases are available alongside new Ubuntu releases and that they work well together. This includes security updates and secure container image delivery.
As previously stated, .NET 6 is now available in the official Ubuntu 22.04 software repositories. All you have to do to install it is:
sudo apt update sudo apt install dotnet6
In addition, you can pick and install only the dependencies you need to develop or run:
sudo apt install dotnet-sdk-6.0 sudo apt install dotnet-runtime-6.O sudo apt install aspnetcore-runtime-6.0
So, .NET deb packages are now available in Ubuntu 22.04 LTS for the x64 architecture and will be available soon for the Arm64 architecture and all future Ubuntu releases.
Furthermore, the two companies closer ties resulted in the joint announcement that .NET 6 is now available in a new type of stripped-down container images, composed of only the strict set of packages and files required at runtime.
Canonical refers to removing all but a specific set of files and packages required by the images at runtime as “chiseling.” These “chiseled” images respond to developer feedback about attack surface and image size without risking Ubuntu’s stability and familiarity.
In addition, these new container images are ultra-small, have no package manager, no shell, and no root. Chiseled Ubuntu container images for .NET, which include the new APT packages, have been published by Canonical on Docker Hub:
But you’re probably wondering why Microsoft focuses so heavily on the Linux market for .NET development. The answer is straightforward and consists of a single word: containers.
As we all know, Linux is the primary, native environment for developing and working with containers. So, unsurprisingly, Microsoft wants to expand its presence there. And what better option than to have the most popular and widely used Linux distribution on their side in this endeavor – Ubuntu?
Of course, the such collaboration also benefits Ubuntu in its further efforts to establish itself in the Linux business segment.
For more information on the availability of .NET 6 in Ubuntu 22.04, see the official announcement on the Microsoft or Ubuntu websites.