You should have been familiar with Linux security and install ClamAV antivirus on CentOS 7, recently. Today we are going to learn Install ClamAV antivirus on Linux Ubuntu.
Table of Contents
Install ClamAV antivirus on Linux Ubuntu
All the operating systems require an antivirus. Though all programmers always develop fewer viruses and malware for Linux distributions, but the importance of installing an antivirus never should be forgotten. ClamAV prevents malware and rootkits attacks that can help your server secure. ClamAV is a free, open source antivirus that detects and kills Trojans, malware, viruses, codecs, and rootkits.
How to install ClamAV on Ubuntu
1- First connect to your Ubuntu terminal.
2- Update your Ubuntu Linux packages by entering the following command.
sudo apt-get update
3- After the update, enter the following command to download and install the ClamAV antivirus.
sudo apt-get install clamav
4- After a while, the ClamAV antivirus will be installed on your U Linux Ubuntu and ready to run.
5- Before running the command and scanning by ClamAV antivirus, update its database.
freshclam
Note: Antivirus installation and database update will end here and in the following we would present some of most used commands for ClamAV antivirus on Ubuntu.
ClamAV antivirus commands
1- For instant scanning (Quick Scan) of the main branch, use the following command.
clamscan
2- Use the -r switch to scan a specific folder.
For example, we want to scan the /tmp directory.
clamscan -r /tmp
3- Enter the following command for a full root branch scanning.
clamscan -r /
4- Use the -i switch if you want to show virus files after a search.
clamscan -r -i /tmp
5- Use the -remove switch to remove viruses automatically after searching.
clamscan -r -remove /tmp
6- Use the help parameter to get familiar with other switches and antivirus abilities of ClamAV.
clamscan --help
Recommended Article: Install ClamAV antivirus on Linux Ubuntu
conclusion
At the end of this article, we recommend users who face several attacks or frequent unknown file transactions, to install ClamAV antivirus on Ubuntu to prevent from spreading immediately if malware is detected.