Install AVG Free Antivirus On Ubuntu

Why would I use Antivirus in a Linux system?

Some of you may be wonder why would we install an Antivirus while Linux is a virus free operating system. Well, let me give you some reasons why it is some important to use an antivirus for Linux OS’s.

  1. Linux is Virus free, right? But, not as secure as you think in some cases. There are so few virus programs available to infect a Linux system, but they might do only minor issues, and don’t any harmful or serious damage to the Linux system as like in a Windows or other operating system.
  2. You may have chance to copy some files/folders from a net-cafe system, and want to use them in your home Linux computer. In this case, your home computer installed with Linux OS might be attacked by the viruses which you copied from the net-cafe system along with some files.
  3. Still, many people use Windows OS for some reasons, like gaming. In such cases, if you have dual boot(Windows & Linux), It is advisable to use an antivirus program in your Linux system. Prevention is better than cure, right?
  4. If your Linux server acts like a central file server or something else in your home or organization network and connected with many different kind of computers(Linux, WIndows, Mac OS X etc.), then It is also recommended to use antivirus to prevent the unwanted virus issues.

Install AVG Free Antivirus On Linux

Download the latest edition depending upon your distribution from the free AVG download page.

Go to the download location and enter the following commands to install AVG Free edition. Be mindful that all commands should be run with root user privileges. I tested this article on Ubuntu 14.04, and also, I have included the installation steps for other distributions too.

On DEB based systems:

apt-get install gdebi
wget http://download.avgfree.com/filedir/inst/avg2013flx-r3118-a6926.i386.deb
gdebi avg2013flx-r3118-a6926.i386.deb

Sample output:

 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 Building data structures... Done
 Building data structures... Done

 AVG Anti-Virus for Linux/FreeBSD
 Do you want to install the software package? [y/N]:y
 Selecting previously unselected package avg2013flx.
 (Reading database ... 160172 files and directories currently installed.)
 Preparing to unpack avg2013flx-r3118-a6926.i386.deb ...
 Unpacking avg2013flx (2013.3118) ...
 Setting up avg2013flx (2013.3118) ...
 Installing 'avgd' service initscripts...
 Registering 'avgd' service to runlevels...
 Adding system startup for /etc/init.d/avgd ...
 /etc/rc0.d/K20avgd -> ../init.d/avgd
 /etc/rc1.d/K20avgd -> ../init.d/avgd
 /etc/rc6.d/K20avgd -> ../init.d/avgd
 /etc/rc2.d/S20avgd -> ../init.d/avgd
 /etc/rc3.d/S20avgd -> ../init.d/avgd
 /etc/rc4.d/S20avgd -> ../init.d/avgd
 /etc/rc5.d/S20avgd -> ../init.d/avgd
 Please do configuration with /opt/avg/av/bin/avgsetup
 Generating unique user id
 Processing command line ...
 Cfg file not specified using /opt/avg/av/cfg/diagcfg.xml.
 New installation ID succesffully generated.
 * Starting avgd ...                                                                                                                                             [ ok ]
 Processing triggers for man-db (2.6.7.1-1ubuntu1) ...

On RPM bases systems:

wget avg2013flx-r3118-a6926.i386.rpm
rpm -i avg2013flx-r3118-a6926.i386.rpm

Install AVG from ‘binary’ file:

Download the tar files and compile it your self as shown below.

wget http://download.avgfree.com/filedir/inst/avg2013flx-r3118-a6926.i386.tar.gz
tar xzvf avg2013flx-r3118-a6926.i386.tar.gz

Change to the location where you extracted the tar file.

Run the following command to install it.

./install.sh

Install AVG from ‘.sh’ file:

Download the .sh file. Set executable permission.

wget http://download.avgfree.com/filedir/inst/avg2013flx-r3118-a6926.i386.sh
chmod +x avg2013flx-r3118-a6926.i386.sh

Then, install it using command:

./avg2013flx-r3118-a6926.i386.sh

On BSD systems:

Download the AVG program for FreeBSD:

wget http://download.avgfree.com/filedir/inst/avg2013ffb-r3115-a6155.i386.tar.gz
tar xzvf avg2013ffb-r3115-a6155.i386.tar.gz

Change to the location where you extracted the tar file, and run the following command to install it.

./install.sh

Configure AVG

As you see in the installation method on Ubuntu, AVG is installed and started, but not configured. You may see the output that reads:

Please do configuration with /opt/avg/av/bin/avgsetup

Run the following command to configure AVG antivirus.

sudo /opt/avg/av/bin/avgsetup

Sample output:

Choose what you want to do. In our case, let us setup On-access for Real-time protection.

AVG command line setup
Copyright (c) 2013 AVG Technologies CZ

Your location:  Start
Welcome to the AVG for Linux/FreeBSD Deployment Wizard.
The Wizard will help you deploy AVG according to your needs.

Please choose what you want to do now:
M) Set up the TCPD protection for E-mail Server
O) Set up On-Access for Real-time protection
E) Exit

Type [M|O|E]: O

Select the on-access engine:

AVG command line setup
Copyright (c) 2013 AVG Technologies CZ

Your location:  Start -> On-Access Deployment

Deploying On-Acces for Real-time protection

Please select the On-Acces engine used for securing:

R) RedirFS engine (only Linux kernel up to 2.6.37 version)
F) Fanotify engine (only Linux kernel from 2.6.36 version)
S) Samba plugin (Linux and FreeBSD)
D) Dazuko module (FreeBSD up to 8.x or Linux up to 2.6.22 version)
B) Go to back
E) Exit

Type [R|S|D|F|B|E]: F

Enter the path of the directory you want to secure. In my case, I want to secure my /home directory, so I just pressed the Enter key.

AVG command line setup
Copyright (c) 2013 AVG Technologies CZ

Your location:  Start -> On-Access Deployment -> Fanotify engine

Checking the settings for fanotify in the /boot directory...
Please enter the full path to the directory you want to secure (e.g. /home/; do not use relative paths or links to the directory; for multiple directory use pipes - e.g. '/home/|/var/samba/' or type 'Enter' for default /home/ directory):

That’s it. We have configured AVG successfully and secured our /home directory.

AVG command line setup
Copyright (c) 2013 AVG Technologies CZ

Your location:  Exit: Success!

Congratulations, AVG pro Linux/FreeBSD has been deployed successfully.
If you experience problems with AVG, please refer to /opt/avg/av/log/0//deployment.pub.log or contact the technical support.

Please choose what you want to do now:

N) Continue deploying AVG for another kind of protection.
E) Terminate the deployment.

Type [N,E]:E

Choose the any one of the above options whether you want to complete(Terminate) the deployment or Continue deploying AVG for another kind of protection. In my case, I don’t want any other deployment, so I entered the letter ‘E’ to Terminate the deployment.

Updating AVG

The very first step is to check whether there are any new updates available to AVG.

To do that, enter:

sudo avgupdate

Sample output:

AVG command line update
Copyright (c) 2013 AVG Technologies CZ

Running update.
Initializing...
Downloading file:  avg13infolx.ctf
Analyzing...
100% [===================================>]

You are currently up-to-date
Update was successfully completed.

Scanning Files/Folders

Let us scan some directories to check for any viruses.

Syntax:

sudo avgscan <options> <path1> <path2> ...

Example:

Here, I am going to scan my  directory, and store the results in /tmp/avscan.log file.

sudo avgscan -aPcijk -r /tmp/avgscan.log /home/sk/Downloads/

Sample output:

AVG command line Anti-Virus scanner
Copyright (c) 2013 AVG Technologies CZ

Virus database version: 4257/9260
Virus database release date: Mon, 09 Mar 2015 08:36:00 +0530

Files scanned     :  10246(180)
Infections found  :  0(0)
PUPs found        :  0
Files healed      :  0
Warnings reported :  0
Errors reported   :  0

Hurray! I don’t have any infected location on the scanned directory. Let’s now check the output logfile.

cat /tmp/avgscan.log

Read the man pages to know more details of the available options.

man avgscan

Conclusion

I wouldn’t say Antivirus program for Linux is important, but it is recommended if you running Linux system in a mixed mode network environments. If you want to secure more efficiently, it is better to go for a firewall solution.

That’s it. Cheers!

  • Chris Tech Support

    Bad News: AVG have discontinued their Linux product. I confirmed it with their support team and was advised QUOTE “I have looked into it with our products team and they have informed me that the Linux product has indeed been discontinued. I apologise for any inconvenience that this may cause.”

    Currently the 2013 version is still available via the instructions above and works on old Linux builds, but its no good for new builds.

  • 3p0nymuss

    Don’t you think it’s a bit short-sighted of you to assume that the only reason someone would want to install an anti-virus program on a Linux system would be to scan the Linux system? What if someone has a Linux OS on a USB stick that they want to use as a rescue “disk” and they need to scan a Windows system without booting it up?

  • Trying2Learn

    Why don’t people put DATES on their articles?

  • el komodos-drago

    get following error:

    [email protected]–desktop:~$ gdebi avg2013flx-r3118-a6926.i386.deb
    The program ‘gdebi’ is currently not installed. You can install it by typing:
    sudo apt-get install gdebi-core

  • el komodos-drago

    please don’t stick to clam AV.

    despite being easy to install a AV-test article shows that you may as well use AVG (incase you are to busy the test show clam AV detects just above half linux malwaer and a depresingly small amount (about 15%) of windows malwear).

    you can use bit deffender but they discontiued updates for that in 2015 or you can use sophos AV note i needed to untar the tar ball in the GUI but that lacks a GUI.

    a lot of people say that there are (virtualy) no viruses for linux and that linux is virtualy inpossible to break into. this is true but a lot of malwear (trojans and the like) does not rely on breaking into this system and rather scaring or perswading the user to download the malwear themselves.

    also i believe someone said that you may want to use linux as a rescue disk. good idea but i wish to point out that their are dedicated system rescue tools for that (again a link to a AV-test artical so you can make your own mind up ).

    and if you are running a linux server then you having an AV may save someone else having to clean their system of malwear (hence the windows malwear colom of the earlier AV-test article).

    teclib looks promising but that is not released for home users yet and so in the mean time i will use bit defender but you are free to use whatever you chose (sophos, bitdefender, clam AV, clam TK (i use this as well as it runs on ARM) even AVG (if you can get it to work which i can’t)).

    good luck.

  • el komodos-drago

    sorry links haven’t worked.
    if anyone asks i may link them to the articles if i see their post.

  • Heriberto Torrado González

    Thanks a lot, Unixmen. It runs perfectly on Ubuntu 16.04