14

Possible Duplicate:
Do I need to have antivirus software installed on a Linux distro?

I'm using ubuntu right now and I think it's really good. Really. But I'm wondering about viruses. I come from a mac background (I have never got a virus) and I'm wondering how ubuntu does the same. It has "millions of users" so I'm wondering why someone didn't make one yet. Or does it have built-in protection?

0

3 Answers 3

28

In no modern Operating System viruses are an issue for the sensible user. So viruses are an issue if you're not sensible.

Viruses in fact don't get harmful unless you actually run them. That's almost the same in every different O.S., and do mistrust people telling you "Linux is good because Windows has got viruses" because it's nonsense. Linux (and Ubuntu) is good for many reasons, but this has nothing to do with viruses.

However, running Ubuntu or Linux in general lets you be statistically less prone to get infected by viruses. Ubuntu encourages users to choose official repositories as the main source of software (which are safe), and running an executable by double-click is less easy than in Windows.

But you can still get into a website that asks you to add a poisoning repository, or to install a malicious .deb (with double-click) to add some awesome functionality Ubuntu is missing.

So viruses are a problem because of the user, not because of the system (which in most cases is an innocent victim), even if in some old Windows systems (95, 98, ME but also old versions of XP) one could get a virus without doing anything unsafe, just through some vulnerability of the system. But leaving out pointless chat topics (Micro$oft is baaad, etc...) nowadays Windows systems are safe enough for the use cases they're intended and do get infected because of user inexperience and IT unknowing.

So, to answer your question:

  1. Windows users are usually less competent users and get infected with ease
  2. Ubuntu users use repositories which are safe

In no way Ubuntu is stronger towards viruses, I can write one tomorrow, pack it in a .deb, and it would be insidious and destructive also because people think "linux has no viruses". Linux has no viruses until you create one, which can be done in minutes, assuming you can convince the victim that it is safe to execute it.

6
  • 5
    However, you are wrong about remote vulnerabilities being left in the past with 95, 98, and ME. Take for example the TIFF vulnerability which became known just a few days ago - simply having you look at a "specially crafted TIFF image, a remote attacker could execute arbitrary code"! Apr 27, 2011 at 0:33
  • 1
    Uhm... really severe. Thanks for pointing that out. However, if the patch is as fast as the AV, there's no need of such thing as an AV; and the ratio between users infected by vulnerabilities and the one infected by dblclick is 1 : 100
    – gd1
    Apr 27, 2011 at 6:18
  • 1
    That makes no sense. If you need to download, identify using your password and install something, then it certainly is no virus. And we've never ever seen a live virus for Linux. Sep 23, 2011 at 14:48
  • 1
    Can make it tomorrow. "Install this .deb package to add proper support for your XYZ printer/webcam/whatsoever". BOOM. If users don't develop their own skills, viruses will always find a way.
    – gd1
    Sep 23, 2011 at 15:31
  • 1
    Android (which is based on Linux) and IOS (which is based on Unix) do not get viruses since they do not allow apps to change the system software.Ubuntu allows you to do this if you give the root password.On Windows everything needs admin access so the user will just click yes
    – Suici Doga
    May 21, 2016 at 4:46
6

Speaking of all the security issues in general, but leaving out the viruses, Ubuntu has build-in security.

However, Ubuntu will not stop you from installing malware like the Windows anti-viruses try to do. For example, if someone tricks you into installing software that will spy, spam, or destroy all your data then you're out of luck.

Many more security mechanisms are available if you choose to set them up: firewall rules, anti-virus scanners, network monitoring, two-factor authentication, etc... These additional mechanisms are mostly intended for servers and you should not need to worry about them as a desktop user.

Having that said, there are many vulnerabilities and Linux systems get broken into every day all over the world. Security teams come-out with updates to fix these vulnerabilities regularly. Ubuntu has it's own security team that releases updates and advices for systems administrators.

Here is an overview about anti-Viruses and Ubuntu security.

In practice Ubuntu is much safer than Windows. In terms of exposure to malware, Ubuntu is comparable to Mac. But as @Giacomo pointed out, living in a nearly virus free world can leave Mac users naive.

The top 2 things that you can do to stay extra safe:

  1. Install software only from the official repository
  2. Keep your software up by letting the Update Manager do it's thing
3
  • 1
    You can deceive a Mac user by making him/her install some thingie that will let his/her Mac play some video or open some file type. It has been done and Mac users are even less competent than Windows ones (in most cases are totally ignorant and feel 100% safe), so get diddled in seconds. The resistance of a system towards viruses it's a user related topic. These answers are misleading. Sorry.
    – gd1
    Apr 26, 2011 at 23:54
  • @Giacomo, good point. I made some adjustments about that. Apr 27, 2011 at 0:17
  • I migrated this answer to askubuntu.com/questions/10373/… Apr 27, 2011 at 4:13
0

There do exist "viruses" for Linux. Or rather, software that runs on your Linux computer without your consent (presumably for a malicious purpose). An example is a script disguised to look like a common command which serves as an IRC spam bot (this happened to a friend of mine -- the attacker gained access via SSH by guessing a user's password due to my friend's carelessness).

With that said, to actually get a virus on Linux is difficult. What I mean by that is that a typical user will most probably only ever get a virus if he or she executes a malicious script (don't run scripts you're not familiar with) or sets weak passwords that are easily cracked via SSH or otherwise. This is because a user in Ubuntu has limited privileges.

The best way to combat viruses and attacks (like the above-mentioned SSH attack) is to implement some basic security measures like restricting SSH access to your machine to certain domains (or not having SSH run at all), choosing a good password, and being careful.

2
  • 1
    ...and using root privileges only when necessary. Apr 26, 2011 at 23:52
  • 1
    Viruses and trojan horses are completely different things. There's never been a virus for Linux. Sep 23, 2011 at 14:49

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