Scanning for malware by using ClamAV Scan


How can I install ClamAV on a Linux server?

ClamAV is a popular open-source antivirus engine available on a multitude of platforms including the majority of Linux distributions. Install and scan it on your Linux server with the following command.

Step 1: Installaion

For CentOS / Redhat

# yum -y install epel-release
# yum install clamav clamd

For Ubuntu / Debian

# apt-get install clamav clamav-daemon

Step 2: Update database

# systemctl stop clamav-freshclam

The below command will install the signature database in your machine.

# freshclam

Step 3: Run a manual scan

Run the following command to scan your server

For CentOS / RedHat

# clamdscan -i -v -r /

For Ubuntu / Debian

# clamscan -i -v -r /

The above command will list the infected files.