ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel
  • »
  • Technology»
  • Computers & Software

Using linux (Ubuntu) to remove viruses and spyware when all else has failed in Windows

Updated on December 5, 2010



Before we do anything...

Lets make sure you really need to do all this linux stuff. There are a variety of antivirus programs out there. In my experience, most do not do a good job of preventing an infection and don't find all the existing ones either. The two I use are "ESET NOD32 Antivirus" and "Malwarebytes Anti-Malware". If you don't have these installed, get them. ESET has a free 30-day trial and Malwarebytes has a free version. Both of these almost always prevent an infection and do a great job of finding and destroying an existing infection. It's worth the money to buy them. Also Avast antivirus works too, but I only use it in linux for bad Windows infections. Avast has a free "Home Version" too, which requires a quick and free registration to get the license. Try at least one of these before going through the trouble of the linux stuff below. Some bad viruses wont let you install any of these while it still exist, so the linux route might be the only route to "cure" your machine.

Note: the free Malwarebytes does not run in the background, while the full version does. It must be running in the background to prevent infections, but you can still scan your hard disk. ESET's free version does run in the background, but will expire after 30 days.

Why linux?

Linux is perfect for the job. Especially Ubuntu Linux. You can download a CD image from their site, burn it to disk, reboot and it just works. No need to install it on your hard disk or mess with the hard disk at all (other than when you remove the viruses). No need to install drivers. All your devices should work fine automatically. The Ubuntu CD runs from the system memory and when you reboot, it all disappears, like it was never there. Can't do that in Windows or OSX. If you don't know this already, linux will be the #1 operating system sometime in the near future. It's easier to use than the others and it's free (and no viruses!). If you really need to, you can put the image on a USB drive and boot from that. I have a ASUS Eee netbook, which has no CD drive. So I had to use the USB method.

The most important reason linux works great for removing viruses is that the viruses won't be running in linux. A really bad virus will prevent most antivirus programs from running or from doing its job in Windows. So the virus will remain hidden on your computer as long as Windows is running. When you start linux, the virus wont start, because it's only made for Windows and starts when Windows starts. Windows wont be running at all, just linux, so the virus wont be running either, which means we can use an antivirus program in linux to remove it from Windows.

If none of that makes sense, it's fine. As long as you can follow the instructions below, you'll be OK.

Getting Ubuntu Linux

Ubuntu linux is free. To get it, you can download it from their site or from bittorrent. I prefer the bittorrent method because it's faster, but you don't have to do that. Note: The current Ubuntu when I wrote this article is version 10.10.

Choose your download method below:

To get it from bittorrent:

  1. Go to your favorite torrent search site
  2. Search for "Ubuntu desktop"
  3. There will be several options. Choose the "Ubuntu Desktop 32-bit" version and make sure it's the CD, not the DVD. The CD should be about 700mb
  4. Start your bittorrent program and open the torrent you just downloaded.
  5. After you download the ISO file, burn it to a CD. If you need/want the USB option, you need to download the USB installer. The link for that is below.
  6. You should now have a CD or USB stick with a bootable Ubuntu on it

  1. Click the link above
  2. Follow the instructions (download it and create a CD or USB stick). If you choose CD, every time you shutdown Ubuntu, it will erase all settings and you will have to setup your wireless network and install the antivirus every time you start Ubuntu. If you choose USB Stick and then use the installer, you can have it save everything you do to the USB Stick and avoid redoing everything each time. You have to set a persistence option in the USB installer for it to save anything or it will be just like the CD. I would do the USB option if you plan on doing this a lot.
  3. You should have a CD or USB stick with a bootable Ubuntu now

Now you are ready to start Ubuntu

So you should have a CD or USB stick ready to go. You should be able to restart your computer and it will boot to Ubuntu automatically with the CD. If it doesn't or your using the USB stick, you may have to tell it to boot to it yourself. You can do this by setting your boot order in the system BIOS (have the USB stick in plugged in when you do this). Have the CD or USB start before your hard disk. If you don't know how to do that, Google it. Try "your computer model bios boot order how to" in Google. Of course, where it says "your computer model", you should type your model. Example "Dell dimension 8200 bios boot order how to" for a dell dimension 8200 computer.

OK, Ubuntu is loading

So it's loading. You will be asked if you want to test it or install it. Choose to Test it. You will see the desktop start to load. Ignore any messages about restricted drivers. We don't need that. You will need the internet. If you are using a wireless network, click the wireless signal bars on the top-right of the screen, to the right of the clock. The time might be wrong, but we don't care about that right now. Click your network from the list and type the password. It will ask you to type another password for the "Keyring Password". You can just click "OK" and then click "Use unsafe password". Now you got internet.

Installing antivirus and scanning


Finally we can get to business. Follow these steps:

  1. Open Firefox and go to
  2. Find Linux Home Edition. IF you can't find it, search for it in the search box at the top of the page
  3. Make sure you get DEB package and save it
  4. When it's done, find it and double click it
  5. A window will pop up, click "Install". It will install pretty quick. Close the window when it's done
  6. Click on the "Applications" button in the top-right corner and choose "Accessories" and then 'Avast"
  7. It will ask for a license number and there will be a button to click to get it. Click the Button.
  8. It will open Firefox and bring you to a registration page. It's free. Follow instructions. Make sure you choose "for home use", because it's not for institutional use
  9. Wait for the e-mail. It can take 15 minutes. Go outside and get some fresh air.
  10. When you get the e-mail, copy and paste the license number to Avast and start it. Save the e-mail! It's a pain in the butt to get one each time you install.
  11. Update the virus definitions
  12. Now your Windows hard disk is not mounted yet. You need to click on "Places" the top of the screen and click "xxxMB media", where xxxMB is the size of our drive. If you have more than one and don't know which has Windows, click them all. Close or minimize any windows that pop up when you do that.
  13. Now, in Avast, click "Selected folders" and then click the green "+" to the right. Click the "/" folder. Then click the "media" folder. Click "OK"
  14. Start the scan and wait. It will take a while, but it's worth it.

It's done scanning

Avast should have found at least one virus and you can remove it now. After that, you can close Avast and restart the computer. To restart, click the ubuntu logo in the top-right corner and choose restart. When Ubuntu is done shutting down, it will pop out the CD. If you're using the USB stick, take it out right when the computer restarts and beeps or it will start Ubuntu again. We want Windows to start this time. Ubuntu froze for me when it was supposed to restart. If that happens, it's cool (no pun intended). Just take the CD out or USB and hit the reset button.

It's not over yet. Avast doesn't always get everything and if you have one virus, you probably have many. We need to run Malwarebytes and ESET NOD32 once Windows is done loading. Scan with both and remove anything they find. You'll want to reboot again. You probably want to rescan again, just to be sure. Now you should be good. If not you can try it all over again or just toss the damn thing in a pool or from a tall building. Or better yet, install Ubuntu and get rid of Windows.

Note: You can also try ClamAV in Ubuntu if Avast failed you (


    0 of 8192 characters used
    Post Comment

    • profile image

      Ricks S 6 years ago

      Thank you, I keep forgetting how to do it. Now I got you bookmarked.

    • ajeet.kislay profile image

      ajeet.kislay 7 years ago from India

      nice hub very informative