Question:
Why can't linux get the viruses that windows does?
Luka
2012-09-09 10:35:06 UTC
Why can't Linux get the viruses that windows gets?

Windows: C++, kernel is in C
Mac: Objective C, kernel is in C (IO PnP subsystem is Embedded C++)
Linux: Most things are in C, many userland apps are in Python, KDE is all C++

Source for this scheme: http://stackoverflow.com/questions/580292/what-languages-are-windows-mac-os-x-and-linux-written-in

Thanks!
Six answers:
ʄaçade
2012-09-09 11:27:38 UTC
Linux is VERY popular. It has a huge user base. Many large and small corporations, government agencies, and educational facilities use it for servers and desktops. Cell phones too. Because many of the military and high-end science research computers run Linux, it makes a sweet target for sickos who want to write viruses. The so-called 'small user base' refers to home users and average office users in the U.S. They are not the main targets for serious crackers. Do not let people fool you with that distraction.



Linux and Unix are designed to be secure. You have to work at it, or do something remarkably stupid, to make it unsecure.



You mention C, C++ and Python. The language does not matter. The source language of the kernel (pbuk) does not matter. The security of a system lays within the constructs of the system.



If virus writer sickos and criminals wanted to write a Linux virus, they certainly would. And they do. But a virus has to run to work. If you can coax someone to run your virus as root it would work.



Viruses for Microsoft Winduhs usually try to exploit the "Normal" operations of the MS system. Linux "Normal" is inherently more secure.



You or I could EASILY write a virus to attack Linux. I can do it in a single bash command. But the trick would be to get you somehow to RUN it as ROOT. That you would (probably) never do.



But of course all this depends on the particular technique deployed in the virus.
hawklord
2012-09-09 13:23:44 UTC
the amount of users has nothing at all to do with virus's,



linux is by default more secure and all software is installed through the respective software manager,



cutting out the need to download from unknown sources,



to get a virus you need to download and install it (whether knowingly or unknowingly),

linux repositories are checked and double checked for 'bad' software, if one got a bad piece then everyone who uses that certain repository would also get it,

if a bad piece is found then a patch is issued within hours,



think about this - 95% of the worlds super computers use linux, top businesses and governments around the world use linux - including nasa, the us army and the french police,

how do you think the internet is run ? - on linux servers



that is not a small user base



don't you think that if one of those machines was infected then the culprit would become instantly famous ?



there are no virus's for linux in the wild, they are in a laboratory being used as toys and experiments,

being dissected to make linux even more secure than it already is,



people do write virus's for linux though, but the problem is getting them to run after a restart and the problem of which package (.deb, rpm, etc),

but the main problem would be how will it get installed ?



in the opening words from this link



http://linuxmafia.com/~rick/faq/index.php?page=virus



quote =

Should I get anti-virus software for my Linux box?



The problem with answering this question is that those asking it know only OSes where viruses, trojan-horse programs, worms, nasty Javascripts, ActiveX controls with destructive payloads, and ordinary misbehaved applications are a constant threat to their computing. Therefore, they refuse to believe Linux could be different, no matter what they hear.
jplatt39
2012-09-09 11:48:00 UTC
Compiler is only part of it and Microsoft uses visual studio for a compiler. Linux uses GCC with the GlibC libraries. It uses the Executable and Linking Format for its files. Actually, and I've said this recently, when I started using Linux chances are if you were target it was by someone you knew. This is no longer true.



Linux is not vulnerable to Windows viruses because it is a modular OS where almost anything can be replaced (Google even replaces much of GlibC in android) and the user base for any version is rarely large enough to make it worth malware writers while. But the fact is that it's NOT WINDOWS. It's a FREE UNIX. And Windows is NOT A UNIX.
ratter_of_the_shire
2012-09-10 05:03:22 UTC
Because it's hard to find a single exploit program that will work on the majority of linux distros. Also software update are pushed by the central repository, meaning most components on a linux system are either up to date or patched against common exploits. (80% of windows malware is vectored though out of date components (flash, java, browser...)
SteveO
2012-09-09 10:43:32 UTC
Linux isn't vulnerable to the same viruses and exploits that Windows has because it has a very small user base compared to Windows and OS X. Also, by design, it's very secure (thanks to UNIX roots) and anything that would cause the system to break would have to have root access, which is something you have to knowingly give the system permission to do by typing in the root password.
satish
2012-09-09 10:42:16 UTC
It is possible to write viruses for linux also.



but what's the point of writing virus for OSes which have less users.More over people who use Linux know more about computers and operating system security. It not worth the cost of writing malicious code.



the other thing is writing viruses for linux an unix like system is much harder.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...