5 Reasons Why Linux is More Secure Than Windows

Thami Memel
CodeX
Published in
6 min readAug 7, 2021

--

When you hear the word Linux, probably the first thing that will cross your mind is a terminal filled with a lot of commands. This might be true for servers running Linux, but it’s not all.

Nowadays, more and more people are using Linux as their operating system, and even though the market share isn’t as big as Windows, many new Linux users choose it for its security and stability.

In this article, I will try to show the main reasons why Linux is generally more secure than Windows, and why you should probably switch to Linux if you can.

The Numbers

Usage share of operating systems for servers (source Wikipedia)

When it comes to security, servers are the most concerned. Servers on the internet store and transfer important data, and they can’t afford to be compromised.

In the picture above, we can see that more and more servers use Unix operating systems, which are dominated by Linux. It might also surprise you that Microsoft uses Linux to run its cloud and other services.

But keep in mind that while security plays a role in that market difference, there are other reasons such as Linux being generally free and open source, and a lot more stable than windows.

So why is Linux More Secure Than Windows?

User Permissions

Linux will ask for an admin password whenever a system-wide operation is launched

When you install Windows, it will create an administrator account and give you full access to do basically whatever you want with the operating system using the magical “Run as administrator” option.

Linux, on the other hand, doesn’t allow such permissions by default, it will allow you to use your home directory freely, but whenever you want to do a system-level operation you need to provide the root password.

Now for this point, Windows can be as secure as Linux if configured properly, but for decades the way the default installation of Windows handles user permission is wrong and risky.

A user can easily run a program as an administrator in Windows, while in Linux you have to enter the root password whenever you want to do so, this way you can notice when a script or a program tries to do something system-wide.

Software installation

Users can install whatever software they need without browsing the web

To install software on Windows, users generally go to the internet, search for an EXE or MSI file, download it and install it. This is a huge security risk since you never know if this source can be trusted or not.

Linux on the other hand uses something called package managers. To put it simply, a package manager is responsible for downloading the programs you need from trusty sources called repositories.

Repositories are usually managed by the community, and packages take a long process to get verified and accepted. They also make things easier for the user, since there is no search on the internet nor any lookup for download files, all you have to do is enter a simple command.

There are also many GUI applications on Linux that act like an interface for the package manager, and allow the user to browse and install the software in a more beginner-friendly way.

Microsoft tried to fix that problem by introducing the Windows Store, but we all know that nobody uses it, since Windows users are used to it the wrong way now. Also, the Windows store is slow and doesn’t include most applications.

Open Source

Source: CVE Details

Linux is an open-source operating system, which means that the source code for it is available for anyone to see and modify, you can even create your personal Linux distribution and commercialize it if you want and nobody will stop you.

At first, you might think that this is a security risk since bad people can look at the code. But the benefits outweigh the risks in this case. Since even more, developers and researchers all over the world find bugs and exploits and send patches almost every day to the Linux source code, which makes it safer and more secure over time.

Open platforms historically undergo a lot of scrutiny, but there are a lot of advantages to having an open source platform from a security standpoint. — Sundar Pichai

In contrast, Windows is proprietary software owned by Microsoft, and no matter how many talented developers Microsoft hires, finding exploits will never be as fast as in Linux since there is a big community behind it.

Also, unlike Windows, Linux distributions promote open source software. So most applications you will find on Linux are open source and benefits from the same thing.

Updates

Using only 2 commands users can update all system and software packages

For windows, automatic updates are only available for the system and a few other Microsoft software. Generally, the software developers are responsible for implementing updates, which some don’t implement at all.

This leaves the users with outdated applications on their systems. And it is one of the biggest security risks since it makes the system full of vulnerabilities that could easily be exploited.

Linux instead makes it easy to get updates and security patches not only for the system but also for the applications, just by using one or two commands only. All thanks to the package managers.

Note: Another reason why people love Linux is that during updates 99% of the time, you don’t need to restart your computer, even when you update the system.

Security through obscurity

Source: Wikipedia

Even though Linux is running the majority of servers in the world, its user base when it comes to desktops is very low compared to Windows at only 2%.

While malware and viruses that target Linux exist, they are usually geared towards web servers and network devices, and not Linux desktop devices.

On the other hand, Windows has a huge desktop user base at around 76%, this makes it a profitable target not only for real “Hackers”, but also for “script kiddies” and “crackers” who use the many tools available to exploit Windows.

Final Words

Despite all of that, user actions are what matters in the end. Windows can be as safe as Linux if it is piloted by a good user who takes security measures into consideration.

The point where Linux beats Windows the most in my opinion is that it makes it hard for you to screw up because it gives you good security options by default and pushes you to do the right thing.

Microsoft could learn a lot from the way Linux does that. And as the developers of the most used desktop operating system in the world, they should implement better default options for security to combat nowadays risks.

--

--

Thami Memel
CodeX

Software Engineer, Besides Golang i like History, Gaming and Traveling.