I installed ClamAV via Terminal (Ctrl+Alt+T) with:
sudo apt-get install clamavbut how can I scan for viruses?
2 Answers
Terminal
At first you have to update the virus definitions with:
sudo freshclamThen you can scan for viruses.
clamscan OPTIONS File/Folder If necessary start with root permissions: sudo clamscan.
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 scan all files on the computer but only display infected files when found and have this run in the background:
clamscan -r -i / &Note - Display background process's status by running the
jobscommand.To check files in the all users home directories:
clamscan -r /homeTo check files in the
USERhome directory and move infected files to another folder:clamscan -r --move=/home/USER/VIRUS /home/USERTo check files in the
USERhome directory and remove infected files (WARNING: Files are gone.):clamscan -r --remove /home/USERTo 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 clamtkYou can get the latest version from Bitbucket as Debian package.
There is also a PPA (Outdated):
sudo apt-add-repository ppa:landronimirc/clamtk
sudo apt-get update && sudo apt-get install clamtkScan Menu: Here you can choose a file, folder or a device for scanning
View Menu:
Quarantine Menu:
Advanced Menu:
Help Menu: Here you can check for updates.
See:
- ClamTk@Sourceforge
- ClamTk Help
- ClamTk FAQ
The accepted answer is a great answer, but every time I reach this page, it's a pain to find the command I want from the clutter of information. So just providing a concise answer to the question:
sudo apt-get install -y clamav; sudo freshclamTo scan all folders in your computer (except /sys):
clamscan -r -i --exclude-dir="^/sys" --bell / To scan specific folders or files, you have to create a file in which you list out which files/folders you want to scan, and tell clamav where to find that file:
clamscan -r -i --bell --file-list=/home/nav/ClamScanTheseFolders.txtMy ClamScanTheseFolders.txt contained:
/media/nav/someFolder1
/media/nav/someFolder2
/opt/someFolder/somefile 3