ClamAV Anti-Virus and ClamTK on Ubuntu

In general, you don’t need an anti-virus software for Linux operating system such as Ubuntu. But for some reasons you might want a virus scanner on your Linux PC. One of the most popular ones is the ClamAV anti-virus. ClamAV Anti-virus is an open source antivirus software engine for detecting trojans, viruses, malware & other malicious threats.

Official project website: https://www.clamav.net/

Installing ClamAV Anti-Virus

Here is how you can install it on your Ubuntu PC:

  1. Open Terminal
  2. Enter command:
    sudo apt-get install clamav
  3. Enter your administrator password to continue installation

Using ClamAV from Terminal

By default, updating the virus definition is handled by daemon at a regular interval. But if you need to update the virus definition manually, we need to stop the daemon first and run the update command:
sudo /etc/init.d/clamav-freshclam stop
sudo freshclam
sudo /etc/init.d/clamav-freshclam start

To scan for viruses, the command syntax: clamscan OPTIONS File/Folder

If necessary, start the scan with root permissions: sudo clamscan OPTIONS File/Folder

Below is the examples you can use with ClamAV antivirus in Terminal:

  • The scan all files on your Ubuntu PC
    clamscan -r /
  • To scan all files, but only display infected files and ring a bell when found:
    clamscan -r --bell -i /
  • To scan files in the all users home directories:
    clamscan -r /home
  • To scan files in the USER home directory and move infected files to another folder:
    clamscan -r --move=/home/USER/VIRUS /home/USER
  • To scan files in the USER home directory and immediately remove infected files (WARNINGS: files are deleted permanently)
    clamscan -r --remove /home/USER
  • To see more clamscan options:
    clamscan --help

Installing ClamTK

clamtk

ClamTK is a graphical front-end for ClamAV. It is designed to be an easy-to-use, lightweight and on-demand antivirus scanner for Linux systems.

Official project website: https://dave-theunsub.github.io/clamtk/

How to install it:

  1. Open Terminal
  2. Enter command:
    sudo apt-get install clamtk
  3. Enter your administrator password to continue installation

Leave a Reply

Your email address will not be published. Required fields are marked *