How to install ClamAV¶
Installing ClamAV on Ubuntu:
Step 1: Update Package List
sudo apt update
Step 2: Install ClamAV
sudo apt install clamav
Step 3: Install ClamAV Daemon (freshclam)
sudo apt install clamav-daemon
Step 4: Start ClamAV Daemon (freshclam)
sudo systemctl start clamav-freshclam sudo systemctl enable clamav-freshclam
Step 5: Start ClamAV Service (clamd)
sudo systemctl start clamav-daemon sudo systemctl enable clamav-daemon
1. Check if freshclam is already running:
ps aux | grep freshclam
If a freshclam process is already running, you'll see an output similar to this. Ensure that freshclam is running as expected and updating the ClamAV database regularly.
$ ps aux | grep freshclam
clamav 12345 3.0 0.0 134420 18216 ? Ss 09:30 0:03 /usr/bin/freshclam -d --foreground=true
user 54321 0.0 0.0 22856 1100 pts/0 S+ 10:15 0:00 grep --color=auto freshclam
If there is no freshclam process running, you can proceed with updating the ClamAV database:
sudo freshclam
Reconfigure clamav-freshclam:
Run the following command to reconfigure clamav-freshclam, which will create a new freshclam.conf file in the /etc/clamav/ folder:
sudo dpkg-reconfigure clamav-freshclam
Updated by Gareth Eaton over 1 year ago · 2 revisions