Install ClamAV on Debian : Easy Steps

Install ClamAV on Debian
ClamAV is an open-source antivirus engine designed for detecting malicious threats. This article will help you to install ClamAV on the Debian server.

ClamAV is an open-source (GPL) antivirus engine designed for detecting Trojans, viruses, malware, and other malicious threats. It is the de-facto standard for mail gateway scanning. It provides a high-performance multi-threaded scanning daemon, command-line utilities for on-demand file scanning, and an intelligent tool for automatic signature updates.

Follow the below steps to install ClamAV on Debian

( Not Debian? Here are the steps to install ClamAV on Ubuntu and CentOS )

Install ClamAV using apt-get. ( If the default repo don’t have it, you may have to add some additional repos )

apt-get install clamav clamav-daemon

 

Run the below command to update the virus definitions.

freshclam

 

Start the ClamAV.

/etc/init.d/clamav-daemon start

 

Now open a new screen session and scan the whole system by running the below command.

clamscan -ril /opt/clamscan.log /

 

( Please note that this will take hours to complete depending on the disk usage in your system, which is why we are running it in a screen session. )

You can detach and enter to screen session any time and check the status frequently.

You will get the scan result at the end, and the command will only list the infected files. You can find the files in “/opt/clamscan.log”. ( grep the word FOUND ) You may either manually remove or correct these files or else run the below command that will permanently remove all infected files in your system ( Make sure to run in a screen session )

clamscan -ril /opt/clamscan.log --remove /

 

That’s it!! You have removed the virus and malicious codes from your system.

So that’s how you install ClamAV on Debian.

Share this post

Services to Explore

Stay up to date!

Stay up to date with the Web Hosting, Cloud and Server Management Industry News and Tutorials!

We will send you only the relevant emails, and we respect your privacy. Please review our privacy policy for more info.

Linux Management Services

Focus on your business, and let us take care of your Linux Servers!
From what you are reading, it seems you are interested in Linux and related technologies. If you have a moment to spare, please take a look at our Linux Management Services plan, which might interest you even more!
Linux Management Plan

Value-Added Services

We have services that can help you run a successful business. With us, you don't have to worry about these areas because our experts will take care of it for you.

Introducing - WPHealers!

Complete WordPress Management, 24x7 Support & White Label Agency Plans!

WordPress migration service, security, white-label reseller services and lot more! Grab the introductory deals now!

WPHealers

ServerHealers uses cookies.