How to Install ClamAV on Ubuntu 20.04

Install ClamAV on Ubuntu 20.04

In this article, we will have explained the necessary steps to install and configure ClamAV on Ubuntu 20.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

ClamAV is an open-source Antivirus tool available for Linux distributions. It integrates Mail servers to scan attachments received. Other functions also include web scanning. ClamAV includes a multi-threaded scanner daemon, command-line utilities for on-demand file scanning and automatic signature updates. One of its main uses is on mail servers as a server-side email virus scanner.

Install ClamAV on Ubuntu 20.04

Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.

Step 2. Install ClamAV on Ubuntu systems.

The default Ubuntu 20.04 repositories contain the latest stable release version of ClamAV. You can simply install it using the following command:

Once, the packages are successfully installed, run the following command to check whether it has been installed or not:

Step 3. Update the ClamAV Database.

First, stop the clamav-freshclam service (if it is running) and execute freshclam, the virus database update tool:

Then, update the virus database:

Next, start the clamav-freshclam service and enable it to start at system reboot with the following command:

Step 4. Use Clamscan to Scan.

The basic syntax of Clamscan is shown below:

You can print all available option with clamscan using the following command:

That’s all you need to do to installing ClamAV on Ubuntu 20.04 LTS Focal Fossa. I hope you find this quick tip helpful. For further reading on ClamAV, please refer to their official knowledge base. If you have questions or suggestions, feel free to leave a comment below.