Linux Mint – Installing and configuring ClamAV

How to build a Docker Compose YAML files

One aspect that many Linux users will often brag about is how Linux is virus proof and unaffected by malware that plagues many Windows systems. The truth of the matter is that no platform is truly virus proof, as a platform’s ability to suffer a virus outbreak is dependent on the skills of the writers of malicious software to produce strong code.

However, at the time of writing this tutorial, there are a few Linux viruses that exist out there. This doesn’t necessarily mean that Linux viruses can’t exist or won’t ever exist; it’s just not an issue that Linux users are forced to deal with, at least at the time of writing this tutorial. Could this change tomorrow, next month, or next year? It’s impossible to know in advance.

As there aren’t many (if any) Linux viruses at the moment, then why include a section about installing an antivirus solution in a Linux tutorial? The reason is because even though Linux has few viruses right now, it’s still capable of spreading a virus to a Windows system. Think about it this way—if a friend of yours sends you a file that’s infected with a virus and you open it on your Linux computer, you may not notice anything strange about the file at all. However, if you didn’t verify the file before passing it along to another friend, they may catch a virus. This type of issue may be more common in a situation where you use a Linux computer as a file server, and the users of various platforms save files onto it. The Linux server itself doesn’t care what you store on its disk. However, it’s possible that the users of other platforms may spread viruses amongst each other without you ever knowing.

Although Mint doesn’t include an antivirus solution by default, installing one is easy and free. ClamAV
is the tool of choice for Linux users and is even used by some system administrators to remove viruses from Windows machines. To install ClamAV on your machine, enter the following command:

sudo apt-get install clamav

Once it is installed, it’s a good idea to update ClamAV’s antivirus definitions with the following command:

sudo freshclam

Once ClamAV is installed and updated, you’re ready to use it. To scan a directory for malware, use the clamscan command with the -r flag and the path of the directory you wish to scan, as shown in the following command:

sudo clamscan -r /home/jdoe/my_folder

Once the scan is complete, you’ll see a status window displaying the results of the scan, as shown in the following screenshot:

Although ClamAV is a scanner that runs in the Linux shell, it is also possible to install a GUI frontend known as ClamTk for the application, if you wish. To do so, execute the following command:

sudo apt-get install clamtk

Once it is installed, ClamTk will be available in your Applications menu. ClamTk is more akin to commercial antivirus packages, providing you with a menu-driven interface to select the style of scan, configure updates, and view items in quarantine. The following screenshot shows the frontend of ClamTk:


Unlike most virus-scanning applications, ClamAV is targeted at on-demand scanning. When you install it, it will not watch your traffic to detect the presence of malicious software in real time. ClamAV’s main purpose is to catch Windows viruses and not exactly looking for security threats to your Linux system itself.

Comments are closed.