Is antivirus or anti-spy ware needed on the raspberry pi 3? The only thing I have found is a thread from 2012; https://www.raspberrypi.org/forums/viewtopic.php?f=62&t=10069 Just wondering if there is anything I should be aware as to why/why not on antivirus software. Should I be using a firewall?


I would say the vast majority of Pi users (and Linux users in general) don't bother installing anti-virus software.

There is a myth that frequently gets told along the lines of "Linux can't get viruses" or "No-one writes Linux viruses; they write for Windows instead". Those myths aren't true – viruses can and do exist for Linux distributions, although they are significantly less common than on Windows.

The Debian documentation on security lists some anti-virus scanners, should you choose to use them, but most of them are geared towards scanning email rather than scanning your computer as a Windows anti-virus program would.

More commonly, devices which are poorly configured are vulnerable to being taken over by an active attacker (as opposed to you downloading software which is infected). A prime example of this is Pis being taken over which used the default SSH password without changing it. SSH did at one point run by default in Raspbian, so if the default password was not changed, it was possible, depending on router configuration, for a Pi to be exposed to the Internet with only the default password as protection.

If you want to keep your Pi secure, it's generally better to stop any attackers from getting in at all – the Pi Foundation have some tips, which include configuring iptables, which can act as a firewall for your Pi. Their suggestion is to configure iptables with ufw, the "Uncomplicated Firewall", which you should be able to do easily. While a firewall won't stop a virus, it may help to defend against other attacks.

  • 1
    A virus isn't really "an attacker" in the sense of something that might be deterred by a firewall; they are conveyed by being embedded in something legitimate.
    – goldilocks
    Feb 3 '18 at 14:29
  • Indeed, I'm aware of that, @goldilocks; though I didn't state it explicitly. I've clarified that point now to avoid confusion.
    – Aurora0001
    Feb 3 '18 at 17:33
  • 1
    In relation to the vulnerable-to-attack point, keeping the system and in particular the kernel updated is critical, since these include bug fixes against discovered vulnerabilities (which, when discovered and fixed, are publicly announced and documented, meaning systems which aren't updated may now effectively have a prominent "Hack me!" sign on them).
    – goldilocks
    Feb 3 '18 at 18:09
  • Thanks for all the input. I changed the password when setting up first time. I'll look into iptables. Feb 5 '18 at 20:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.