Antivirus on Linux: Should I Really Use it and if So, When Do I Need it?

6
Antivirus on Linux: Should I Really Use it?

There are some situations when running an antivirus on Linux makes sense, but the average Linux desktop isn’t one of them.

For Windows users, installing an antivirus software on their system has become one of the first steps over the years. But for a Linux system, the choice is not as clear. A big question usually asked by those who just have switched to Linux is: “Why Linux doesn’t need antivirus?”.

In this article, we will answer your questions and give you a few tips depending on your system usage.

Why Linux is Deemed Safe?

Although there is no perfect or invulnerable operating system, it can be said that a Linux computer has a lower risk of being attacked by malware or virus than other operating systems such as Windows or macOS, for different reasons we will talk about next.

1. Linux is Safe by Design

Above all, we must take into account the architecture of a Linux operating system itself.

The permission-based structure in Linux prevents regular users from performing administrative actions because each app needs authorization by the superuser (root) before it’s executed. This is a barrier that makes it difficult for any virus to sneak into the system and make disasters. Without being a root, you won’t be able to run/install new programs on Linux. Only superuser has the privilege to access all files in the system.

Additionally, Linux does not process executables without explicit permission as this is not a separate and independent process. You’ll have to chmod +x a file before you can run it. 

On Linux it is harder for the virus to get system level access. System-related files are owned by the root account. If infected, viruses can be easily removed as they can only affect the user account where they were installed, and they do not affect the root account. In other words, the Linux architecture makes it almost impossible for a virus to do anything. This is one of the main reasons why we still don’t need an antivirus software on Linux.

2. Software Sources

Think about how software gets installed. On Windows, there is nothing similar to software repositories in Linux, and you can install any application that you find without any guarantee that it is not malicious software. That makes it a little easier for users to download malware compared to Linux. All you need to do for viruses and spyware to run is to double-click on an infected executable file.

Conversely, all Linux distributions have official repositories, that is, applications that are signed and verified for proper operation and that do not have vulnerability problems. So, if you only install official applications of the repositories, it is almost impossible for viruses to leak into the system.

In addition, the most people using Linux don’t use pirated programs and games that could come packaged with malicious software. They use their distribution’s official software center and maybe some trusted repositories on top.

3. The Popularity Factor

As you might expect, the volume of malware developed for an operating system is proportionate to its popularity.

Linux isn’t typically a prime target for cyber-criminals, as Windows and macOS are more widely adopted, and virus authors prioritize these operating systems since they are more likely to cause widespread damage. According to StatCounter, all Linux distributions are used only by about 2% of the population for desktop usage.

The creators of malicious software usually do what they do for either fame or money. From their perspective, it’s better if they target the most popular platforms. Why spend their time focusing on Linux, when Windows would be easier to exploit and produce better results?

When You Need an Antivirus on Linux

However, when we enter into the field of the Linux servers, things are a little different.

Typically Linux servers only need antivirus if they are sharing files with Windows systems or performing as a mail server. In both these cases the antivirus software is inspecting the files coming in and going out over those two services. It does not work like on a Windows system where the antivirus software monitors the operating system.

The main reason to have antivirus running on Linux servers is usually not to protect the server itself, but to protect the end users who use the services / files on the server. Think of the server as a potential virus carrier.

Therefore, the strongest argument for using antivirus software in Linux is to protect Windows and Mac users from malicious files that you might unwittingly pass on. This is the main reason the use of antivirus programs is a priority on Linux servers that store large numbers of files uploaded by users of other platforms.

What Linux Antivirus Exist?

There are many Linux antivirus programs out there that are suitable for your needs. Below we have shortlisted the best 3 in our opinion antivirus apps for Linux that will keep your system safe from malware and other online threats.

ClamAV is the leading open source virus scanner for the Linux platform. It is an antivirus software which detects virus, malware, trojans and other threats and it is also available for free which makes it one of the best antivirus software for Linux. Like we said, ClamAV is an open source, so its virus directory is continuously being updated by users around the world. This kind of community collaboration is one of the reasons why ClamAV is contained in almost every distro’s software repository.

Comodo is a powerful cross-platform antivirus software which uses cloud-based behavioral analysis to protect your device against all types of malware.  It’s free, so you have nothing to lose in trying Comodo. With proactive protection, Comodo antivirus will defeat all known threats. The software features real-time, on-access and on-demand virus scanning, full event logging, schedules scans and more.

Chkrootkit, as the name suggests, scans rootkits. Rootkits are hard to detect and difficult to remove from a system. They are collections of malicious programs designed to compromise the root user account and keep access for an extended period of time. Chkrootkit is commonly used by system administrators for malware detection or malware scanning.

Chkrootkit may look at the list of processes with a common utility like the ps command. During that same moment, it queries the kernel and requests the same information. If there are any differences, this is suspected and marked as such.

Conclusion

Linux isn’t invulnerable, but when it comes to daily desktop use, Linux is the only operating system out there right now that doesn’t require an antivirus software to function without any substantial risk.

But if you are running a Linux-based file server or mail server, you will probably want to use antivirus software in order to protect the end users who use those services.

Generally speaking, the most effective way to have a secure system and protected against any eventuality is not to have an antivirus but to keep the updates up to date, install software only from the official repositories, and take care to configure the firewall correctly.

If this guide has helped you, please consider buying us a coffee.

Buy me a coffee!

Your support and encouragement are greatly appreciated!

6 Comments

  1. Key hunting and installing cracks for Windows and Office is easy but also forces users to try tens of programs that they execute without thinking.

  2. “Linux is the only operating system out there right now that doesn’t require an antivirus software to function without any substantial risk.”
    What about BSD distributions?n (Maybe Mac excluded)
    Antivirus is also useful when using Wine apps.

    • You are definitely right!

      I apologize for missing that information and appreciate the point made about Sophos Antivirus.

      The article has been edited. Once again, thank you!

  3. Most of the “safe by design” items are true for Win10 too. Win10 has a modern kernel, modern filesystems, modern permissions. On both Linux and Win10, a user can install a new app for their own use without needing root permissions. Both systems have operations where you must escalate to root/admin to do the operation.

Leave a Reply

Your email address will not be published.

Latest from Tutorials