Using .NET on Linux
I’ve been using .NET on Linux for many years now. When it came out the first thing I built was a console application I was mildly impressed to see it output “Hello Linux!”, but then a few minutes later when I ran a Web API application I was fully impressed. It ran exactly as I would expect. The application opened the relevant ports with no difficulty and served the responses. Of course, this is what you would expect, but it wasn’t always that easy with Apache.
Over the years my usage of .NET on Windows decreased, there simply was no compelling reason to stick with Windows, I wasn’t using Visual Studio anymore, and every other tool I needed was available on Linux either directly or via Docker.
So here is my list of tools I use on Linux for .NET development.
Linux
I primarily use Ubuntu. But I have run .NET on Suse, Mint, RedHat, Garuda, and a few others. It worked fine on all of them. There is a huge range of Linux distributions available, I suggest searching for a top 10 list or something like that, it will help you find a distribution that suits your needs.
If you are going to try out Linux, I suggest dedicating a whole computer to it or using Virtual Machine software like VirtualBox or VMWare.
If you are going to use a whole computer, check if you need to turn secure boot off. Some Linux distributions require it to be off, others don’t. If you use Ubuntu, Mint, RedHat, or Suse you should be fine with it on.
Live USB disks - Be very careful booting a Windows 10/11 computer with a live USB disk. I have managed to corrupt the Windows bootloader a few times by doing this. It shouldn’t have happened, but it did
Dual boot is another option, but again be very careful, make sure you have backed up important data.
.NET SDK
I have multiple versions of .NET SDK installed on Linux and can compile and run applications with any of them.
.NET can be installed in a few different ways - Linux distribution package managers, SNAP, manual install, and installation scripts from Microsoft.
I tend to go with the manual install as it gives me the most control over the versions I have installed, and I can get the latest updates (if I want them) as soon as they are available.
Every NuGet package I have used has worked on Linux.
AOT compilation works.
If all you need is the .NET runtime you can get just that.
The only thing I can think of that is missing is Maui.
IDEs
Development
I primarily use VS Code, but sometimes I fire up Rider. Both work just as well on Linux as they do on Windows. I can’t see a difference.
Database tools
I use a mix of DBeaver and DataGrip. Both are cross-platform and work well on Linux. They both connect to the databases I use - MS SQL Server, Postgres, and CockroachDB without any problems.
Source Control
Both Git and the GitHub CLI are available on Linux. I use them and can see no difference between them and their Windows counterparts.
I know there are implementations of other source control systems available for Linux, but I don’t use them.
Databases
Linux has long supported popular databases like MySQL, Postgres, MariaDB, etc. More recently you could add MS SQL Server to that list. But that is not how I like to run databases for development purposes.
Even on Windows, I hated installing databases on my operating system. I much prefer to use a Docker image, and all the databases I need to work with are available as Docker images.
Docker
Docker makes it very easy to run a wide range of databases and other services. Need a queue, use RabbitMQ. Need a cache, use Redis. Need a message broker, use Kafka.
Other Tools
PowerShell
PowerShell Core is available on Linux, I add some command history and completion tools to it.
Fiddler
It is available on Linux, but I haven’t used it.
Postman
I’m not a fan of Postman but it is available.
What else can I use
Browsers
Firefox, Chrome, Chromium, Edge(!), Brave, and Opera are all available on Linux. There are plenty of others too.
Office
LibreOffice for documents and spreadsheets. There is also a tool like PowerPoint, but I don’t use it so much. I still prefer PowerPoint.
Audio
For podcast editing, I use Audacity. It works pretty well in Ubuntu, but occasionally it can’t find my microphone. Sometimes restarting the application or rescanning the audio devices fixes it, other times I have to restart the computer.
Images
For simple drawings I use Inkscape and GIMP for photo editing.
What’s missing
I have an old I5 laptop with Windows on it for software that I need occasionally.
On this, I keep a copy of Office 365, mostly for PowerPoint for the occasional presentation.
The CorelDraw suite.
LightRoom.
I don’t use that computer very often.