How to scan for viruses on Linux

1 min read

  1. Install clamav
# Debian/Ubuntu
sudo apt install clamav
# Arch
sudo pacman -S clamav
# RHEL/CentOS/Fedora
sudo dnf install clamav
  1. Update the virus definitions
sudo freshclam
  1. Scan
# a file
clamscan <file>
# a directory
clamscan -r <directory>