Is Linux Operating System Virus Free?

Linux System is considered to be free from Viruses and Malware. What is the truth behind this notion and how far it is correct ? We will be discussing all these stuffs in this article.

Linux Virus Free
Linux OS is Virus Free?

Is Linux Operating System Immune to Malware

To be true, No! No OS on this earth can be ever be 100% immune to Viruses and Malware. But still Linux never had a widespread malware-infection as compared to Windows. Why? Let us find the reason behind this.

Some people believes that Linux still has a minimal usages share, and a Malware is aimed for mass destruction. No programmer will give his valuable time, to code day and night for such group and hence Linux is known to have little or no viruses. Had it been true, Linux should be the primary target of Malware infection because more than 90% of high end server runs on Linux today.

Destroying or Infecting one server means collapse of thousands of computer and then Linux would have been the soft target of hackers. So certainly usages share ratio is not in consideration for the above said fact.

Linux is architecturally strong and hence very much immune (not totally) to security threats. Linux is Kernel and GNU/Linux is the OS. There are hundreds of distributions of Linux. At Kernel Level they all are more or less the same but not at the OS Level.

Now suppose a malicious script is written for a RPM based system i.e., RedHat, Fedora, CentOs, it can’t infect a Debian based system and a destructive script written for Debian based OS can’t infect a RPM based System. Moreover a script that is going to perform a system-wide change needs root password.

If root password is confidential and strong enough, the OS is literally secure. Now a windows virus can not contaminate a Linux until Wine is installed and run as root. Hence it is suggested not to run wine as root.

You can not set a Linux System without setting up root password and user password. It means every user in a Linux System must have a password except ‘Guest‘. Where as Windows allow you to set user and even root account without password. A user can not run a program be it install/uninstall without permission provided (sudo) or root password.

But this is not the case with Windows, All windows program can be installed or uninstalled without the consent of root (Administrator). Could you run windows without GUI ? NO! But you can certainly run a Linux without GUI and it remains as much productive as it is with GUI. Actually most of the System Administrator disable GUI as a security concern.

Linux is so much secure in architecture that you even don’t need to go behind a firewall until you are on Network. The access control Security Policy in Linux that is called Security-Enhanced Linux (SELinux) is a set of Kernel modification and user-space tools which implement security policies in a Linux system. Even SELinux is not must for normal users however it is important for users on network and Administrators.

An Open Source Antivirus ‘Clam AV‘ is available for free download and you should install it, if your machine is on Network for comparatively more protection.

Download ClamAV from here: http://www.clamav.net

Apart from these You can encrypt you disk, use a boot loader password, define and implement a custom boot, custom user roles, etc., makes Linux very much secure. However there are certain threats to Linux System and we will be discussing those here.

The known Linux threats like Viruses, Trojans, Worms and Malware of other kind counts up to 422 in 2005 which gets more than doubled in the recent year with the current count of 863, as reported which is seen as a sign of increasing popularity of Linux as claimed by technical experts.

Some Know Linux Threats
  1. Virues
  2. Tron horses
  3. Local Scripts
  4. Web Scripts
  5. Worms
  6. Targeted Attacks
  7. Rootkits, etc.

These days a new trend of cross platform viruses is getting common. Some of the measures one should implement, for Linux System protection:

  1. Protect bootloader
  2. Encrypt Disk
  3. check rootkits on regular basis
  4. Protect Root with strong Password
  5. Provide correct permission to files
  6. provide proper roles to users
  7. Implement SELinux
  8. Use Antivirus
  9. Go behind a Firewall
  10. Don’t keep un-necesarry packages and programs (It may result into security Flaw).

Using Linux sensibly is secure enough. Now the question arises if Linux is architecturally so much secure than Android which uses modified Linux Kernel for mobile devices has so much security flaws, Why?

Well Android is developed in Java Programming Language and Java itself is known to have a number of security flaws. Moreover Android is very much in its child stage and will take some time to get matured.

This article was aimed to provide you with the correct information while making you aware of prevalent misconception about Linux. That’s all for now . We will soon we coming with another interesting article related to Linux and FOSS Technologies. Till then keep connected and keep Visiting Tecmint.com.

Any suggestion regarding Article and Tecmint.com is welcome on a higher note.

Share Us and Help Us To Spread

Avishek
A Passionate GNU/Linux Enthusiast and Software Developer with over a decade in the field of Linux and Open Source technologies.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

63 thoughts on “Is Linux Operating System Virus Free?”

  1. Huh, really Linux is an operating system?

    I thought It was a Kernel..

    OH I guess I need to study more

    Reply
  2. Hi,

    you have mentioned that “All windows program can be installed or uninstalled without the consent of root (Administrator).” Would you agree with it looking on Windows 7 and future versions? Could you elaborate on it? or at least point me in some direction because I would like that to be proven.

    Reply
    • @Shreya,

      I am glad that this article helped you, but may I know in what terms in has helped you, could you mention the things here so that we will also know..

      Reply
  3. After fighting virus in Windows for years, I have turned 100% Linux. I have been duel boot several years . I just last week deleted my windows partition and now have duel boot Mint and Ubuntu

    Reply
  4. Well u have said it all.u ve a major in computer science and not computer penetration.nothing made by man that cannot be penetrated.
    Try studying operating system development and u will have to re-write this article.hehe

    Reply
    • Except he clearly wrote: “To be true, No! No OS on this earth can be ever be 100% immune to Viruses and Malware.”

      Try learning how to read and write.

      Reply
      • Also, he wrote he loves to hack (ethically).
        And please tell me which school I can attend where I major in computer penetration. Sounds painful.

        Reply
        • @ Anon Do you want me to find a school to have a major in Computer Penetration, well yes it sounds painful. It would have been better if you could have understand the meaning and not just stepped in to comment.

          Reply
      • It should be
        “To be true, No! No OS on this earth can ever be 100% immune to Viruses and Malware.”

        So what i figured is an additional ‘be’ (a mistake on my part) can boil you down. Good to know.
        Thanks

        Reply
    • @ Cybrat, when i said * can not be penetrated?
      I have a major in CS and not Penetration so?

      where you want to take this discussion?

      Reply
  5. ClamAV is one worthless of an antivirus, it never found much anything, on Linux and Window$. Pretty much any other non-sinister antivirus is better.

    Reply
    • ClamAV is excellent at detecting email worms, phishing emails, average at detecting COM, EXE, macro viruses, fairly poor at detecting polymorphic viruses, unable to test boot sector viruses, unable to clean file, slow and have moderate meory usages, still it is a very young project and will take time to reach a level of maturity.

      Reply
  6. Sir,

    Superb article ,recently my android phone got affected by hidden files virus.
    then removed them using antivirus in computer only.

    can we delete the *.lnk files in phone itself.while deleting it says no permission ,as it is having only read permission when i look into the details.

    regards

    Srinivasan.K
    Asst.Professor
    Sri Venkateswara College of engg
    Sriperumbudur

    ph:9842092575

    Reply
  7. Good article but I would like to add a few points :-

    Linux has many open source software :- Most of the linux packages are open source , as many programmers have reviewed the code there is less chance of malware added to the code , moreover if there is less chances of security bugs as more people look into it.

    Windows has licensed software :- Most of good software in windows is licensed hence there is no access to source which gives the organization to add spywares and malwares in them. Moreover as licensed software is charged , most people use cracked versions of them for free which are actually been modified by hacker to add spyware and malware in them without the user knowing anything about it.

    Same points go against andriod where again people use cracked software.

    Reply
  8. There has been BADUSB malware recently.So is it possible that it can affect Linux since it targets firmware rather than OS.

    Reply
    • Actually not one. There are lots of Malicious codes and we keep our users and followers updated with such news on our Facebook, Twitter and Google+ page.

      That is why we never said Linux can’t be affected by Viruses. We just said it is not a soft target as windows is and provided solid reason in the support.

      Thanks for the acknowledgement.

      Reply
  9. Great article. The influx of FUD viruses on Windows has lead us to investigate migration from Windows to Linux (Ubuntu) company-wide.

    Reply
    • @ Ashish Negi,
      Thanks for your feedback.
      Well Linux has loads of features over windows and each of our post, just support it with a strong reason.

      Keep Connected to Tecmint.com

      Reply
  10. What a nice post to share! very informative. I would like to subscribe all posts regarding Linux. I’m a very big fan of Linux OS and it’s power. As long as there’s something about Linux, i am gonna read it so desperately!

    Reply
  11. Mr. Kumar,

    Great article, I do have one interesting question. In the realm of malware, viruses, trojans, etc. Is it possible for these threats to cross OS’s? Say for instance an author of some type of virus threat creates one on a Linux OS, then executes the virus, malware, trojan, on a network that runs primarily on Windows. I have been pondering this question and cannot seem to find an answer. In my mind, these authors who are tech savvy would use the security of Linux to protect themselves while creating and executing cyber threats. If you have any insight, I would love to hear more. Thanks

    v/r

    Chuck

    Reply
    • Dear Charles Ruffin, cross platform destructive codes are not new.
      say a destructive code written in Java will be threat equally for windows, Mac, Linux, Unix, Android or any other platform having Java.

      Hope you understand, what i mean.

      Reply
  12. Kumar,
    i am working for government and only linux we have is our DNS server.
    the network is so huge we have well over 6 000 computers on the network and a tens of servers.
    as a security engineer here i am thinking of taking the linux route due to an influx on viruses we currently experience on our AD windows environment.
    i dont have much knowledge on linux but i have a couple of linux experts that government uses now and again and have talked to them about my idea and appear to be in full support.
    what i want to ask is what will be your advice before taking on such a daunting task as we will do a lot of intergration between our windows AD and the linux.
    how much is the cost of linux if we are to run it on all workstations and have a couple servers on linux

    Reply
    • Linux is free and open source, you can have x number of Linux workstations. If you need any help please do contact us at tecmint.com (@) gmail.com

      Reply
      • thank you Ravi,
        thats what i thought as well about it being “free” but to my suprise i am told its not free we have to purchase the enterpise as the other versions dont have the full features that we will need intergrating Linux to our MS AD.
        problem is i am in Swaziland neighbour to South Africa not sure you can help much in that regards,but any help is welcome i am doing a lot of reading of late about Linux
        for further one on one chats please mail me at [email protected]
        i would greatly appreciate your help

        Reply
  13. Thanks for a great post, Now i understand the virus vs Linux thing, You made it simple to understand for a beginner like me.

    Reply
    • “Well Android is developed in Java Programming Language and Java itself is known to have a number of security flaws.”

      I’m sorry but this argument is not correct. Unlike Linux for the Desktop that failed to be a mainstream option, Android is growing on millions of new users per day.

      Java is just as safe as Windows, OSX, Flash, Javascript and any other popular platform underneath the sun that get exploited every day with new vulnerabilities exposed.

      Most of the malware found on Android today is driven (as you point out) on the interest of malware authors to find and explore end-users in some manner.

      Reply
      • Dear Nuno Brito,
        Java have security flaws and its is globally accepted, not an issue of controversy. I respect you view but cant believe it.

        Linux failed for Desktop/ Mainstream computing?
        I have said that if that would have been an issue, Linux should be the primary target, as world’s 90% server are running on Linux, and now Linux (Debian) is in space too.

        Hence popularity of a platform and targeting a platform are two different things.

        “It’s all about being architecturally strong.”

        Reply
        • Linux has failed at being a Desktop/Mainstream computing. Your argument is invalid when you state that 90% of the world’s servers are Linux. The backend server does not constitute as a Desktop/Mainstream computing.

          Most servers do not suffer from the same idiotic computing habits by users as their desktop counterparts. However, we did see a ton of Linux based server that suffered from HeartBleed, where Microsoft’s IIS was never affected.

          Reply
          • No! Linux has not failed at being a Desktop/Mainstream computing and the truth is it is coming installed by default in a number of machines. And Yeah several Linux box were affected by Viruses and will continue to get affected in future hence we never said Linux is Virus Free. But the ratio of windows and Linux Virus infection is very much uneven.

            This is not correct place for anyone other than Linux/Foss Enthusiastic. :)

    • Welcome @ Fula1, and it was very proud to hear, that our post was helpful in making you understand.

      Tecmint is working hard to make things simple for readers. Keep Connected

      Reply
  14. “Linux is so much secure in architecture that you even don’t need to go behind a firewall until you are on Network.”

    In what situation would a firewall be useful if you’re not on a network?

    Reply
    • Practically you dont need a firewall when you are not on Network.
      For this reason only Server distros viz, RedHat Enterprise Linux comes with firewall by default but not most of the Desktop distro, however you can have them install later.

      Hope this helps you.

      Reply
  15. Thanks Roopesh. I really like the simplicity with which you’ve discussed this complex issue. Am an average linux guy very keen on knowing more about Linux. Keep it up!!

    Reply
  16. Just one point, Windows Server Core runs without a GUI. Microsoft may be slow at keeping up with trends, but they usually catch on eventually. I liked the article.

    Reply
    • Windows doesn’t run on top of some shell subsystem. Ctrl+alt+delete is the best you can get. Microsoft is a way back to linux. and Mac never remained in the race

      Reply
  17. Hi..
    A very good article. It really helps in understanding the linux-virus bridge questions correctly.

    Thank you for posting this

    Reply
    • Thanks roopesh, Your Comment made us proud. You can provide us with any subject or a query on which you want an article here, we will surely try to take that in consideration.

      Reply
    • Thanks Muad for your thanks and finding this article ‘great’. We will continue to provide such useful information. Thanks for the Appreciation.

      Reply

Got something to say? Join the discussion.

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.