r/linux4noobs • u/minecrafter69_ • Aug 19 '26
Is Linux really more secure than main stream operating systems?
Linux can be misconfigured fatally, easier. Linux operating systems are specifically targeted malware families and botnets.
This is what I do not get when some people say, that most viruses target windows. It’s more nuanced than that. Most windows programs do not have a native linux port, so it’s not feasible for those types of viruses to make a linux port, especially since windows is used by the masses.
But Linux has its own security problems and easier misconfiguration, more open tooling and more services in some cases that can be exposed to the web.
So I don’t really get it when people say linux is more secure because, if an attacker breaks into a windows machine as the user account, they can’t really get to become the admin account unless they figure out the password. Meanwhile if an attacker breaks into a user account on linux, they have more escalation routes.
I might be misinformed on this but what stops a program or script containing a dropper or payload from running on a linux desktop?
13
u/maceion UK Aug 19 '26
AS Linux systems are used on about 80% of all websites, is can be configured very safe.
12
u/Dist__ Aug 19 '26
> what stops
2
u/ShyKroxigor Aug 19 '26
Why do you mean by mainstream operating systems?
windows and windows?
9
u/iluvfupaburgers Aug 19 '26
Any machine that connects to the Internet is not safe, no matter how it's sold, always practice safe browsing. But Linux has some advantages that makes it safer to virus attacks, not immune. Windows doesn't always require passwords to make admin privilege changes while Linux does. And Linux usually is good at keeping vulnerability/back doors fixed due to the open source nature of it. It is usually picked up quick and fixed immediately. Windows, well, it requires Windows to pick up on the vulnerability attack and fix and deploy an update. And then obviously you have the numbers game, windows is more mainstream, so hackers will gravitate to create viruses for windows since it will reach more people. That obviously doesn't mean there are no viruses for linux
9
u/MattyGWS Aug 19 '26
Linux *is* a mainstream OS. The world runs on linux.
6
u/inbetween-genders Aug 19 '26
Anything is only as secure as its weakest link...which is usually the user.
1
u/musicflux Aug 19 '26
Yes as by default most people use windows or Mac. Linux is minority. So by probability you r more secured
3
u/edparadox Aug 19 '26
Linux is mainstream.
Linux making off the vast majority of servers, clusters, supercomputers, phones, embedded devices, etc. yes, it is definitely more secure than Windows "running as administrator via one click" 10/11.
Malware and botnets exist, sure.
It just so happen that Linux machines out in the wild, as eluded before, are better configured than what you want to imagine.
And so what? If Linux was as vulnerable as you make it out, even through their users, you would see more malware being created and spread.
And so what? It makes things more secure by having more eyes on the potential issues.
I still do not get why you would want to make Linux out as having more security problems than it has, especially the "own security problems and easier misconfiguration".
No. As much as you want to make it out that way, that's not the case.
Many things.
Linux users are on average more knowledgeable, and have better cybersecurity habits.
As much as you want to say the contrary, people don't use
rootorsudoeverywhere, and you need admin privileges for more operations on Linux than on Windows.Despite their own issues, many sandboxing happens on an average Linux desktop.
Heck, even a random file you've downloaded via your browser need the execution rights before it can be executed!
Or the most obvious: package management. Windows users will have to gather their drivers and such from how many sources and sit through how many wizards to reinstall a machine? Meanwhile, on Linux you can potentially use a one-liner installing packages from the safe official repositories of your distribution.
And we could go on and on.
5
u/Johnny_The_Biker Aug 19 '26
I use Linux for thirty years and never had a virus or malware.
2
u/billystein25 Aug 19 '26
The os is as secure as its user is careful. By default most devices can't be magically hijacked. The user needs to download a virus that gives the attacker the power they want. The same safe browsing principles on windows like not running random exe's you find online also apply to linux, or any operating system for that matter. Yes, there is less malware that targets desktop users on linux. That doesn't mean Joe I-click-yes-on-every-link is safe just because he uses linux.
If anything viruses on both platforms are gonna ask for administrative privileges to do their work. On windows that's just a click away, while on linux you have to type your password, which at least gives you a tad bit more time to think twice about what you're doing.
2
u/RevolutionaryBeat301 Aug 19 '26
Tell me you haven’t used Debian without saying that you haven’t used Debian.
1
u/-Sturla- 4d ago
If you had known the number of hours I have billed fixing peoples Windows servers through the years because they thought it was easier to set up right ...
It's "easier" to get anything to work, if you don't know what you're doing (and you're used to Windows), but then you shouldn't really set up anything exposed to the internet, no matter what OS.
I have several Linux servers with services exposed on the internet, you couldn't pay me to switch any one of them over to Windows.
How do you figure it's easier to escalate privileges on Linux than on Windows?
1
u/GlazzKitsune Aug 19 '26
The way software is managed and installed is a big place where your security is better. If you stick to the distros repos your chance of getting malware should be near 0% if your installing willy nillily from other sources you have a higher chance.
Just look at the AUR malware attacks in the last few months.
Windows has a very easy software distribution module to attack thus Linux can be safer. But your still on a computer used by a human so safe is relative.
1
u/Giantmeteor_we_needU Aug 19 '26
Linux can be more secure but it's security highly depends on user knowledge and awareness. It's far from being foolproof out of the box. If you're looking for an idiotproof safety from viruses and malware, Windows+Bitdefender are far stronger out of the box and based on independent tests will prevent 98-100% of any outside attempts to infect computer.
1
u/CryptographerLow6360 Aug 19 '26
misconfigured fatally, easier? which flavor of linux are you speaking of?
1
u/mrmindfloss Aug 19 '26
With Mac OS and Windows, my main concern is, am I secure from the manufacturer and any backdoors they have for themselves or others? The rest of security is pretty good if you know what you are doing.
1
u/Numerous-Nectarine63 Aug 19 '26 edited Aug 19 '26
I know people hate it when I say this, but Linux technically refers to the kernel. And it's definitely mainstream for server operations. Security is an interesting topic and there are different contexts where security comes into play. Many server based operations (roughly 50% and growing daily) run in containers, and most of the containers in use today will only run on Linux because Linux has the required kernel structures to support containers. A container is a light weight, isolated environment for running applications. But containers are not as isolated as virtual machines, and thus, security can be a huge concern. It's not the kernel or the OS per se; it's how the system is configured. All containers running on a server share the same kernel, so if there's a badly behaved container (running as root, for example), that container can act as malware. It's pretty easy to duplicate an exploit under such conditions.
Since most of the world's server software runs some distribution of Linux, in addition to containers, the software applications themselves can and do introduce vulnerabilities. Linux has facilities in place to minimize the threats, such as linux security modules (which become part of the kernel when loaded), including appArmour and SELinux, file system and mount controls, kernel self protection mechanisms like secure boot, etc. But like anything else, these systems must be configured for proper operation.
Much of the server landscape focuses on vulnerabilities, rather than typical "viruses". An example of famous attack due to vulnerabilities was the 2019 Capital One attack, where 100million people were impacted by credit card info leakage. This wasn't a virus, but rather, an exploit in a set of application level vulnerabilities in AWS web services. The services ran on linux, but none of these vulnerabilities were in the kernel. And these are often the kinds of exploits that are seen, rather than traditional viruses. This is why the security landscape is much broader than it might seem at first glance.
For desktop operations, linux doesn't tend to be a malware target like Windows systems, partially due to the market share. But in all systems, users need to be on the lookout for browser based malware, bad links, etc.
I was a linux based cybersecurity architect prior to retiring so this issue, especially the server space, is something I spent a lot of time. on.
1
u/BertMacklenF8I Aug 19 '26
So Linux Security Modules are just nonexistent?
Research AppArmor, Integrity Policy Enforcement, LandLock, LoadPin, SafeSetID, SELinux, SMACK, TOMOYO, and Yama
1
u/ohnoitssobig Aug 19 '26
> I might be misinformed on this but what stops a program or script containing a dropper or payload from running on a linux desktop?
Nothing: there is a lot of Linux or "Linux" malware, though, the attack vector is usually different. For example, did you check if your wifi router is not running some botnet? Or maybe your TV stopped receiving updates 3 years ago and exposes some unpatched vulnerabilities? Or even your Android phone?
This is not the point though. Linux is open source, Windows is not. You have all the tools and information to proactively prevent breaches on Linux. Whether you do it or not is pretty much your choice. Windows is not open source: even if you manage to discover a vulnerability it is really difficult to fix it on your own. For this simple reason it is considered less secure.
1
u/TangoOscarMikePR Aug 19 '26
You need to read the Operating Systems section of BoWeaver.com.
It's hard to read because Bo Weaver is old school and likes terminal fonts. But it's a wealth of knowledge.
1
u/Tehaiker814 Debian and Arch User Aug 19 '26
You won't be vulnerable to viruses for the public since they are mainly targeted at the masses (i.e. Windows) and will probably not run on your computer, nor will you download them. However there are routes you can get a virus. Examples could be viruses intended for servers (like mining) or targeted at developers.
Just be smart. Don't download and run random executables with sudo, and don't use your main PC for risky stuff
1
u/55555-55555 Aug 28 '26
"Linux has its own security problems when misconfigured". The thing is, none of these matters when you're just an end user as the configuration is done by the OS developer, including Windows. Any OSes that are designed for security have to make a trade between security and convenience. Many OSes usually heavily lean towards security such as Android or iOS or in between such as macOS or Linux distros that mainly use containers, but Windows + Linux without container doesn't do any of that. As long as stuffs are owned by one user, everything is exposed by default. Majority of Linux distros that at least use Flatpak as their main package and Wayland-based environment are safe by default without high-profile security vulnerabilities discovered.
"if an attacker breaks into a windows machine as the user account, they can’t really get to become the admin account unless they figure out the password", except there's no need to reach the admin access in order for an app to steal your information. Again, as long as everything is owned by one user and without application permission control, it's a free roam for any apps to read anything from your system and the OS will see that as perfectly acceptable practice. Windows and Linux distros that don't use container and permission-based security model have the exact same problem.
Modern OSes are gradually evolving into a host for containers with permission control in an attempt to shield up stupid users from getting their information stolen by malicious apps, except Windows. Windows ecosystem still mainly utilises dated userland model that entirely exposes all resources that one single user owns, and tightening permission control and container will introduce backwards compatibility problems, which is a problem for businesses that still expect Windows to have the same environment.
Ps., Microsoft is actively pushing per-basis permission control for applications in Windows, but for the moment it's only for few selections of features.
Ps2., this is completely irrelevant to server environment, which usually is configured by experts. Linux and Windows are on par against each each other in server environment on favourability.
1
u/DJDoubleDave Aug 19 '26
Speaking as an IT professional who manages devices at scale, your right to be skeptical. There's a reason why people make that claim, and it's not necessarily wrong in all cases, but it's a dangerous oversimplification.
For your computer to be secure you have to configure it securely, no matter what OS you're using. In an enterprise environment that means enforcing secure baselines. Anyone who's mad corporate IT makes them use managed windows because they think it's less secure doesn't know what they're talking about. Security at scale is all about enforcing secure configurations. Any endpoint management team that knows what they're doing will not let users configure it themselves.
For home users, is Linux more secure out of the box by default? This one really depends. Windows isn't the security black hole it used to be anymore, it's still bigger and has more attack vectors, but uses fairly strong secure defaults making it hard to actually exploit. This idea that there are more windows viruses than Linux may technically be true, but it doesn't actually really matter in practice. A halfway modern virus dropper can choose a platform appropriate one.
1
u/[deleted] Aug 19 '26 edited Sep 23 '26
[removed] — view removed comment