How-To Guides and Blog

How to install ClamAV and ClamTK

NBH Support
No Comments

ClamAV is one of the best antiviruses out there. It’s totally free, open source, and most importantly it’s cross-platform software which means you can run it on any platform you want.

Whether you are running windows,linux, mac or any other OS setting up clamav is easy.

Installing ClamAV

Install ClamAV on Ubuntu/Debian

sudo apt-get install clamav

Install ClamAv on CentOS

sudo yum install -y epel-release
sudo yum install clamav

Install ClamAV on Arch

sudo pacman -S clamav

Update ClamAV database

sudo freshclam

Configuring Clamav

ClamAV will check for updates every two hours by default, to change that you need to edit freshclam.conf file which is located here

/etc/clamav/freshclam.conf
sudo nano /etc/clamav/freshclam.conf

then look for

# Number of database checks per day.
# Default: 12 (every two hours)
#Checks 24

now simply uncomment "#Checks 24" if you want clamav to check for updates every 24h, and save the file by pressing ctrl+x.

It should look like this

# Number of database checks per day.
# Default: 12 (every two hours)
Checks 1

Installing ClamTK (Gui for ClamAV)

If you are an average computer user and not familiar with linux or just lazy to type commands you can install clamtk(graphical user interface) for clamav.

clamtk

Install ClamTK on CentOS

yum install clamtk

Install ClamTK on Ubuntu

sudo apt-get install clamtk

Install ClamTK on Arch

sudo pacman -S clamtk

Scanning for viruses with ClamAV (Console)

To check all files on your computer

clamscan -r /

To scan only a single file

clamscan /the/location/of/file

To scan all files on a folder

clamscan /the/location/of/folder

example: clamscan Desktop/foldername

To scan everything on your system and remove any infected file

clamscan -r --remove=yes / 

Be careful with this command as it will delete anything that is recognized as virus when it may not be an infected file but a false positive warning. To avoid this happen, do not remove infected files while scanning, do a scan first, locate the infected file and double check.

clamscan -r -i / &

For more commands run :

clamscan --help

Scanning for viruses with ClamTK

Double click and run ClamTK, click to "scan a file" for scanning a sinlge file, "scan a directory" for scanning a folder, or click to analysis to check the file’s reputation.

That’s it!