Most clients assume that if they use the services of a software house, they do not have to worry at all about whether and how the software will run. They just wait for the final result. Of course, not to an extreme: they absolutely should be (and usually are) interested in the progress of the work, and quite concerned about how much money will go not only into the implementation itself but also into the infrastructure around it. The latter includes items such as the text of terms and conditions, the domain and the server. And servers in particular are often a hot topic, discussed in great detail, mainly because of the costs involved and the wish to ensure good performance. The conversations get especially lively when the client has a technical person who will maintain the server or even build it.
And at this point (especially in larger companies) the topic of Linux as the operating system installed on the server sometimes comes up. For many administrators and programmers it is a very obvious choice, almost automatic. But there are situations when technical people from various companies ask, a little nervously, whether it could be Windows after all. This is usually met with a firm "no" from the IT company, for the reason that...
That is the question: why exactly is Linux the preferred choice for servers, and why do specialists in this OS (Operating System) make up the majority of the administration and deployment community in the IT industry? What is behind it, and is Windows really never appropriate? Let us look at the arguments that are usually missing in live discussions of this kind, because the topic seems obvious and nobody is used to explaining such matters. And it is worth putting them in order.
Stability
The first and most important point: Linux (or really, Unix-like systems) is very stable. This results from the fact that, as an open-source creation built with open-source tools, its source code is widely available and can be modified. Consequently, over the years thousands of enthusiasts have improved, and keep improving, the system and its components, raising quality to an unusual level, one that even commercial companies cannot reach. Well, maybe I exaggerate a little, but you will admit that while there are plenty of jokes about the "stability" of Windows, Linux has a very good reputation here. Worth noting are the lack of frequent crashes, memory leaks and typical system freezes: systems with the penguin logo can run without trouble for a really long time if they are well maintained. And even if a less experienced person who knows their specifics at least a little takes care of them, they still turn out to be sturdier than "windows".
Security
A consequence of the previous point is security, which matters so much when you expose not only web applications but any resources on a public network. Let me go back to open source for a moment: since the code of the system and of many of its packages is public, it has been examined in hundreds of different ways and thus secured from many angles. Add an extensive permission system, the ability to easily restrict the visibility of files and advanced mechanisms such as SELinux, and the "penguin" is fairly secure at its core. With an experienced administrator you can sleep soundly about data access. Of course, there are also the usual tools that restrict network traffic and block ports, which are fairly easy to configure on Linux (although Windows specialists can probably say the same about their "ward") and raise the level of protection in this way. As for the security of Windows: exposing it on the network does not mean the server leaves the doors wide open, but you have certainly heard of many security vulnerabilities in Microsoft's system, while Unix-like shells appear less often in such reports. And all of this goes along with the fact that Linux is easier to configure for exposing anything: over the years it has become more natural in that respect and at the same time more secure. Although, again, every specialist has a different opinion.
Development tools
Many programmers work on Windows every day, because most tools are available in a Windows version. Still, there is no hiding that Linux is not only more friendly to technical people in this respect, but also that some quite popular programs have a port only for this system. We gave examples in the article about WSL, and one of them is Redis, a well-known caching system. Another tool that does exist in a Windows version but under the hood still requires and is adapted to Linux is Docker, which popularized the containerization mechanism so widely used in the development world today.
Basic components available on Windows are also much simpler to use on Linux. An example is LAMP, an acronym for the set of Linux, Apache, MySQL and PHP (sometimes with Python or the somewhat forgotten Perl swapped in). True, all of this can also be installed on Windows as the XAMPP package, but installation and configuration on the "penguin" is more natural. That leads to the fact that if you know the server will run on Linux, it sometimes pays to develop the software on that system too, to reduce certain bugs that come from differences between OSes. The simplest example is Windows' high tolerance for letter case in file names, while Linux is stricter in this respect.
It is also worth mentioning that a large group of programmers somewhat links these two worlds (comfort of use and a good platform for tools) in the form of macOS and Apple hardware. It is a good choice if we have the resources, and some specialists in so-called DevOps (Development and Operations) say outright that they work on a Mac every day because of the great comfort of work while keeping the Unix backbone.
No frequent restarts
I already mentioned that Linux systems can run really long without a restart, and we count that not in months but in years. A reboot is needed in a limited number of cases, for example when updating the system kernel or raising the physical parameters (and not always even then, especially with virtual servers). This is tied to the architecture of this operating system, which does not force a restart when, for example, installing additional software (with a few exceptions, of course). We know well that on Windows it is quite different: installing larger programs that are more "embedded" in the system requires a restart, which means more frequent interruptions of a server based on Windows Server, or less frequent updates. Perhaps that edition of Windows is different in practice here, but I find it hard to imagine it coming out ahead of Linux in this ranking.
Speaking of updates, we know well that big Windows updates sometimes do not go smoothly. From time to time there are reports that installing a certain version broke one thing and people had to roll back to an earlier release. Of course, this is incidental, but you still do not hear about this kind of event with Linux.
Intuitively one can also suspect (and various tests available on the internet confirm it) that Linux is lighter and faster than Windows, among other reasons because the server edition very rarely has a graphical environment (GUI) installed, which uses hardware resources to a greater extent. With Microsoft's system we know that a "clickable" interface is a necessity, and by force it takes away some of the computing power. Besides, it is not for nothing that the "penguin" can be run, if needed, on a relatively weak machine.
Costs
For many this is the most important point, and although some will say that Windows is not that expensive, the overall picture can look different when you maintain several servers. The biggest advantage of Linux is its price, which is 0 (in words: "zero"). It is a free and open operating system, created so that anyone can afford it. Of course, there are paid distributions and ones with subscription support, but on a server, for instance, Ubuntu Server, which is free of charge, is entirely enough. This also makes it relatively easy to start your adventure with Linux and learn its basics (although, of course, you are still a long way from being an expert then). It is also easier to find advice online about configuring a free system than a costly colossus like Windows.
This is the main reason why about 99% of hosting services offer servers with exactly this kind of shell. Even if the price of such hosting seems fairly high to us, that is the cost of the support and hardware alone. Note that services with Windows Server installed are even more expensive, and not only because of the price of the OS itself, but also because of higher hardware requirements, the need to provide a remote desktop and the lower availability of specialists.
Is Windows not suitable for servers at all?
You cannot say that. Windows Server is widely used, although in our experience rather in the internal networks of, say, government offices or large companies. Software houses working with .NET and SQL Server technologies may argue that Windows servers are more fitting in their case, although Linux ports and suitable packages for Apache2/NGINX exist as well. Very inexperienced people may also take their first steps in hosting anything on plain Windows. I admit that we had one project where, for a very small internal application, the client provided plain Windows with XAMPP. Surprisingly, it was enough, but that was a single case.
Large packages consisting of a desktop program (or many programs) also often use Windows, but here it is usually tied to installation in the internal network of a specific company, connected with, for example, the LDAP protocol (that is, Active Directory on Windows). That is the kingdom of huge corporate systems built over many, many years.
macOS servers, on the other hand, are rarely seen. It simply does not pay off: their advantage is the Unix backbone, and that is available in free Linux systems, while Apple's platform costs a fortune.
Summary
I hope that, even without going into the details, I have supplied arguments for sticking with Linux as the main operating system put on servers. Of course, that does not mean Windows is completely useless. It is still a decent OS, needed in specific uses, but in most cases and with standard technologies Linux leads because of its stability, security and price. On top of that, its popularity makes it easier to find a system administrator from the penguin camp (even a less experienced one) than a Windows specialist.
Best regards and thank you, Jakub Rojek.
Bibliography and interesting links
- https://itsfoss.com/linux-better-than-windows/
- https://www.tecmint.com/why-linux-is-better-than-windows-for-servers/
- https://www.ionos.com/digitalguide/server/know-how/linux-vs-windows-the-big-server-check/
- https://www.fosslinux.com/45759/linux-vs-windows-server.htm
- http://sql.pawlikowski.pro/2016/11/20/instalacja-mssql-w-ubuntu-pierwsze-wrazenia/
- https://www.c-sharpcorner.com/article/how-to-deploy-net-core-application-on-linux/
- https://www.phoronix.com/review/windows2019-linux-bsd
- https://www.phoronix.com/review/ryzen-server-os


