I've just started my journey in Linux by installing Ubuntu 20.04 LTS, trying to learn about it's file system and working method and faced a question that why a normal user doesn't face any virus issue although the file system is so open, searched a lot about it but didn't get any satisfactory result about it. finding an appropriate answer for this question.
-
You may find this interesting: https://askubuntu.com/questions/565626/ubuntu-vs-windows-virus-definition – Lorenz Keel Oct 23 '20 at 08:15
-
Hey Yogesh! Do read this as well: https://askubuntu.com/q/10373 – Random Person Oct 23 '20 at 08:16
-
Or, better yet, this: https://tldp.org/LDP/intro-linux/html/sect_03_04.html – blade19899 Oct 23 '20 at 08:17
1 Answers
Infecting Linux with virus is not hard at all, any file can harm you, for example, launching .jar (java) files can infect and give control to attacker on your system, .sh (shell) files can give attacker ability to execute commands on your system, saying Linux is better than windows because windows have viruses is non-sense
There is few reasons what makes Linux more "protected"
Windows users is more than Linux users, that makes windows main target, statistics says that less then 1% uses Linux as main operating system, so that makes Linux less interesting.
infecting Linux is not enough to do anything on system, Linux have security policies and strict privilege basis, and ubuntu and other Linux systems patch vulnerabilities quickly that might attacker use to escape privileges of current user. and experienced user doesn't run files with root user unless it's not necessary.
it's more easy to spread virus in windows, windows runs tons of services and processes which virus can use to inject itself in that process/service, also in windows, just clicking on yes is enough on simple dialog is enough to get full privileged access,
Linux does not encourage 'automatic' actions, and automatic actions are biggest help to virus writers. For example, in DOS or Windows, a file having .exe extension ‘automatically’ gets right to execute. In Linux, you need to change the attribute of file to get executable permission.

- 1