Anti virus for Linux

Using an anti virus software in my Linux machine is something that I have not given much thought to. I know for the fact that the odds for a Linux system to get affected by a malware is pretty low. As of my understanding, the fact that Linux systems use open source software is a big bonus here. I mean, why would some one bother in sitting and writing a harmful program when everyone can see your code. Also crackers aim at a much elaborate target. I am sure they have better things to do than messing with some Linux users, which is only 2% of world computer users’ population. Still, there are executable files that may get into your system via mails or flash drives. But in Linux, nothing will happen if you simply double click an executable file (provided you don’t have Wine installed). It won’t get executed unless you give it permission for execution. This is much unlikely to happen as Linux users are supposed to know what they are doing (Myself excluded!). And of course, there are many more reasons like user privileges, simplicity of kernal, etc.

But this doesn’t mean that we don’t need an anti virus software installed. For instance, as in my case, I thought of  using an anti virus software when my windows using friends started blaming me for spreading malwares via flash drives. And also, being a music junkie, I constantly give my phone a hard time copying downloaded files to it from my computer.

After going through several forums, I decided to go for clamAV. It is an absolutely open source anti virus software. You can install the package clamav or clamtk (If you want the GUI).

sudo apt-get install clamav

Now to start scanning, run the following command in the terminal.

clamscan -r  <folder or file to be scanned>

(-r as in recursive)

Now update your virus database definitions by running the command :


You may also want to uncomment the line that includes the path to the local socket in the clamd.conf file (/etc/clamav/clamd.conf).

Now we are good to go.


6 thoughts on “Anti virus for Linux

  1. One more reason why virus program writers are not interested in Linux computers is that these computers are not ‘the same’ system everywhere. I have two computers, I run fedora 17 on one and the other one uses an pretty outdated [read unsupported] Pardus Linux. Now a particular virus cannot affect both the computers successfully.
    But that is not the case of a Windows PC – All windows 7 computers are the same and so are all windows XP computers!

    • Like I mentioned, I sometimes transfer the downloaded mp3s and docs to my mobile phone. I had to format my memory card a couple of times as the files I transferred were malwares. So it’s a good practice to do a little sanity check on such files, right? And this applies when data is transferred via flash drives to windows supported machines, as well. Not for my distro’s sake.

  2. The idea that a linux based machine doesnt need any antivirus protection is a little bit outdated considering how easy it is to connect all of our devices together. Just because one system doesnt take as much damage doesnt mean it cant pass it on to a more vulnerable your phone or tablet. You need to protect all your devices with a reliable antivirus program.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s