Scan your Linux machine for viruses with ClamTk

What do you mean - "scan your Linux machine for viruses"? Linux is immune to viruses right? Well...mostly. Even though a proof of concept virus has been discussed, and nothing has actually made it into the wild...you still have email on your system. Some of that email could easily make its way (by way of forward for example) to another, non-Linux, machine. Because of that alone you should employ a virus scanner on ALL of your machines (Linux, Mac, Windows...)

For Linux, ClamAV is one of the best virus scanners. And not only is ClamAV one of the best, it also has a great front-end for users who prefer to not have to deal with command line tools. That front-end? ClamTk. In this article you will learn how to install and use ClamTk to keep your Linux box virus free. Your friends and co-workers might thank you in the end.

Installation

First and foremost, ClamAV is required (You can read more about ClamAV in my article "Add antivirus to Postfix with ClamAV") so you will need to have that installed and updated (might even be wise to make sure ClamAV is the latest version and run the freshclam command to update your virus signatures before you begin the installation of ClamTk).

If you're unsure how to update ClamAV you can do so fairly easily. Let me show you how to update ClamAV in Debian. Follow these steps:

  1. Open up a terminal window.
  2. Gain super-user access (either with the su command or using sudo - depending upon how you use/administer your system).
  3. Open up the /etc/apt/sources.list file in your favorite editor.
  4. Add the line deb http://volatile.debian.org/debian-volatile etch/volatile main contrib non-free to the bottom of the file.
  5. Save and close the sources.list file.
  6. Issue the command apt-get update.
  7. Issue the command apt-get install clamav clamav-base clam-freshclam.

Your ClamAV should be up to date. Now let's install ClamTk.

Read also:  Setting up a Windows / Linux Mint Dual Boot using MBR

From the same terminal window, issue the command apt-get install clamtk which will install the latest version of ClamTk. You are ready to scan.

Using ClamTk

Figure 1

To open the ClamTk window (see Figure 1) you can either click Applications > System Tools > Virus Scanner or from either the run dialog (<Alt>F2) or a terminal window issue the command clamtk. One of the first things you should do is click Help > Update Signatures which effectively runs the freshclam command.

You can take care of scanning a few different ways:

  • Click Home button (the Home icon) to do a quick scan of your ~/ directory.
  • Click the Binoculars icon to scan a single file.
  • Click the magnifying glass to scan a directory.
  • Click Scan > Recursive Scan to scan a parent directory and it's children.
  • Click Scan > Home (thorough) to do a more thorough scan of your home directory.

Since I use Claws Mail, I would want to do a recursive scan on the ~/Mail directory. I will warn you, a thorough, recursive scan can be somewhat resource intensive. So if you need to do this type of scan, you might want to do it when you're not busy, otherwise your machine might become a bit less responsive.

Final thoughts

I am happy to say that I have yet to come across an infected file on any of my Linux machines. Does that mean I will stop scanning? No. I get a ton of email, and I prefer to do my part to ensure that no email that might leave my inbox (especially forwards) contains a virus. You should do this as well, even when Linux is your main operating system.


Advertisement
Please share this article

Facebooktwittergoogle_plusredditlinkedinmail


Filed under:


Responses to Scan your Linux machine for viruses with ClamTk

  1. MintExpert January 21, 2010 at 4:20 am #

    Infecting their friends computers is something that not alot of 'average' PC users think about. We're all so worried about protecting our own, that we never even consider the people we send emails and files too.

  2. willdo January 21, 2010 at 4:18 pm #

    Martin,
    What is the best virus scanner for windows xp and windows 7?

  3. Antony January 30, 2010 at 8:36 am #

    Does this ClamAV or its developers have any connections with ClamWin?

  4. Christo April 2, 2010 at 2:48 pm #

    Hi,
    Maybe it is true that Linux is immuned against viruses but much more true is that no linux user could afford hosting viruses, no matter whether or not it is a server, a working desktop or home computer.
    Hosting and letting viruses to be distributed on your computer is non-professional and non-ethical from any point of view.

  5. Christopher July 14, 2010 at 7:59 pm #

    I have two flavours of Ubuntu on my laptop and use one to scan the other with ClamTK. I haven't found any viruses after three years, but it's still prudent to assume that it will happen someday.

Leave a Reply