How to Install AVG Anti Virus on Ubuntu Server


Although in my experience Linux is much less susceptible to malware, it would be unfair to say that they are completely secure.  Even if a Linux machine isn’t infected it doesn’t mean it can’t be an unsuspecting virus delivery mechanism.  Although saying that a web server really shouldn’t be delivering any malware…

AVG is a widely recognised anti-malware vendor, especially in the Windows world, and we’ll be installing their Linux Antivirus on our server and then setting it for a scheduled run daily.

SSH to your box as usual.

We’ll need to install some dependencies:

apt-get install ia32-libs

Once I had the location of the file I ran a command like the following:


When that is downloaded lets install it:

dpkg -i avg2012flx-r1795-a5274.i386.deb

Lets start the daemon:


Update the virus definitions (this could take a little while, especially on a slow connection):


Now lets run a complete scan just to be on the safe side:

avgscan / –arc –heur

Hopefully that will come up clean, if not action accordingly.

Lets create a file that we will set to run automatically:

mkdir /root/scripts

nano /root/scripts/

Paste the following:

avgscan / –arc –heur –report=/var/log/antivirusscan.log

Make the file executable:

chmod +x /root/scripts/

Now lets make it so we can run it automatically:

If prompted select Nano (I find it the easiest but it’s your personal choice).

At the bottom of the screen paste the following:

@daily /root/scripts/

[ctrl]+o to save and [ctrl]+x to exit.

Done, now you can keep an eye on the log in /var/log/antivirusscan.log and you are all set.

Got something to say? Go for it!