Installation
- Navigate to the directory:
cd /var/cache/apt/archives/ - Download the .deb package from the official website.
- Install the package:
sudo apt install ./clamav-0.105.1.linux.x86_64.deb - Change the owner of the directory:
chown 492:491 /usr/local/share/clamav/ - Copy the configuration files:
cp /usr/local/etc/freshclam.conf.sample /usr/local/etc/freshclam.confcp /usr/local/etc/clamd.conf.sample /usr/local/etc/clamd.conf
- Remove the line
#Examplefrom both files.
Launch
After starting clamd, wait for it to load.
- Scan the entire disk:
clamdscan / - Remove infected files:
clamscan --recursive --infected --remove / - Move infected files:
clamscan --recursive --infected --move /home/user/temp - Exclude system directories:
clamscan --recursive --infected --move /home/user/temp --exclude-dir=^/sys --exclude-dir=^/dev --exclude-dir=^/proc
Update
- Stop the process:
sudo /etc/init.d/clamav-freshclam stop - Start the update:
sudo freshclam - Restart the process:
sudo /etc/init.d/clamav-freshclam start
Proxy settings can be specified in the configuration file freshclam.conf:
Errors
- Error:
Permission denied— use:cd /var/cache/apt/archives/ wget .deb from here https://www.clamav.net/downloads sudo apt install ./clamav-0.105.1.linux.x86_64.deb - Error:
Can't open/parse the config file /usr/local/etc/freshclam.conf— check the configuration files: cp /usr/local/etc/freshclam.conf.sample /usr/local/etc/freshclam.confcp /usr/local/etc/clamd.conf.sample /usr/local/etc/clamd.conf- Remove the line
#Examplein each file. - Error:
Blocked by CDN— access is blocked from your country.