Wednesday, January 19, 2022

Installing and Updating ClamAV & ClamTK

Virus are becoming more common on Linux Systems.  Why take a chance when there is a nice free antivirus option with little overhead available for Linux, ClamAV.  With it you can control manual or automatic scanning, which directories or files are scanned, signature updates and more.  With the addition of ClamTK you also get a graphical interface. I use both to manually scan directories.

This article will tell you how to install and update ClamAV (Antivirus Command Line App) and ClamTK (Graphical Front End).

Open a Terminal Window and copy & paste the commands in RED into the Terminal one at a time in the order they appear.  Press the ENTER key after each command to execute it.

 

Section One:
How to install ClamAV.

1.  Check for system updates

sudo apt-get update

2. Install all system updates 

sudo apt-get upgrade

3. Install ClamAV and run it as a Process 

sudo apt-get install clamav clamav-daemon -y


Section Two:
Update the ClamAV Signature Database

1. Stop the ClamAV Process

sudo systemctl stop clamav-freshclam

2. Update the Signature Database   

sudo freshclam

3.  Restart the ClamAV Process

sudo systemctl start clamav-freshclam

NOTE: Section Two is how you manually update the ClamAV Signature Database but the graphical interface, ClamTk, will give you an option to automate the Signature Database updates.


If you just want to use ClamAV from the Terminal (Command Line) then you can stop here but if you want a nice Desktop Front End that will give you a graphical interface then proceed to Section Three and install ClamTK


Section Three:
Download the latest version of ClamTK for your distro 

1.  In a web browser go to this site and download the ClamTK installer for your distro (.deb was mine for Ubuntu) 

https://gitlab.com/dave_m/clamtk/-/wikis/Downloads

2.  Once downloaded run the following command in Terminal (command line).  Replace the CHANGE_ME part with the name of the file you downloaded.  (Mine was called clamtk_6.14-1_all.deb so my command was "sudo dpkg -i Downloads/clamtk_6.14-1_all.deb"

sudo dpkg -i Downloads/CHANGE_ME

3.  After ClamTK installs you can run it from the terminal with the command (clamtk) or you use your desktop to start the app by clicking on it.

clamtk

NOTE: From time to time ClamTK will tell you that "Updates Are Available" and only provide you with a button that says BACK that does nothing when clicked. This just means that ClamTK (the Graphical Front End) has been updated.  This isn't related to ClamAV or it's Signature Database  To install the update just repeat all 3 steps in Section Three.  The "Updates Are Available" warning often confused me into thinking that ClamAV needed updated or it's Signature Database needed updated but I have those options set to Automatic Updates.  So when you see this it's just the ClamTK advising that they have updated their graphic front end. Your ClamAV and it's Signature Database are fine and have been doing their automatic updates.    


That's it you're done.  You now have a nice antivirus program for your Linux machine and a little piece of mine.