This question already has an answer here:

So I recently installed Ubuntu onto one of my Computers and would like to uses it to scan external drives USB and what not for viruses that can affect windows PC. Is there a possible antivirus or antimalware detection tool i can use on Ubuntu to look for Viruses/Malware that can affect windows or MacOS computers?

marked as duplicate by Panther, guiverc, Terrance, karel, Sumeet Deshmukh Aug 3 '18 at 3:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I agree with the dup here, but sometimes the freshclam updater may not work properly. If so, please check the answer here: askubuntu.com/a/553322/231142 – Terrance Aug 3 '18 at 3:00

There is a free source code of antivirus supported in Ubuntu OS you can scan internal and external hard disk from command shell. You can install directly from apt as:

sudo apt-get install clamav clamav-daemon clamav-freshclam

After the system finishes configuring the packages you should open the terminal by pressing Ctrl+Alt+T and scan your disks using this command:

sudo clamscan -r / --exclude=proc --exclude=sys |grep FOUND >> /home/$USER/clamscan_report.txt


sudo clamscan -r -i --bell /

This command above will scan the root directory and last command will give you an alarm sound it finds any infected files

If you want to scan specific disks you should first determine the disk you will scan simply you can do using:

sudo fdisk -l

This will display your disks like:

Disk /dev/sda



The disk may be sda, sdb or sdc check the disk info to verify your disks

sudo clamscan -r /dev/sda1

For more information about how you can use the clamav package you can run:

sudo clamscan --help


man clamscan

Check the clamav package configuration on path /etc/clamav/clamd.conf

There are other antivirus packages for linux OS. For instance, you can use yara signature or you can just google to find the packages. Goodluck.

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