Installing ClamAV CLI on Linux Mint 21
ClamAV is based on a multi-threaded scanning engine that can quickly scan large files and directories so to get it on Linux Mint just use:
Once the antivirus is installed check its version to see if it is installed correctly and for that purpose execute:
Scanning Files and Directories Using ClamAV CLI
ClamAV uses a combination of signature-based detection and heuristic analysis to identify and remove malware and therefore it is preferred by many Linux users so to scan any directory using ClamAV CLI below is the syntax that should be followed:
For further illustration I have scanned my Downloads directory of Linux Mint by using the above-mentioned syntax:
If you want to just see the infected files only then just use the –infected command by using the above-mentioned syntax:
If you want to remove the infected files automatically then just use the –remove command by using the above-mentioned syntax, but remember that if the antivirus feels any suspicious file, it will also remove it so be careful before using this command:
Further if you want to scan any file for viruses then just follow the given below syntax:
For further illustration I have scanned a zip in the Downloads directory of Linux Mint by using the above-mentioned syntax:
Now to remove this application from Linux Mint 21 then execute the below-mentioned command in case you installed it through apt:
Installing ClamAV GUI on Linux Mint 21
One of the key advantages of ClamAV is its open-source nature, which allows users to inspect the source code and make modifications as needed so if you are more comfortable in using the GUI of Linux Mint then install its GUI version by executing:
Next the run the application through Linux Mint terminal:
To scan any file or directory just click on Scan a directory and from the pop-up select the respective directory or file and afterwards click on OK:
Once the file or directory is scanned the complete statistics like number of files scanned and number of possible threats will be displayed; next click on the close button once the scan is completed:
Now to remove this application from Linux Mint if you are no longer to use it then execute the below command in case you installed it through apt:
Conclusion
ClamAV is a powerful and flexible antivirus software that is well-suited for use on mail and web servers, as well as for individual computers. This guide gives the complete guide on how to install both the CLI and GUI version of ClamAV on Linux Mint and how to scan files or directories through it.