I never did an antivirus scan in Linux. But, it may be useful if you have files transferred via an email or USB stick. To keep away from malware, Clam AntiVirus (aka ClamAV) is a well-known method to scan for viruses in Linux.
ClamAV & ClamTk:
The ClamAV is a free open-source antimalware toolkit for Unix, Linux, BSD, MacOS and Solaris, though it runs in Microsoft Windows. It’s always the first choice for Linux beginners.
As ClamAV has only a command-line scanner, ClamTk is an free open-source app that provides a lightweight, easy to use graphical interface based on it.
Install ClamAV & ClamTk:
Both packages are available in most Linux repositories. Though, they provide own packages in their website via
Step 1: Install ClamAV
As mentioned, user may install the package either from system’s own repository or from software website. Though, I recommend the former because it’s well packaged for your system and available in all CPU architectures (
Firstly, open terminal from start menu (“Activities” overview). Then, run command:
sudo apt install clamav
You may skip this step, as installing ClamTk in "Step 2" will install it automatically as dependency.
Alternatively, download & install the latest package from ClamAV website:
.deb for Debian/Ubuntu based systems, and
.rpm for Fedora/CentOS. However, the package from ClamAV website does not scan in my case in Ubuntu 20.04!! So I recommend the
Step 2: Install ClamTk
Also, ClamTk in Linux own repositories available to install in
arm64, etc architectures.
Simply open terminal from start menu (searching from ‘Activities‘ overview) and run command to install it:
sudo apt install clamtk
For choice, user may download & double-click install the latest ‘
.deb‘ package from the Github releases page:
Scan Your USB or other Files/Folders via ClamAV & ClamTk:
For those running on Ubuntu or Debian Server without a desktop environment. Run the commands below to scan your files:
- Update the database via command:
- Scan for viruses:
For desktop users, search for and open ‘ClamTk’ from Activities overview screen.
When the apps opens, you’ll see the options to scan files or folders, as well as settings for whitelist, scheduler and more.
Before start scanning anything, you may need to click “settings” and enable some options as you mind.
- Enable “Scan directories recursively” if you want to scan folders.
- Move the cursor over other options, it will indicate what does it do.
Finally, click on “Scan a file” or “Scan a directory” on main UI and select scan your files/folders.
Uninstall ClamTk & ClamAV:
As mentioned, the official ClamAV package may not work properly. In my case, it’s missing few config file and ClamTk always says scanned 0.
Anyhow, it can be easily removed by running command in terminal:
sudo apt remove --autoremove clamav
It will also remove clamtk and other useless dependency packages too.