You can run ClamAV on Windows by installing the official binary package and using either the command-line interface for specific scans or a third-party GUI for a visual experience. The setup process takes about 10 to 15 minutes, depending on your internet speed for downloading the virus definitions.

Choose your method based on your technical comfort level: use the Command Line (CLI) if you need automation, low resource usage, or specific directory targeting; use a Graphical User Interface (GUI) wrapper if you prefer buttons and menus over typing commands. Because ClamAV is natively a command-line tool, the GUI options are separate community-developed projects that act as a skin for the core engine.

How to Install ClamAV on Windows

The core engine must be installed before any scanning can occur. Labels and folder names may differ slightly depending on the version you download.

  1. Download the ClamAV Windows installer from the official website.
  2. Run the .msi installer and follow the prompts to complete the installation, typically leaving the default installation path as C:\Program Files\ClamAV.
  3. Open the installation folder and locate the configuration files.
  4. Open the file named freshclam.conf with a text editor like Notepad.
  5. Find the line that says "Example" and delete that line or add a # at the beginning to comment it out. This tells the program that the configuration is no longer just a sample.
  6. Save the file and close the editor.
  7. Open the file named clamd.conf and repeat the process of removing or commenting out the "Example" line.
  8. Save the file and close the editor.

How to Update Virus Definitions

ClamAV will not detect new threats unless you update the signature database. This process is handled by a tool called Freshclam.

  1. Open the Command Prompt as an Administrator by right-clicking the Start button and selecting Command Prompt (Admin) or Windows Terminal (Admin).
  2. Navigate to the directory where ClamAV is installed by typing cd "C:\Program Files\ClamAV" and pressing Enter.
  3. Type freshclam and press Enter.
  4. Wait for the process to finish; it will download several megabytes of data. You will see a message stating that the database is now up to date.

If you receive a connection error, check your firewall settings to ensure the application has permission to access the internet on port 80 or 443. You should run this command once per day to maintain protection.

How to Scan Files and Folders

The primary tool for scanning is called clamscan. This tool does not run in the background by default; it only scans when you tell it to.

Scanning a Single Folder

  1. Open the Command Prompt as an Administrator.
  2. Navigate to the ClamAV folder using the cd command.
  3. Type clamscan "C:\Path\To\Your\Folder" and press Enter. Replace the path with the actual folder you want to check.
  4. Review the output in the console. The scan will list every file it checks.

Scanning the Entire Hard Drive

  1. Open the Command Prompt as an Administrator.
  2. Navigate to the ClamAV folder.
  3. Type clamscan -r C:\ and press Enter. The -r flag tells the program to scan recursively, meaning it will look inside every subfolder on the drive.
  4. Allow the scan to run. Depending on the size of your drive and the number of files, this can take anywhere from 30 minutes to several hours.

Scanning and Removing Threats

  1. Open the Command Prompt as an Administrator.
  2. Navigate to the ClamAV folder.
  3. Type clamscan -r --remove "C:\Path\To\Folder" and press Enter.
  4. Wait for the scan to complete. Any file identified as a virus will be deleted immediately.

Safety Note: Use the --remove flag with caution. If ClamAV flags a critical system file as a "false positive" (a safe file mistaken for a virus), the program will delete it, which could make your Windows installation unstable or prevent it from booting. It is safer to use the --move flag to send suspicious files to a quarantine folder instead.

How to Use a GUI for ClamAV

If you find the command line tedious, you can install a GUI wrapper. These tools provide a window with a "Scan" button and a progress bar.

  1. Download a compatible ClamAV GUI wrapper from a trusted source.
  2. Install the GUI application.
  3. Open the GUI settings and point the application to the location of the clamscan.exe and freshclam.exe files in your C:\Program Files\ClamAV directory.
  4. Click the "Update" button within the interface to run Freshclam.
  5. Select the drive or folder you wish to scan from the file browser.
  6. Click "Scan" and wait for the results to appear in the list.

Scan Performance and Resource Usage

ClamAV is designed to be lightweight, but full system scans can consume significant CPU and RAM. To manage this, you can use the clamdscan tool instead of clamscan. The clamdscan tool uses a background daemon (a service) that loads the virus signatures into memory once, making subsequent scans much faster.

To use the daemon, you must first start the ClamAV service in the Windows Services manager (type services.msc in the Start menu, find ClamAV, right-click it, and select Start). Once the service is running, you can run clamdscan from the command line. This reduces the startup time for each scan from about 20 seconds to nearly instantaneous.

Scanning a 10GB Folder

Consider a scenario where you have a 10GB folder containing about 50,000 small files (such as a backup of a website or a set of documents). When running clamscan -r on this folder:

  • Initialization: The program takes about 15 to 30 seconds to load the signature database into RAM.
  • Processing Speed: Depending on your SSD speed and CPU, ClamAV typically scans at a rate of 1,000 to 5,000 files per minute.
  • Total Time: For 50,000 files, the scan will likely take between 10 and 50 minutes.
  • Memory Usage: You will see RAM usage spike by about 100MB to 200MB while the database is active.

How to Handle Scan Results

When a scan finishes, ClamAV provides a summary. This summary includes the number of files scanned, the number of infected files found, and the total time elapsed.

If a file is flagged, the output will show the file path and the name of the virus detected. If you are unsure if a file is actually malicious, you can upload the specific file to a multi-engine online scanner to verify the result. This is the best way to avoid deleting important files that have been incorrectly flagged.

To save these results to a file for later review instead of reading them in the console, use the -l flag. For example, clamscan -r C:\Users\Documents -l scan_results.txt will create a text file containing the full report. This is useful for auditing large systems where the command prompt window might scroll past the results too quickly.

If you find that ClamAV is flagging too many safe files, you can exclude specific directories using the --exclude flag. For example, clamscan -r C:\ --exclude=C:\Windows will tell the program to skip the Windows system folder entirely, which speeds up the scan and prevents the accidental deletion of OS files.