Linux security scanning tool ClamAV installation and use

Introduction

Clam AntiVirus (ClamAV) is a free and open-source antivirus software. The updates of software and virus codes are released by the community for free. ClamAV runs under the command line. It does not use antivirus as its main function. By default, it can only detect viruses in the system, but cannot remove them. Users need to deal with virus files by themselves.

We can go to the ClamAV official website http://www.clamav.net/download.html to download the latest version of the installation package to install, or use the installation package that comes with the linux system to install.

centos system installation steps

1、执行 yum install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd -y

2. After the installation is complete, execute the freshclam command to update the virus database

Ubuntu system installation steps

1. Execute apt-get install clamav -y

2. After the installation is complete, execute the freshclam command to update the virus database

scan virus

If you do not know the location of the virus, use the clamscan -r / command to perform a full disk scan. Note that the full disk scan consumes a lot of system resources and takes a long time. It is recommended to use it when the system business is low.

You can also scan for a certain path, for example, the clamscan -r /usr/lib command only scans the files and directories under the /usr/lib path.

clamscan -r -i /lib

The command only lists the problematic file names and virus types found in the /lib directory, as shown in the figure

1683785720_645c87f839a553f8236c2.png!small

If the -i parameter is not used, the scan results of all files in the directory will be output, as shown in the figure (if there are many files, it is not easy to quickly find problem files, so it is recommended to use the -i parameter)

1683785730_645c8802f1bd85207d949.png!small

If the -r parameter is not used, only the files under the specified path are scanned, and no recursive scanning is performed for directories and subdirectories, as shown in the figure:

1683785743_645c880f98d34a62ce34d.png!small

Guess you like

Origin blog.csdn.net/qwe546913/article/details/132149310