How to install antivirus in Linux Ubuntu Server and then perform a scan and remove viruses

Installing antivirus in Ubuntu Server then performing a scan then remove the virus.

How to install antivirus in Linux Ubuntu Server and then perform a scan and remove viruses
Image Source -
Learn how to install an antivirus in Linux Ubuntu Server. Learn how to scan and learn how to remove the virus found.

It is not common for a Linux (Ubuntu) to have a virus especially if it is a server because there are not much of a virus in the wild that is made for Linux. I have been working as an I.T. since 2004 and I have not come into an article wherein a problems regarding virus in Linux is discussed. So it is a little bit of a not in urgency to install an antivirus in Linux. But not all situations are the same so I have wrote this article on how you can install an antivirus then eventually perform a scan and then remove the virus.

On this article we are going to install an antivirus into a Linux Ubuntu Server 12.04 version. But I think it will also be applicable in other version of Ubuntu, be it a desktop version or a server version since they are almost identical.

Bear in mind that Ubuntu is based in a debian distribution of Linux so it is easy or safe to say that this article will also be applicable in some version of Debian linux distributions. I am gonna be discussing here on how to install an open source antivirus called ClamAV.

Basically if we are installing an antivirus into an Ubuntu Server we are going to do it in command line or terminal because server editions of Ubuntu or Linuxes mostsly don't have a GUI (Graphical User Interface) that we always found on a Windows type of computer server. So here we go...

Step 1 is to type this in terminal

sudo apt-get install clamav

Step 2, after installation we have to update first the antivirus so that we can make sure that it is updated to the latest available virus definitions, type this again in terminal

sudo freshclam

sudo means "super doer", always append sudo at the beggining of the command you are issuing in the terminal to make sure that the command or syntax will work. It will always ask you for  a password though.

After updating we now proceed to the next step which is scanning the Ubuntu Server.

Step 3, to scan a specific location or folder in your Ubuntu Server type this in terminal

sudo clamscan -r -i --remove /srv/samba/share

-r means scan all the files in /srv/share/samba, -i means show only infected files while scanning, --remove means removing the infected files. Be careful in using the -remove syntax if you are not sure on what you are doing because it might deleted important infected files, /srv/samba/share means the directory wherein my files is shared in a samba server.

--remove works for me because my Ubuntu Server is just functioning only as a Samba File Server. ClamAV did remove all the viruses in the samba share.

After it is done you can now check the directory if there is still virus left in the samba shared folders.

Let us know how you like this article. Like it and Rate it below.
629 0
0 stars - by 0 user(s)

Related Articles

Don't lose your data from Android Device.Better, know yourself to take a back up.This article explains to back up your Android Device..

We have come to a point where we cannot live without gadgets. It’s shocking! The truth is we have become addicts.

Cause of android hang up and can't send text even though you have a airtime load and your cell service is okay. .

Post Your Comment