There is no operating system that is 100% secure, based on 2019 stats, Android, Windows, IOS, OSX were the top used operating systems.
So when hackers work with payloads, also known as “Viruses, Worms etc..”, they tend to create more available ways targeting the most common OS (Microsoft – Windows. NetMarketShare estimates that a staggering 88% of all computers on the internet are running a version of Windows). Vulnerabilities, Exploits & Zero day still happen on a daily basis, especially targeting bigger organisations. Hackers have historically targeted windows systems the most, for the reason that a large number of Windows-based & Software personal computers are on the market.
This does not mean Linux based operating system are more secure to every type of user. Developers, and maintainers of services running under Linux, do not often update the services, ending up with outdated & vulnerable versions. Android, Apple operating systems, are based on Linux architecture. So in Linux, when you create a payload, Anti-virus software does exist for Linux, but you probably don’t need to use it. Root-kits that affect Linux are still very rare, yet for experienced hackers its still the same process, but different outputs. And many don’t realize that its the same skill set for an experienced hacker to create a payload, only much easier for Linux, it just runs the same libraries used, unlike Windows, in some cases where you have to modify your payload to bypass other measures.
Social engineering and Phishing attacks can get you credential information, browser based attacks that can evolve in complete sessions, without going through any hardening, because you are socially engineering the human mind, in combination with techniques to deliver to inbox, whether its a phone, SMS, email you will get targeted, and that is above any OS or Software. Code Reviews from an offensive mindset is not performed often for apps, resulting in daily hundreds of vulnerabilities are still being released, and many still do not update.
Still people asking if windows are more secure operating system than Linux, or if Linux’s more secure than windows, if android ‘s secure, well that depends on who is doing the test, and what measures you took as an end user or company, you cannot protect what you cannot see. Linux is open source, an important differentiation than the other operating systems.
Linux code is reviewed by the tech community, which lends itself to security: By having that much oversight, there are fewer vulnerabilities, bugs and threats, & the kernel is maintained by Linus Torvalds who is still involved. Deploying a secure operating system is an important starting point, but without user education, strong firewalls and constant caution, even the most secure networks can be invaded.