5000+ Great Articles

Why Does Windows Have More Viruses Than Linux and OS X?

I am writing this post because I recently overheard a conversation between two friends in which one recommended a friend to switch from Windows to Mac or Linux because the latest operating systems are virus-proof and never get malware or rootkits.

Uh, wrong. Completely wrong. Unfortunately, there are many people who believe this and think that buying a Mac or installing Ubuntu will somehow protect them.

There is some truth in Linux being a bit more secure, but both OS X and Linux have their fair share of viruses.

Also, since many people do not run anti-virus software on their Macs because it is not considered necessary, when the virus starts to spread in OS X, it spreads like wildfire and no one even knows they have the virus. The Flashback virus infected over 600,000 computers in 2012 and it took Apple weeks / months to release a proper fix.

In this article, I wanted to explain the reasons why there are more viruses on Windows, and explain if Linux is actually more secure than Windows, and why.

Malware comes from many places

The first thing I explain to people is that all operating systems are the king of malware or viruses from the Internet and from email attachments.

It doesn’t matter what OS you have. If you visit a site that is infecting malware by clicking inappropriate links, or downloading and opening unknown attachments, your computer can easily become infected.

Unfortunately, this is how most people get malware and viruses on their computers. It’s not that common to get a virus or hack due to a lack of security at the OS level.

Researchers always find security holes in Windows, IE, Office, etc., but usually systems are fixed before the virus starts to spread or someone can take over your computer.

Since Windows is by far the most widely used operating system, only the sheer number of devices will ensure that Windows users will receive more viruses. Now that Macs are selling pretty well, virus and malware infections have increased as well.

OS X is inherently no more secure than Windows. The same is not true for Linux, which is inherently slightly more secure. I will explain this later. However, when a Linux user receives a virus, it is almost always associated with an Internet application such as a mail server or web application.

Linux users are technically smart

To run Linux on a daily basis, you need to know a lot more about computers than a Windows or Mac user, plain and simple. Although Linux is quite small in the consumer arena, Linux is huge on the server side like web servers, etc.

What’s surprising is that many Linux servers don’t have antivirus. Why? Because the people who serve them know what they are doing and the servers are protected from potential attacks.

People installing Ubuntu are also less likely to get a virus by visiting a shady website (they will be visiting the site in a virtual machine) or downloading an infected attachment from their email.

Many people in this category install extensions such as NoScript that prevent any scripts from running when they browse the web. Obviously, if you do your best to keep yourself safe, the chances of being compromised are much lower.

Linux vs. Windows Permissions

One huge advantage Linux has over OS X and Windows is user rights. There are many annoying problems in Windows such as the fact that someone might call the file “CuteGirl.jpg.exe” and if you double-click it to open it, the file will be launched and your computer will now be infected. This kind of hacking cannot be done on Linux. Why?

To execute a file on Linux, you must make it executable. This means that you have to specifically set permissions for it to run it. Another reason Linux is more secure is because you need root level access to do anything.

Most Linux users use a regular account and only log into the root account when they need to make certain changes to the system.

Windows also has administrator and regular user accounts, but 99% of Windows users simply log on to their computer using an administrator account, thereby losing all the security benefits that a regular account provides. Even if something manages to run on Linux, it can’t do anything unless it gains root access.

The special permissions required and the use of non-root accounts in Linux makes it much more difficult to create a virus that spreads just like it does on Windows or OS X.

Linux is open source and that’s important

Another great advantage of using Linux is that everything is open source. You can see all the code, so it is very difficult to hide a virus in Linux software. If someone does create a proprietary software package for Linux, it will automatically be considered untrustworthy, unless it comes from a large reputable company.

Most people using Linux install software from the official package repositories of their Linux distribution. There is no official Microsoft repository for Windows software, it exists everywhere and everywhere.

Even someone like me, who is constantly working with computers, I downloaded and installed software that I thought was legal, but ended up being hidden spyware. In my case, I first install only unknown software on the virtual machine, and if everything works fine on the virtual machine, I install it on my main machine.

In OS X, Apple recently added a feature to the OS that will prevent the installation of any software that is not in the Mac App Store or a group of identified software developers.

You can manually change the setting to install any Mac software, but I recommend Mac users to enable this protection as it provides better security than a Windows computer that can be installed on anything.

Other factors

There are a couple more factors that determine why you don’t see so many Linux viruses:

1. Linux is a heterogeneous environment. If you’ve ever thought about using Linux, the first thing you probably need to do is decide which Linux distribution (flavor) to install. There are literally thousands of Linux distributions out there, and they are all different.

The Linux kernel is different and they all have different packages and configurations. Having so many different forms of OS makes it difficult to create a virus that will spread everywhere. This is not the case on Windows.

2. Linux has special commands and functions for security purposes. As you study Linux, you will learn a lot about commands that allow you to perform certain security-related tasks, such as sudo or chroot. These commands make it safer to perform special tasks on Linux.

3. Linux kernel is smaller. This is probably a debatable issue, but overall the Linux kernel is much smaller than the Windows kernel in terms of areas of the OS where permissions are checked and applied. A more compact, smaller kernel doesn’t necessarily mean safer, but it definitely helps keep things to a minimum.

4. Linux with enhanced security. There are some Linux distributions that have a feature called SELinux or Linux with enhanced security. Basically, it is a set of kernel modifications that make it more secure. It’s part of Red Hat, CentOS, and even Ubuntu.

Hopefully this article gives you some more details on why Linux is considered more secure than Windows. It is definitely not virus-proof, and if one day everyone starts downloading and using Linux, hackers will find new and innovative ways to infect viruses there too! Enjoy!

Exit mobile version