Install ClamAV on Debian 10 / Debian 9/ Ubuntu 18.04

Windows Articles

How to get the Nextcloud desktop client on Linux?

Hello friends. We already know how to install a Nextcloud server but now the client is missing. So in this post, you...

How to Backup your call and SMS history in Android

Many times we find ourselves in the situation of having to change our phone, for different reasons, and one of the questions...

Install and configure Apache Guacamole on Debian 10

Hello, friends in this post, you will learn how to install and configure Apache Guacamole in Debian 10. It will be a...

Ubuntu 20.10 available

The new version of Ubuntu is now available, under the code name "groovy gorilla". Ubuntu 20.10 focuses on improving and refining the...

Monitoring Ubuntu 20.04 with Stacer

Normally if we use Linux on a production server, it is important to monitor it. On the other hand, in everyday use, many users...
angeloma
angeloma
Senior Writer and partner

Are there viruses in Linux? The answer is yes, the point is that Linux is a very secure system that minimizes risks. However, when you use a Linux server on a network where there are many clients using Windows, it is useful to install ClamAV to remove those viruses.

ClamAV is an open source antivirus engine for detecting Trojans, viruses, malware and other malicious threats. Of course, it is available for the most common Linux distributions including Debian, Ubuntu, and CentOS.

In case you didn’t know, ClamAV is the standard for mail gateway scanning software. Of course, we are talking about the open source area. This tells you how powerful and reliable it is. All this, with a high performance, which assures you that you will not have an unnecessary expense of computer resource.

Let’s install ClamAV on Debian 10 / Debian 9.

1. Install ClamAV

Installing ClamAV is really simple because it is available in the main repositories of most Linux distributions.

In case you are using Fedora:

:~$ sudo dnf install clamav

For CentOS 7:

:~$ sudo yum install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd

To install ClamAV in OpenSuse, just run:

:~$ sudo zypper install clamav

And for Debian and Ubuntu:

:~$ su
:~# apt update && sudo apt upgrade
:~# apt-get install clamav clamav-daemon

1.- Upgrading the system
1.- Upgrading the system

2.- Install ClamAV on Debian
2.- Install ClamAV on Debian

The installation is done.

2. Using ClamAV

Like any antivirus, its effectiveness depends on how often you update your virus definition. So the first step is to update ClamAV.

:~# freshclam

3.- Refreshing the clamav database
3.- Refreshing the ClamAV database

Next, scan a directory.

:~# clamscan -r /home/angelo

4.- Scanning a directory
4.- Scanning a directory

The -r option is for recursively search.

In this case, ClamAV doesn’t detect any viruses because I literally don’t have any. It is practically a clean Debian installation.

I got an infected file, let’s see how ClamAV treats it.

5.- An infected file found
5.- An infected file found

As you can see, ClamAV found the infected file. Now, remove it.

:~# clamscan --infected --remove --recursive /home/angelo

6.- Removing an infected file
6.- Removing an infected file

The above process is very easy but it is not a good idea if it has to be done frequently. So, initialize the ClamAV daemon to constantly look for threats.

:~# systemctl start clamav-daemon
:~# systemctl start clamav-freshclam

Finally, you can consult the rest of ClamAV usage using its help. It is important to know other options of use and configuration.

:~# clamav --help

8.- Other clamav options
7.- Others ClamAV options

And that’s it for now.

Conclusion

It is important to know how to use ClamAV on Linux because security is an issue that should not be taken lightly. Its installation and use are quite simple but because it is open source it guarantees a correct and frequently updated database.

Please share this post with your friends.

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to get the Nextcloud desktop client on Linux?

Hello friends. We already know how to install a Nextcloud server but now the client is missing. So in this post, you...

How to Backup your call and SMS history in Android

Many times we find ourselves in the situation of having to change our phone, for different reasons, and one of the questions...

Install and configure Apache Guacamole on Debian 10

Hello, friends in this post, you will learn how to install and configure Apache Guacamole in Debian 10. It will be a...

Ubuntu 20.10 available

The new version of Ubuntu is now available, under the code name "groovy gorilla". Ubuntu 20.10 focuses on improving and refining the...

Monitoring Ubuntu 20.04 with Stacer

Normally if we use Linux on a production server, it is important to monitor it. On the other hand, in everyday use, many users...
x