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 freshclam
To 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:
Terminal
At first you have to update the virus definitions with:
Then you can scan for viruses.
If necessary start with root permissions:
sudo clamscan
.Examples:
To check all files on the computer, displaying the name of each file:
To check all files on the computer, but only display infected files and ring a bell when found:
To scan all files on the computer but only display infected files when found and have this run in the background:
Note - Display background process's status by running the
jobs
command.To check files in the all users home directories:
To check files in the
USER
home directory and move infected files to another folder:To check files in the
USER
home directory and remove infected files (WARNING: Files are gone.):To see more options:
See:
Graphical User Interface: ClamTK
ClamTk is a frontend for ClamAV. You can install it via Terminal with:
You can get the latest version from Bitbucket as Debian package.
There is also a PPA (Outdated):
Scan 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:
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:
To scan all folders in your computer (except
/sys
):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:
My
ClamScanTheseFolders.txt
contained: