People often say that Macs are more secure than say Windows. Which is why many Mac users don't have antiviruses. But why is this? Is it because of the need for a password for sudo commands, like changing system files?

But then couldn't the hacker just steal the password also in his virus - how hard could that be? Why is Mac more secure than Windows?

  • 2
    If people often say that Macs are more secure than Windows, then that's your problem right there. You should ask them why they say such silly things.
    – AviD
    Sep 18, 2015 at 13:19

4 Answers 4


There are fewer attacks and malware on Mac OS X systems for a variety of reasons, almost none of which having any relation with the notion of "software quality":

  • There are fewer OS X systems than Windows systems (right now, about 7.5% of computers involved in Internet browsing use OS X, according to StatCounter), making OS X a less interesting target for malware authors. Developing malware costs efforts and time, so the malware authors want to get a good return over investment. So they hunt where there are the most preys, i.e. on Windows, not OS X.

  • Malware usually enters a machine through explicit user action, i.e. installation of some software package that turned out to be dodgy. OS X users tend to install less third-party packages, mostly because OS X comes out-of-the-box with more accessories.

  • In a similar vein, when it comes to supporting hardware, OS X has its own drivers, so the normal Mac user plugs his new device: either it works right away, or it will never work. There is usually little point, in the OS X world, to try to download and install third-party drivers. On the other hand, for Windows, driver download is the norm. This does not mean that third-party drivers are often infected, but it implies that Windows users are accustomed to downloading executables and running them with full administrator rights.

  • Still on the same subject, Windows has long suffered from something known as DLL Hell, coming from the traditional method of identifying DLL only by a short file name, with no versioning support. This has trained many Windows users to "solve issues" by looking for the faulty DLL name on Google and then downloading it from the first link that arises. OS X, on the other hand, is on the habit of embedding needed libraries in the application, which avoids the issue (at the expense of disk space, since it makes applications larger -- that's rarely a problem with today's disks).

  • The main characteristic of Windows is its backward compatibility: that which was once running in any version of Windows, will keep running. This has made the system API very complex through decades of accumulation; and this complexity helps malware authors in the hide-and-seek game that they play with antivirus authors. Backward compatibility is much less maintained in the Mac OS world (Apple even switched complete architectures several times, switching from Motorola 680x0 CPU to PowerPC, and then to Intel x86; and support of 32-bit x86 application code can be predicted to be removed at some point).

It must still be said that what makes a machine secure is not really its software, but its system administration, i.e. what the user makes with the machine. Most of the points above are about how OS X users do not behave the same way as Windows users, for a lot of reasons, some of them being historical.


My personal opinion is because Windows is used by more users than a Mac. Because of this, fewer vulnerabilities are discovered in Macs.

enter image description here

Based on the browsing statistics from August 2015, it can be determined that there are a lot more Windows users online than Mac users.

For an attacker it is a lot more interesting to discover a security flaw in a Windows environment because of the number of possible compromised hosts will be (quite) larger.

  • In fact this would be better described as random network risk of using Macs. Risk is a function of possible impact (we can suppose it is the same with any OS) and likelihood. We can say for a random netizen, Macs are less risky. This way Linux is least risky. Against a determined and competent targeted attack... well that is a completely different story.
    – goteguru
    Sep 18, 2015 at 12:03

It is not always true that this operating system is safer than other. It depends for example on the versions you compare. Ir also depends on the factors used to assess this OS is better or worse than an other. For example, the delay taken for an OS to patch a security vulnerability may impact the image of the OS to users as it occured to Mac as stated on the third link above. Even the idea that Windows OS is more targeted than other systems is not always true:

Most vulnerable operating systems and applications in 2014

enter image description here

And according to Kaspersky Security Bulletin 2014 a total of 3 693 936 attempts to infect Mac OS X- based computers were blocked by Kaspersky Lab products, and:

Estimates suggest that 700,000 Mac OS X users suffered from the Flashback Trojan virus . Users that had believed they didn’t need antivirus software – because they were Mac users – found that their false sense of security offered no defense against the attack.

  • 5
    "according to Kaspersky Security Bulletin 2014 a total of 3 693 936 attempts to infect Mac OS X- based computers were blocked by Kaspersky Lab products." This is a pretty meaningless number because it doesn't say anything about how many installs they have, how it compares to other platforms and what they count as an "infection attempt". Some security products tend to count every network ping they block as an averted cyber attack.
    – Philipp
    Sep 18, 2015 at 12:02
  • 2
    I find it very odd that the chart included in this answer seems to consider alll versions of OS X to be one operating system, yet breaks out Windows Vista, 7, 8, and even more strangely, 8.1. Sep 18, 2015 at 12:20
  • imore.com/…
    – Omikron
    Sep 18, 2015 at 12:44

People often think that Macs are more secure (although false), because they provide developers and users limited access to the insides of the system compared to that of Windows or Linux systems.

  • I would see that as false, as a developer myself I have found that with tools like dtrace Apple provides as much if not more access to the 'insides' as Microsoft does. And the documentation is pretty dam thorough. Sep 18, 2015 at 16:32
  • I would say iPhone users have limited access
    – Ulkoma
    May 13, 2017 at 8:53

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