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.

Image Source - https://pixabay.com/en/ubuntu-wallpaper-linux-pc-simple-1479782/
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.


217 0
0

Related Articles

Get Samsung and other companies kind of dialler and features for your android phone. Download simple app and have all features.

This article will teach you on how to change your name, username, or user accounts in Windows 10..

Tablet PCs have become more and more popular among consumers. Use the guide below to help you choose a suitable tablet PC for yourself..

Kindly login to comment on this post.
  • parpande  30-09-2016
    A very helpful article. Actually I have a query like is it possible that I would mount a filesystem via samba or NFS of remote windows machine into the Local Linux machine , so as to scan that filesystem for any vulnerabilities.
    reply 0