General Guides

Search Knowledge Base by Keyword

How To Run A Virus Scan On Your Server

You are here:
Share:

How Do I Scan My Linux Server for Viruses?

In a Linux based environment you can run a Virus scan using ClamAV, and you can scan for Malware using Linux Malware Detect. You can also use the ClamAV scan engine with Linux Malware Detect for better performance.

 

How to Run a Virus Scan in Linux Using ClamAV

The following steps will assist you with the installation of ClamAV for CentOS and Ubuntu. Please note that you may utilize the steps provided for CentOS on a server that is utilizing cPanel.

 

CentOS

 

  1. Connect to the server instance using an SSH client, such as Putty.
  2. Once connected, run the following commands as the root user (Please note if you’re not running these commands as the root user you’ll need to append the word “sudo” before each command)

 

 

Ubuntu

 

  1. Connect to the server instance using an ssh client, such as Putty
  2. Once connected, run the following commands (Please note if you’re not running these commands as the root user you’ll need to append the word “sudo” before each command)

 

 

Once ClamAV is installed you can run  a scan using the following commands. Please note that the following commands apply to both Ubuntu and CentOS.

 

To check files in the all users home directories issue the following command:

 

 

To check all files on the server instance:

 

 

How to Run a Virus Scan in Linux Using Linux Malware Detect

The following steps will assist you with the installation of Linux Malware Detect for CentOS, Ubuntu, and servers that are utilizing cPanel.

 

  1. Connect to the server instance using an ssh client, such as Putty
  2. Once connected, run the following command (Please note if you’re not running these commands as the root user you’ll need to append the word “sudo” before each command)

 

 

To scan an entire directory using Linux Malware Detect, you’d type the following:

 

 

To scan an entire user directory using Linux Malware Detect, you’d type the following, replacing “username” with the actual username:

 

 

To scan the entire server instance using Linux Malware Detect, you’d issue the following command:

 

 

 

Helpful Related Articles

 


Share: