Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How can I update Clam Antivirus via the terminal?

I already have installed clamav, but I want to know how can I update the virus database.

share|improve this question
    
AFAIK, there is no need to use this command in Ubuntu, the clam virus database is automatically updated. If you execute it you'll get an error such as ERROR: /var/log/clamav/freshclam.log is locked by another process –  medigeek Oct 8 '13 at 22:24

3 Answers 3

To update the ClamAV database do sudo freshclam

share|improve this answer
    
Will this work for Zorin OS7 Ultimate users? Thanks –  DonM Apr 11 at 15:33

Run sudo apt-get install clamav.

Once ClamAv is installed you can set up a script for right click virus scanning in Nautilus.

To update the virus database, open a terminal and enter the following command:

sudo freshclam

To automate this update you can set up a cron job. I'll show how to update the virus database every day at 8:57 PM. First, open the terminal and su to root.

sudo su

Now you need to modify the crontab for the root user.

crontab -e

This opens the root crontab file in the nano text editor. Add the following line

57 08 * * * sudo freshclam

to the crontab and then hit Ctrl+X to exit. Answer yes when prompted to save the file.

share|improve this answer

The right way to go is to edit freshclam.conf and add the number of dayly Checks you want

vim /etc/clamav/freshclam.conf
Checks 24
##Notify clamd to reload it self
NotifyClamd /etc/clamav/clamd.conf
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.