Question:
How is linux able to keep itself from getting viruses?
No chance without House!
2012-11-15 15:22:36 UTC
every linux users brag about not getting viruses with linus but I would like to know how linux keeps it self from getting viruses.
Twelve answers:
Chet
2012-11-15 17:01:02 UTC
Anything that runs a program can in theory get a virus. You could write a virus and infect your smart TV if you wanted to. So Linux can get a virus.



BUT....



When Windows was written it was made for single user non-networked. Linux on the other hand was made for multiuser on a network. If you design a car from the ground up, it will be faster than a car that was not. Same with Linux. Security was included from the get go.



When you log into Windows you are administrator. With Linux when you log in you are just a user. You should never log in as administrator (root in the Linux world). As a user you can make all the changes you like in your home directory. The home directory has all your files and preferences. But no system files. If your home directory becomes lost, your machine is still bootable and usable.



When you need to install a program or make system wide changes you will be asked for your password, this will give you temporary root privileges. Now you can see how this will stop the spread of viruses. If one tries to install, it can not because you are a user. The virus can not install itself because it does not have root privileges.



About the only way to get a virus in Linux is to install a program form strange sites. If you stay with the package manager you will be safe.



I have used Linux for years, with no anti this or anti that, no firewall, no dozens of security software that is a must for Windows. I have never had a problem.
Christopher
2016-08-29 12:39:41 UTC
2
mathilda
2016-08-03 09:03:55 UTC
Sure, you can get viruses for your macbook professional however it is rather infrequent in view that mac's operating approach could be very at ease in comparison with windows. I do not propose buying an anti-virus on a macbook on the grounds that the possibilities of getting an endemic are totally slim (Have now not heard of any of my friends get a plague on a macbook.) should you nonetheless suppose insecure, that you may purchase an anti-virus but it could usually be a waste of cash. Apple additionally has a distinguished purchaser carrier and if whatever have been to occur to your macbook pro, that you may take it to them and they might substitute it without cost if you are nonetheless below assurance, no questions requested. Hope this helped!
?
2012-11-16 08:45:39 UTC
system security in large part is the reason.

If defined correctly users can't install product without root lvl access. Also, social engineering by virii writers take advantage of the people who don't pay attention who are generally Microsoft users.
eric k
2012-11-16 06:05:03 UTC
1. The nature of open-source code.



2. Repository use limits your exposure level to potentially malicious software.



3. The strict separation of root and normal users. I download a Linux virus onto my machine; what exactly is it going to do? You can't even change your timezone as a normal user, let alone alter firewall settings, install/uninstall programs, or run malicious services in the background. Compare this to the "executables" found in Windows: automatic administrator permissions over your entire system.



It's worth noting that Linux has a large share of the world's servers, so saying "no one targets Linux because of it's relatively small user base, it's not worth their time" only goes so far in playing down the inherent security merits of a Linux-based OS.



This guy explains the basics well with a minimum of jargon: http://www.youtube.com/watch?v=n4PGJbDlvsU&feature=related
David
2012-11-16 01:57:27 UTC
The root question



I have run puppy Linux as root since 2004 The first puppy. Puppy runs in root and I have never had a virus or malware in all that time.



I think that the virus writers who use linux to write virus will not **** in there own back yard.



Also the user has to gain access to your system first and puppy runs with no services running by default. So if you are careful on the web you are safe.
ʄaçade
2012-11-15 21:01:44 UTC
Mostly good answers above.



Linux is a very popular TARGET for viruses. Many of the most important servers on the Internet are Linux-based servers. Because of its importance on the Internet and in corporations, virus writers would LOVE to make a virus to attack it. And they do.



The problem for the criminals is that Linux is designed to make it difficult for a virus to get anything actually done. Linux does not on its own run any programmes surreptitiously. I can easily write a Linux virus. But how would I ever convince you to run it in a harmful way?



By the way, Microsoft Winduhs is also quite secure --- as long as you keep if OFF a network and do not run any programmes that you did not write.
Kresimir
2012-11-15 16:00:40 UTC
Like Kazuma pointed out, the #1 reason is that majority of people use Windows/Mac, so not many viruses are made for linux. Also with linux the users are more computer knowledgable so they can protect themselves better on the internet. There aren;t any firts time computer users that don't get Windows or mac and decide they want a linux.
Bob
2012-11-15 15:27:20 UTC
The number one reason is that Linux isn't used as much as Mac and Windows. Although Mac is a derivative of Linux, Apple introduces it's own vulnrabilities that hackers exploit. Windows... is windows. It will always have viruses because of it's popularity, and the lack of emphasis on security of the operating system. Depending on your linux distro, there are firewalls available. Also, linux from the ground up is pretty secure. For instance, in Windows you can do whatever you want, maybe even destroy your operating system. In linux you literally need to login to the root accout which has it's own password. In other words a hacker would not only need access to your account that you use, but also the password to root. There is plenty, but that's just an example.
Josh
2012-11-15 15:25:40 UTC
It's designed in such a way that it's very difficult for a virus to do anything once it's actually got onto the system.
『  』
2012-11-15 18:22:50 UTC
For one, most people get all of their software from the Distributions Repository, only software that has gone through many tests and great scrutiny are loaded into the repository.



Those who get there software from somewhere on the Internet, will either check the source code, or verify the cryptographic hash i.e., SHA-224, SHA-256, SHA-384, SHA-512, &c.



The permissions. In order for something to install on Linux, the user has to give it permissions. Even small scripts which are downloaded from the net, require the user to open a terminal and give the script permission to be executed., i.e., chmod +x file.



~~~~~~

A little interesting fact, most people think that Linus Torvalds named Linux after himself which couldn't be further from the truth. Linux itself got its name from Ari Lemmke who ran the FTP server the original Linux Kernel was uploaded to. Linus Torvalds, the creator of the Linux kernel, wanted to name the kernel Freax, but Ari instead gave him a folder called “linux” to upload his kernel to. The Linux name came from “Linus’ Minix” which was the operating system Linus was trying to replace for himself.
Damianek
2012-11-15 15:29:04 UTC
Most malware is designed for windows, and more recently mac. Don't listen to mac people talking about it not being able to get malware because it's possible, linux also can get malware for sure, if it's a PC, Laptop or even a smart mobile phone, it can get malware.


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