Why I prefer Linux for .NET Core development rather than Windows 10?

For me there are 3 reasons:

1. Modularity and power that comes with Linux.
2. Speed of instalation of new software, execution and development.
3. Server-like development environment.

Modularity and power that comes with Linux.

Having in my opinion the best terminal (bash) at your fingertips, while being able to change and tinker with just about anything, if you have the knowledge to do so, is enough in and of itself. In addition to this, you can setup key shortcuts without using AutoHotkey. Use virtual desktops, to 'have X monitors' one keystroke away. SSH without using Putty or WinSCP. You can also change the design to have all kinds of fancy looks (try to do that in Win). You can setup uniquely designed, powerful, server-like, fast, rock solid, development environment with all the shortcuts, automation scripts, ssh sessions, virtual desktops, tmux sessions you can imagine.

Speed of instalation of new software, execution and development.

Getting most of the software is as easy as typing a command. Sometimes you have to get more creative tough, and go get the package yourself, untar (unzip) it use 'dpkg' or 'make' to get stuff going. I`m gonna be honest with you, tough instalation itself is FAST (faster than in Win most of the time), you can, at the beginning, get a little bit overwhelmed. There is however a ton of help on the web, where you can 99% of the time find solution, and if you cant, you have to get creative and solve it yourself and tell others how you did it, or put your solution on Github.

For web development, using .NET Core and VS Code as code editor, development is MUCH faster on Linux than on Windows. This was my feeling when I did both from time to time. Everything just seemed more fluid (on the same machine with dualboot Debian 9 with KDE desktop and Windows 10) on Linux somehow. So I did some timing (with 'time' command before the thing you execute) and came up with some (for me) surprising results.

To launch VS Code(1. Linux 2. Windows): 0.143s, 1.564s. Linux was 10x faster.
To launch Google Chrome: 0.331s, 0.142s. Win was over 2x faster.
To create new .NET Core console app: 1.454s, 2.551s. Linux over 2x faster.
To create new .NET Core reactredux web app: 2.116s, 9.838s. Linux 5x faster.
To run console app that writes 1 000 000 lines of text to a file, line by line in for loop: 4.540s, 46.208s Linux was 10x faster. C# execution itself shouldnt be faster on Linux, but somehow it is, correct me if I`m wrong. It seems that the initial feeling of things being more fluent and faster is based in some reality.

Server-like development environment.

This one is a no-brainer. If you use Linux for production (as most web apps do), than doing the initial development, testing, and migration is going to be easier. And even the maintenance of your Linux server is going to be easier, with the knowledge gained by using it daily.

In conclusion

Am I one of those: "Ditch Windows, Linux is the best... Why I only use Linux now... I hate evil corporations and only use opensource..." kind of guys? Absolutely not! In fact, I use dual boot and switch to whatever I need to use. There are applications made just for Windows, which some of us just can`t imagine doing without.

Developing with .NET Core on Windows is awesome, you have all the things you need, and even Visual Studio. However developing with .NET Core on Linux seems (to me) to be even better than that. Try it for a month and see if your productivity increases.

31/03/2018