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.

I installed ClamAV install clamav via Terminal (Ctrl+Alt+T) with:

sudo apt-get install clamav

but how can I scan for viruses?

share|improve this question

1 Answer 1

up vote 35 down vote accepted

Terminal

At first you have to update the virus definitions with:

sudo freshclam

Then you can scan for viruses.

 clamscan OPTIONS File/Folder 

Examples:

  • To check all files on the computer, displaying the name of each file:

    clamscan -r /
    
  • To check all files on the computer, but only display infected files and ring a bell when found:

    clamscan -r --bell -i /
    
  • To check files in the all users home directories:

    clamscan -r /home
    
  • To check files in the USER home directory and move infected files to another folder:

    clamscan -r --move=/home/USER/VIRUS /home/USER
    
  • To check files in the USER home directory and remove infected files (WARNING: Files are gone.):

    clamscan -r --remove /home/USER
    
  • To see more options:

    clamscan --help
    

See:

Graphical User Interface: ClamTk install clamtk

ClamTk is a frontend for ClamAV. You can install it via Terminal with:

sudo apt-get install clamtk

There is also a PPA with the latest version:

sudo apt-add-repository ppa:landronimirc/clamtk
sudo apt-get update && sudo apt-get install clamtk

clamtk screenshot

Scan Menu: Here you can choose a file, folder or a device for scanning

clamtk scan menu screenshot

View Menu:

clamtk view menu screenshot

Quarantine Menu:

clamtk quarantine menu screenshot

Advanced Menu:

clamtk advanced menu screenshot

Help Menu: Here you can check for updates.

clamtk help menu screenshot

See:

share|improve this answer
    
if there any way to check a file (or a folder) by running clamav via the terminal and get the result from it (from the terminal or piped into a file) whether there are or not viruses? –  Alex Dec 21 '13 at 11:57
1  
Doesn't clamav need root permissions while scanning? –  Fischer May 25 at 10:06

protected by Community Nov 14 at 6:27

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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