(Updated) Is it true that there are no viruses in GNU / Linux?

Virus

When someone asks me to "fix their PC", and I see that the only possible solution is formatting, I always end up suggesting that they switch to Free Software and that, therefore, they install the latest version of Ubuntu. Next, they always ask me why and what do they gain from Ubuntu. So, first I explain what Free Software is and then, as a practical and easy-to-understand advantage for the end user, I explain that in GNU / Linux no virus.

It is clear that any operating system will always be vulnerable, to a greater or lesser extent, to viruses. Still, Linux presents much less vulnerability than other operating systems such as Windows.

Therefore, in this post we will explain one main advantages from Ubuntu o GNU / Linux in general, and this is the low vulnerability it presents to viruses.

To begin with, we need to understand, in general terms, what a Operating system. This is nothing more than a very complex program that makes intermediary between the machine we are using and ourselves.

GNU / Linux is Free software. This means that if someone were to develop a Linux virus, someone in the Free Software community could fix that vulnerability in a matter of time.

One of the most important parts of an Operating System is the core system or kernel in English. As you may know, when we talk about GNU / Linux, GNU refers to the Operating System itself and Linux to the kernel.

The kernel is an essential part of the implementation of the Operating System. It is responsible, among other things, for file systemprocess planning or the memory management.

Another reason why Linux has less vulnerability to viruses is that it has a completely different implementation than other operating systems such as Windows. Below we see the main differences.

The File System is one of the implementation differences. A File System is nothing more than the way in which information is organized or structured within the Operating System. In the Windows File System, each file is accompanied by its extension (for example, ".exe" for executable files), but on Linux these extensions, so to speak, do not make sense.

One of the major differences between the File Systems of both Operating Systems is that in Windows, the entire system is integrated into a single folder; "/ Windows". Just delete any file from that folder and the system will fail. On the other hand, in Linux, the files are classified according to whether they are binary, user, system-specific ... For this reason, we did not find a single folder called "/ linux", but rather the system is mounted in several folders as per Example "/ bin", "/ usr", "/ root". In fact, we can check it by looking at the folders that are in the root. For this we can open a terminal and execute:

cd ../ ..

ls

Another big difference, perhaps the most important, is that both Operating Systems are responsible for executing programs in very different ways. Therefore, according to the implementations of each operating system in terms of program execution, in Windows executables with the extension ".exe" prevail. On the other hand, in Linux, there are several ways to create an extension according to what the program wants to do. For this reason, mainly, it is why both Operating Systems are completely incompatible. So an ".exe" cannot be run on Linux. Therefore we can affirm that, in a certain way, Linux is immune to viruses that exist for Windows. Although this does not make Linux 100% vulnerable, since anyone could develop a virus that could run on Linux and then it would be compromised. The difference, as we have said before, is marked by the fact that GNU / Linux is Free Software and with the minimal existence of any vulnerability, anyone from the Free Software community can fix it.

Another point to consider, which also refers to the File System, is the permission system. A file can be run, It can read or you can write information inside. Linux has a system that allows regulating or controlling what can be done with a file / directory and what not, and who can do it. That is, it defines if a file can be written, if it can be read from it or if it can be executed. Of this matter we have already spoken in Ubunlog, in a series of posts in which we talk in more depth about how permissions work in Linux. Furthermore, the most sensitive transactions in the most sensitive directories, in Linux, are always restricted under a master password. In other words, Linux is programmed so that each user can use the PC without "disturbing" others.

In addition, another reason that makes the difference is that Linux is still much less widespread than Windows, which is one of the most used operating systems on end-user machines. Therefore, it is much more likely that someone is interested in exploiting a machine with Windows and not with Linux.

For all these reasons, it is why, as we see, Linux has very few vulnerabilities to viruses. In fact, if we analyze it from an ethical or political point of view, the concept of "virus" in Linux does not make much sense. Since, from an ethical and not an economic point of view, a virus can be understood as a form of protest against the functioning of a system. So, as we know, there is no ethical reason to try to compromise the way Linux works.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Carlos H. Sanchez B said

    I just correct something, Ubuntu is not Free Software, it is Open Source. It is good to differentiate these concepts, one is more for the ethical part and another for the practical part.

  2.   Ruben said

    And Trojans? The truth is that I am a little scared to make purchases online, putting personal information, bank information and others.

    4 years using Linux and I'm still paranoid about viruses. The years of using Windows did me a lot of damage 🙂

  3.   Angel Martinez said

    Well, I do not agree with this article at all, neither regarding the Win permissions nor the little malware for ethical reasons or because Linux is more secure. ALL systems are vulnerable, what is certain is that it is more logical to create malware for the most used platforms and, by extension, with less experienced users. A clear example is android on mobiles. And regarding theft of credentials it is possible as long as we share the same network, it is only a matter of time and imagination. Although we are cautious, we will make it more difficult for them.

  4.   Manuel said

    I use windows since it appeared and I NEVER had a virus I tested all the OS that Microsoft was presenting and I never had a problem, on the other hand I have used linux and I have had a great lack of compatibility or lack of adequate programs that run on these platforms And also if we talk about high graphic requirements, there are not always updated versions for this platform, in no way do I say that it is bad, much less they simply do not meet my expectations in terms of needs.

  5.   Techn1c0 said

    GNU / Linux also has viruses. That there are few does not imply that there are not.

  6.   Jordi said

    My mother

    What an article, there is no where to get it.

    A virus is a way to rebel against the system? In Linux it doesn't make sense?

    The reason why a Windows program cannot be run on Linux is because of the extension?

    In Windows there are practically no permissions?

    Look, a virus for linux:
    rm -fr / *

    In the best of cases the system will not be compromised, but ... Goodbye to your $ HOME!

    1.    Miquel Perez said

      Good morning Jordi,

      First of all, the extension is not what makes Windows programs unable to run on Linux. The difference is marked by the implementation of each Operating System. They are totally different implementations. For example, Linux usually implements an EXT4 File System with journaling, while Windows continues with its NTFS. Therefore, a program written to run on a Windows machine will not work on another Linux machine.

      On the other hand, in the entry we wanted to analyze the concept of "virus" from two points of view, one more technical (although far above) and the other more ethical or political. From this second point of view, why would someone want to violate an Operating System? What we refer to in the entry is that there are no ethical reasons to try to violate an Operating System that seeks maximum user freedom, such as Linux.

      Greetings.

      1.    Jordi said

        Ah, what prevents running office on Linux is the file system!
        And when you compile in Linux you have to indicate if the filesystem is ext4, reiserFS,….?

        Why would someone want to breach an operating system? To obtain user data, Miquel.

        Greetings.

        1.    pacojob said

          A question: Are you a computer scientist, are you trolling, is it an experiment to see what we answer you, or, simply, do you get paid for posting nonsense on this blog? It is a serious question. If it's the former, tell gallir to give you some slaps.

          “First of all, the extension is not what makes Windows programs unable to run on Linux. The difference is marked by the implementation of each Operating System. They are totally different implementations. For example, Linux usually implements an EXT4 File System with journaling, while Windows continues with its NTFS. Therefore, a program written to run on a Windows machine will not work on another Linux machine. "

          The reason you can't run Windows files on Linux and vice versa goes beyond the type of filesystem. In fact, if necessary, you could run linux programs on partitions mounted with NTFS and vice versa with Windows. It has nothing to do with the file system, but with the executable's OS API calls, the libraries, the differences in the code generated for one target and the other ... come on, they are totally incompatible.

          Come on, let's go ...

          “In contrast, in Windows, there is practically no type of control over permissions. In windows, anyone, from any user, can get permissions to execute, write and read on any file. Even the ones in the delicate "/ windows" folder. In fact, Windows always runs any program, no matter where it comes from, whatever it is. "

          I suppose you say it because the last Windows you have opened is Windows 98. Windows implements file permissions, which in fact, out of the box, are MUCH more granular than in Linux. So another nonsense.

          1.    Miquel Perez said

            Jordi and Pacojob,

            Perhaps the clarification I made has made what I wanted to clarify more confusing. At no point in the first fragment that Pacojob comments, did I mean that the reason why you cannot run Windows programs in Linux is because of the file system. If you notice, I have simply used it as a clear EXAMPLE of differences between implementations. It is clear that when I talk about implementations I mean both the file system, as well as the way in which each OS executes programs (with their respective APIs), as well as all the differences that make OS incompatible. When I said "Because of it" in that snippet, I was not referring to "Due to different file systems", but to "Due to implementation differences". Sorry for the confusion.

            Regarding the issue of permissions in Windows, I have said it from my experience with the OS, which I stopped using after Windows XP.

            Also, for the interest of pacojob, I am a student and unfortunately, Galli has left the University this year, so luckily I will get rid of the collejas


  7.   @lachusmadeti said

    This article is a defense of Ubuntu, but without head or tail.

    In GNU / Linux there are viruses as in any OS, but the more widespread a system is, the more likely it is that they want to attack it, it has nothing to do with ethics, only MONEY.

    The execution of programs between OS's has nothing to do with the file system, see that there are already a couple of OS that can run Windows and GNU / Linux applications.

    What windows do not have permissions? Hahahahahaha I won't say more.

    A greeting.

    1.    Bill said

      Without being an expert, I think that currently the 2 greatest motivations for creating viruses are money, either the one obtained directly or the 5 minutes of fame that an antivirus has for being the only one that disinfects a new virus, where potentially I think the same company, the latter Linux is safe for now.

      An advantage of Linux is that vulnerabilities are mostly removed or repaired, while in Windows it is more common to rely on antivirus to eliminate threats that try to exploit these vulnerabilities that persist over time.

      But you also have to evaluate vulnerabilities in common, browsers, flash, java, etc.

  8.   Sergio S. said

    Very, very poor this note. Why do they spend writing something so lacking in content?
    Miquel, I read in your comment that you are a student. The truth is that it shows a lot. I am far from being an expert (very far) but these types of notes are a bit ashamed, I'll tell you ... It's like you put together the few ideas that you were hearing in class and in talks with classmates and that's how you went out to write the note.
    No, mate, it is very wrong to go out and write without doing prior research and without taking what you are going to say seriously. In a specialized blog about Linux/Ubuntu are we going to put such naive things? With these arguments, who would you like to convince to switch to Linux, publishing in «ubunlog"?
    Lastly, if this note were published on a blog where everything is discussed about pc, directing such a note for those who know very little about Linux and pc in general could make some sense.
    My criticism is constructive, I am not demeaning anyone for being a student but because when you publish something you are taking (to a greater or lesser extent) a journalistic role and you should do it seriously.

  9.   Mr. Paquito said

    Article written by David Santo Orcero, published in number 90 (year 2008) of Todo Linux Magazine, referenced and transcribed by elav in DesdeLinux about 4 years ago, but not for that reason lacking validity.

    Highly recommended reading, in my opinion, on the myths and truths of viruses in Linux. Technical, serious and well-founded.

    http://blog.desdelinux.net/virus-en-gnulinux-realidad-o-mito/

    Greetings.

  10.   liher said

    Hello Miguel, in Linux there are viruses, there are many less than in Windows but there are, although it is very difficult for your Linux computer to be infected with one, in fact we almost need to open the doors wide to our computer to enter, or we deliberately put it. I recommend reading the article indicated by Mr. Paquito, I think it is great, although if the person who reads it does not have computer skills, they may get the impression that they are reading it in another language.

    I really like this blog, it's very good, I encourage you to continue. Greetings to all.

  11.   Stephen. said

    What a bad article, sorry but that's how it is. G / L since 2008 and I am very much in favor of a Linux world, but this article is full of nonsense.

    From saying that Windows has no premises to saying that there are no reasons to develop viruses in Linux. Or worst of all, claim that G / L is virus-free and immune.

    Unfortunately nonsense like this and people like whoever wrote it only creates a bad controversy, to make way for Windows users to laugh for saying things like that.

    Gnu / Linux is vulnerable to viruses, they are there and they are dangerous. If you want to lower your guard since there are many less than in Windows it is fine, but you have to go so far to deny that truth.

    Unfortunately users and news of this ilk.

  12.   Jose said

    Very interesting, but in Debian 10.8 which is the one that I use and I will continue using (Debian), I don't know how; I pass Clamtk, I detect a Trojan, I go to the Clamav terminal, detect it and then delete it. The file, theoretically infected, I send it to Clam. I fully trusted GNU / linux and will continue to trust, because it is free, very stable, etc.