freshclam
Update ClamAV virus definition database
TLDR
Update virus definitions
SYNOPSIS
freshclam [options]
PARAMETERS
-h, --help
Show help information and exit.
-V, --version
Print version number and exit.
-v, --verbose
Be verbose.
-d, --daemon
Run in daemon mode.
-p
Listen on port
-u
Run as user
-g
Run as group
-c
Read configuration from
--stdout
Log to stdout (implies -d).
--log=
Log to
--pid=
Save pid to
-q, --quiet
Don't print any output.
-n, --no-warnings
Disable all warnings.
--show-progress
Show download progress.
--checks=
Number of database checks per session.
--daemon-notify
Notify clamd when database is updated.
--foreground
Run in foreground (don't daemonize).
--dns
Use DNS TXT records for database updates.
--proxy-server=
Set proxy server.
--proxy-port=
Set proxy port.
--proxy-user=
Set proxy username.
--proxy-password=
Set proxy password.
--debug
Enable debug messages.
--local-address=
Bind to a specific local address.
--run-once
Update databases once and exit.
--list-mirrors
List mirrors
--force
Force database reload even if up to date.
DESCRIPTION
freshclam is a command-line tool used to download and update the ClamAV virus database. ClamAV is an open-source antivirus engine used for detecting trojans, viruses, malware & other malicious threats.
Keeping the virus database up-to-date is crucial for effective threat detection. freshclam automatically retrieves the latest virus definitions from the ClamAV servers and updates the local database files. It can be run manually or scheduled as a cron job or systemd timer. Proper configuration of freshclam is essential for ensuring that ClamAV has the most recent information to identify and protect against emerging threats. Configuration includes setting update intervals, proxy settings if necessary, and database mirror selection for optimal download speeds and reliability. The program relies on the `clamd` service which is the antivirus daemon. freshclam provides several options to customize the update process, such as specifying the database download directory, setting connection timeouts, and configuring DNS usage. It is a fundamental component of any ClamAV installation, maintaining the integrity and effectiveness of the antivirus system.
CAVEATS
freshclam requires write access to the database directory, typically /var/lib/clamav. Running freshclam as a non-root user may require appropriate permissions. Ensure proper network connectivity to the ClamAV update servers. DNS resolution issues can prevent database updates. Be careful when using proxy settings as incorrect configuration can also cause update failures.
Avoid running multiple instances of freshclam simultaneously.
CONFIGURATION FILE
The configuration file for freshclam is typically located at /etc/clamav/freshclam.conf. This file allows you to customize the update process, including setting the update interval, specifying proxy settings, and choosing database mirrors. It is crucial to configure freshclam.conf properly for optimal performance and security.
DAEMON MODE
Running freshclam in daemon mode allows it to periodically check for updates in the background. This is essential for keeping your ClamAV database up-to-date automatically. The `--daemon` option starts freshclam as a daemon, and you can configure the update interval in the configuration file.
MIRROR SELECTION
Using a mirror close to your location can significantly improve download speeds. The configuration file allows you to specify a list of mirrors, and freshclam will automatically choose the best one. You can use the `--list-mirrors` command to see a list of available mirrors.
HISTORY
freshclam is a core component of the ClamAV project, which was started by Tomasz Kojm in 2002. Initially designed for Unix-like systems, ClamAV and freshclam gained popularity for its open-source nature and effectiveness in detecting viruses. Freshclam's role has always been to automate the retrieval of virus definitions, ensuring ClamAV remains current. Over the years, freshclam has been improved to handle various network conditions, proxy setups, and database mirror configurations. Continuous development focuses on optimizing update speed, reliability, and security. It is now used in a wide range of environments, from individual desktops to enterprise-level servers.
SEE ALSO
clamd(8), clamscan(1)