Why is Linux considered more secure than Windows? Is there some sort of recent security report that proves it?

I have come to believe that Linux has been safer so far, but now as we have Windows 10, is Linux still better in security?

  • 4
    I think the only real answer to your question is: "Every OS is equally secure in the hands of a competent administrator". For a more detailed answer, you'll need to think about things like: what programs are running? What is your patch process? End-user or server? What kind of network infrastructure is it running in? Are you include in your statistics that your average Linux user tends to be more tech-savy than your average Windows user (and therefore less likely to download and run suspicious files). Commented Apr 25, 2016 at 18:05
  • 2
    One thing that gives Linux a slight edge is the source code is available for almost everything and anyone can develop a patch and post it for other users to adopt. If you have Windows you can't get anywhere near the source code and your at Microsoft mercy for any patches.
    – cybernard
    Commented Apr 26, 2016 at 1:17
  • @RobertMennell Considered by whom? Certainly not by any knowledgeable professional (assuming they are willing to put their religious feelings aside).
    – AviD
    Commented Apr 27, 2016 at 10:22
  • My personal experience is Windows servers are more secure than Linux.
    – Kiran RS
    Commented May 1, 2020 at 10:31
  • You can decide for yourself, see madaidans-insecurities.github.io/linux.html other than that it mostly depends on choice of software. Yes, anyone can develop a patch if source code of application is public but most developers simply don't care about vulnerabilities and it remains unfixed for months or even years, what I mean is open source does not guarantee security.
    – knoftrix
    Commented Sep 11, 2020 at 20:21

1 Answer 1


Linux isn't really more secure than Windows. It's really more a matter of scope than anything. No matter what malware, exploits, and bad users exist EVERYWHERE. One being more secure than the other is nothing more than anecdotal evidence.

Malware exists for *nix, Mac, Windows, Android, iOS, Symbian, Xbox(yes), hard drives, and bios.

No operating system is more secure than any other, the difference is in the number of attacks and scope of attacks. As a point you should look at the number of viruses for Linux and for Windows. You'll see a trend in that Windows has FAR more viruses for it than Linux does and that's purely because it's more lucrative to hack for Windows since you have a greater chance of getting the thing you want. For all we know there might be a critical flaw in Linux that would open the world to pain if discovered. It hasn't been yet, but it could be there.

Really however OS security comes down to usage, habits, behaviour, and users just as much as it does software, hardware, security, and passwords. Your computer can be safe in an infected network as long as you do the following:

Constantly ask yourself "How do I keep MY computer safe?"

Really all you can ever do is work to keep your computer safe. That includes most notably safe computing habits. You could run for years without anti virus* and never get a virus as long as you're safe and you keep your computer safe. I'd still run an anti virus though since you could be safe all you want and make a single mistake.

After all those big data breaches you often hear about aren't usually on computers, but servers running special software, and it's the software itself that gets attacked and exploited to extract the data. What this means is that your computer is as safe as you make it. They didn't make theirs very safe.

Of course even if you make that software as secure as possible, it's all meaningless if someone manages to steal your credentials. In most data breaches an administrator gets phished, and their credentials are used to log in and steal the data. Here you can see that it didn't matter that the computer was safe since the user was attacked.

This really shows that there are two parts to security: The security of others (never trusted) and the security of yourself (only as good as you make it). To that end we all just try to make sure that the security of ourselves is as good as it can be. Herd immunity doesn't really apply to computer, so we have to keep them safe through our habits, usage, software we put on there, and making sure not to let in anything bad.

The world's most secure computer is turned off, not connected to anything, buried six feet underground, and destroyed.

Notes: *: Note the same as no security!

  • 3
    Okay, but why windows has more viruses (vulnerabilities) than Linux? I have tried to google it, but I havent found a concrete answer. My own best guess is that Linux is open based project and therefore the development effort there is better, since there are lots of users contributing to safety, while Windows is closed project. Am I right?
    – Omaja7
    Commented Apr 25, 2016 at 18:16
  • 11
    Nope, completely wrong. The truth of the matter is that if I write a single virus for windows, in the time that it is a viable virus I can infect magnitudes more than I could if I wrote the same virus for Mac or Linux. It's just better business in the virus world to attack the most possible targets with the least effort. Commented Apr 25, 2016 at 18:17
  • 4
    @Omaja7 Windows has historically been more targeted by malware authors due to it's wider market share and less technically inclined user base.
    – Bacon Brad
    Commented Apr 25, 2016 at 18:19
  • 2
    In fact, should Linux become the most popolar OS for home users, much more virii (viruses?) would be written for Linux than they would for Windows. Moreover, you could have a system with few vulnerabilities and a lot of malware using always the same ones. In the end, the number of malware for a given platform only depends on its popularity.
    – A. Darwin
    Commented Apr 25, 2016 at 18:26
  • 5
    @RobertMennell Google, Facebook and Twitter use Linux servers, and as of 2007, PayPal also used (couldn't find more recent information). Virtually all supercomputing is done under Linux (en.wikipedia.org/wiki/…). I would say there's plenty of motivation to hack into those servers (emails, banking information, bitcoin (?)). However, I agree that there aren't many Linux enthusiasts (except me :) around.
    – kristjan
    Commented Jan 30, 2017 at 15:37

Not the answer you're looking for? Browse other questions tagged .