Hi there,

Win10 is soon not supported. Tbh Linux have been on my radar since I started to break from the US big tech.

But how is security handled in Linux? Linux is pretty open-source, or am I not understanding it correctly. So how can I as a new user make sure to have the most secure machine as possible?

  • /home/pineapplelover@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    9
    ·
    edit-2
    2 hours ago

    There’s a lot of people with the idea that open source can’t be secure because people see the source code.

    But imagine this. You have 2 locks, one that is completely viewable of the innerworkings, and another that is covered, both have been unbreakable, but could you imagine the balls on the guy that made the clear lock? Imagine feeling so confident that your lock was clearly the best, that you just expose it to any hacker ever and they still can’t get in.

    Microsoft can barely get things working with their closed source code.

    In reality, anything is exploitable and hackable eventually. With the open source community there are so many eyes on it that when someone notices that the program is running 2 seconds slower than it used to, they discover a vulnerability instead of just accepting it and saying “probably MS doing some BS” and dealing with it.

  • communism@lemmy.ml
    link
    fedilink
    arrow-up
    5
    arrow-down
    1
    ·
    edit-2
    2 hours ago

    To be honest, security in the desktop Linux space has traditionally been a bit shit.

    Since you’re new, it’s important for you to understand that Linux is a kernel. That’s the most low-down part of your operating system that handles your OS talking to your hardware and vice versa. Linux is not a full OS; it doesn’t provide any userspace tools that an OS provides. That’s why people don’t install Linux on its own, but they install Linux distributions, which are full OSes using the Linux kernel that come with more or less software to make Linux a complete OS, or at least bootable. That means that there is no one way to do things in Linux. There are some Linux distributions that are security-focused, such as Qubes OS and Alpine Linux. There’s also the new immutable distros, which provide security because the entire OS is defined declaratively, meaning you can easily rollback changes, and it’s harder to get infected with malware on those systems. There’s a lot of variability. Some systems are quite secure by default. A lot of other systems do not set up any security measures by default and expect the user to do that.

    If you’re interested in hardening your Linux install, I would recommend the Arch wiki’s security page which has a lot of good advice.

    Security is a really broad topic and the relevant security measures for you are going to vary based on your threat model. General good practices include using some form of MAC, setting up a firewall, don’t install random crap you don’t need (and if you are getting software from somewhere that isn’t vetted, e.g. the AUR, you should vet it yourself—e.g. if you use the AUR, learn to read PKGBUILDs), use full-disk encryption. Anti-virus software is largely not necessary on Linux, especially if you only install software from your package manager and follow other security good practice.

  • BCsven@lemmy.ca
    link
    fedilink
    arrow-up
    13
    arrow-down
    1
    ·
    4 hours ago

    Microsoft being closed source hides their bugs and vulnerabilities. Even when security researchers have sent in reports MS has sat on them due to profit being motive not security, and not taking vulners seriously until the researchers say screw that and publish it.

    Linux being open can have all eyes on it, and if there is an exploit, there is a community willing to help ASAP.

    On many distros you may have weekly or even daily updates or patches coming through with fixes. A distro like OpenSUSE has various patch and list patch commands that show what security patches are avilailable, their status (critical, recommended) and if it’s needed on your system or not depending on what you have installed. You don’t get transparency on closed source systems.

    If you are paranoid about security you can use AppArmor tools or SELinux. AppArmor can be set to learn his an app behaves, then you lock it so the app can’t do new things.

    SELinux you set rules for files and folders, so even with remote access an attacker can’t access data if rules don’t allow file listing over SSH etc

  • arsCynic@beehaw.org
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    2 hours ago

    So how can I as a new user make sure to have the most secure machine as possible?

    • Always use uBlock Origin in a Firefox-based browser (e.g., LibreWolf, Zen).
    • Never click on links in communication of any kind you didn’t expect or is too good to be true.
    • Never reinstall Windows.

    arscyni.cc: modernity ∝ nature.

  • infjarchninja@lemmy.ml
    link
    fedilink
    arrow-up
    24
    arrow-down
    1
    ·
    5 hours ago

    When my kids were in their teens they had windows machines.

    They had windows machines, because all their friends had windows machines.

    you know what kids are like, click on every thing. oblivious to danger.

    malware, viruses, the lot. of course, good old idiot dad had to sort it out. spending hours running anti-virus programs and malwarebytes etc

    I got really annoyed one day and while they were at school. I totally removed windows and installed linux mint xfce on both their machines.

    Set everything up for them exactly how I used my linux machine.

    Once they were online, had their web browser open, found they could login in to all the things they liked and still enage with their friends.

    I never heard a peep from them. no more anti-virus scans or malware.

    It was heaven.

    Ive used Linux for 20 years and never had a virus.

  • transscribe7891@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    1 hour ago

    I used to use ClamAV, but not sure I noticed much of a difference, so haven’t really used any antivirus software for a while now. Curious what people in this thread think of clam.

    • Nilz@sopuli.xyz
      link
      fedilink
      arrow-up
      1
      ·
      11 minutes ago

      ClamAV looks for signatures of known viruses, most of which target Windows and not Linux. So it’s debatable how much more secure you really are by running ClamAV

  • spaghettiwestern@sh.itjust.works
    link
    fedilink
    arrow-up
    10
    ·
    edit-2
    5 hours ago

    I’ve used Linux Mint and other distros daily for more than 10 years. Never had a virus or malware issue and don’t even run antivirus software.

    During that same time I’ve had to help friends remove viruses and malware from their Windows machines dozens of times. The latest Windows disaster I’ve assisted with was a few months ago. A retired friend had her Windows 10 machine hijacked and $8K stolen from her savings account. Making sure the malware was removed required hours of work formatting the drive and reinstalling Windows.

    IMO you are far safer with a plain vanilla Linux install that you are with Windows, no matter what steps you take to secure your Windows installation.

    • Mihies@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      3 hours ago

      You sure though? Windows has more viruses because it’s more popular (desktop) and monolithic, not because Linux is much better in that regard. IOW Linux is not magically virus resistant. If you run an infected file, it will infect both without much trouble. Also removing infection would be similar. At least that’s my understanding.

      • spaghettiwestern@sh.itjust.works
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        39 minutes ago

        You sure though?

        What do you want? It should go without saying that I am absolutely sure of my own experience.

        In probably 15 years total of running Linux I have not had a single problem with malware or viruses. Part of that time was also running Windows regularly and my Windows systems DID become infected with both malware and viruses occasionally, despite my best efforts. And you’re not mentioning the fact that Linux runs on 63% of the server market and those systems are under constant attack.

        Reports of Linux system infections are truly rare, and considering the nature of the user community would be widely and loudly reported if they were happening.

        Do you have any experience in this matter? Have you had your own Linux installations infected, or are you a Windows user questioning what you’re reading? (Perfectly reasonable the 2nd one’s the case.) Please fill us in on the details.

      • DiamondOrthodox@lemmy.ml
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        2 hours ago

        It’s hard enough getting legit software in general to work on Linux. Even if a virus was written for Ubuntu, it is likely not going to run on Fedora, or Arch, or even downstream/upstream versions of Ubuntu.

        Edit: Although thinking about it, Linux terminal commands are pretty universal, so if you manage to execute a script or terminal command as root or sudo then I guess it could apply to multiple distros.

  • Ulrich@feddit.org
    link
    fedilink
    English
    arrow-up
    3
    ·
    4 hours ago

    Most of the security is in the kernel so you can make sure you have the latest kernel. Also secureblue is a security focused distro that makes use of GrapeneOS’s hardened malloc so that’s the most secure one that I’m aware of.

  • deadcade@lemmy.deadca.de
    link
    fedilink
    arrow-up
    47
    ·
    7 hours ago

    Security is an insanely broad topic. As an average desktop user, keep your system up to date, and don’t run random programs from untrusted sources (most of the internet). This will cover almost everyones needs. For laptops, I’d recommend enabling drive encryption during installation, though note that data recovery is harder with it enabled.

      • procapra@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        20 minutes ago

        Why not? You (usually) just click the check box during install, and you have 1 extra password when you boot up your system. Doesn’t seem too hard but I might be missing something.

    • Tanoh@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      4 hours ago

      That is good advice, however sadly a lot of install scripts are basically: download this script from us, and pipe it to a root shell.

  • Ephera@lemmy.ml
    link
    fedilink
    English
    arrow-up
    21
    ·
    6 hours ago

    I just want to say that you’re probably worrying too much about it. Of course, there is lots of things one can do to improve security (which the others here are listing dutifully) and it is foolish to just assume that one’s computer is entirely secure, because as a user, you will always have the ability to bypass that.

    But there’s a pretty firm consensus in the IT industry that Linux is more secure than Windows. And that the popular Linux distributions are more trustworthy organizations than Microsoft.

    So, it’s good to inform yourself, but if you survived on Windows, you at least should not worry about the Linux side of things. It’s more than fine.

  • Johannes Jacobs@lemmy.jhjacobs.nl
    link
    fedilink
    arrow-up
    11
    ·
    edit-2
    7 hours ago

    As others have said, Linux Security is a very broad topic. But the main thing is keeping your system updated, only install packages from your distro’s repositories, install a firewall and don’t install anything you don’t need should go a long way :)

    For example, i use Alpine Linux as a desktop OS. This means i only install packages through apk, from the Alpine repositories. I run apk update and apk upgrade commands every friday. I use Flathub for most desktop software which i also update weekly. (To be even more secure, only install verified flatpak’s). my firewall has no incoming ports open (really not needed on my desktop). And i keep myself updated with the latest news regarding Alpine Linux, and Linux in general. So i am aware of most vulnerabilities as they are published. This is a pretty secure system.

    Later on if you want even more security you can start following the CIS guidelines for your favorite distro, but the above should be a good start.

    But good security is not just jeeping your system updated, it also means you have good backups in place, in case randsomware hits your system. And then there’s also the monitoring of your system for suspicious behaviour :) But these are far more advanced topics!

  • Sunoc@sh.itjust.works
    link
    fedilink
    arrow-up
    7
    ·
    edit-2
    7 hours ago

    Great to hear you’re willing to move to Linux!

    Like other comments pointed, there is no such thing as “most secure”. It’s a deep rabbit hole and it’s better in general to assume that any device connected to the internet is at risk. Hell, any storage can be compromised if the entity interested put enough effort into it.

    I recommande reading the page on Privacy Guides, it gives a good overview. In general, you should consider your thread model: what is you situation and why do you want security or privacy for?

    • Regarding security, I would say for a general case, any modern, popular Linux distro with full disk encryption is probably good enough and as secure as any other OS. I would recommande going with a Fedora Silverblue or an OpenSUSE Tumbleweed, but the more popular Ubuntu or Mint are great as well for new users.
    • If you also want “good enough” privacy, you should focus more on the software you are running, and the situation of your data, especially in your usage of your web browser. But that’s a different topic entirely.
    • If you actually want more advanced security though, that’s where it becomes difficult/fun. You need to consider what you are trying to protect yourself from, specifically. Virus? Maybe a compartmentized OS like Qubes might be a solution. Physical access to your device? You can get a dead man switch that kills you system disk if your laptop is taken away from you. You want to hide your OS install from a security inspection? You can set a deniable full disk encryption with a facade OS that protect your from a rubber hose attack. Probably many other things exist I am not aware of.

    But anyway, if your question is “Is a Linux distro at least as secure as my previous Windows”, the answer is definitely YES imo. And if you want MOAR, it’s gonna be a fun ride!

    [edit: and yes, updates! Update you system plz.]

  • muusemuuse@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    4 hours ago

    Windows has a lot of shit to second guess the user. Linux doesn’t. Linux doesn’t babysit you. It has some guardrails but the general idea with Linux is it’s your computer, it will do what you tell it do, even if it’s a bad idea. This makes things lighter, faster, more private, but it has also led to security incidents.

    Windows and Mac will watch what you are doing. If they see something suspicious, the security software can jump in and telemetry means they can notice patterns as new malware appears on their users machines. This makes the machines slower and heavier and less private, but also easier for users to deal with because they doesn’t have to actually know anything. They can just buy their way out of a problem with superdupertotallaylegitantivirus2025pro.

    Anyone who says Linux doesn’t get viruses is lying to you. It does. They all do. But it’s not that common because Linux is a smaller market share so most nefarious people won’t waste their time on a smaller target unless there is something that specific target has they want. So old people using fedora kinoite to access email and facebook are fine, but Pete Hegseth watching ignoring security practices and visiting shady sites is probably a worthwhile target and could be vulnerable.

    Linux has major advantageous over the industry approach of “we know best” but it also has disadvantageous. If you are the kind of person who wants to learn and improve and grow, Linux could work for you. If you are more the irresponsible buy-someone-else’s-solution-to-my-problems type, it’s not.

  • Auster@thebrainbin.org
    link
    fedilink
    arrow-up
    4
    ·
    7 hours ago

    One of the tips I’d give is the same for Windows, the best anti-virus is the user to know what he/she is doing. Linux is a better in that regard because it obfuscates very little, unlike Windows.

    Also in line with viruses, given how many variants of a base system there can be, unless the virus is compiled in your machine, to my knowledge chances are higher for a virus to fail to function properly, or even at all. A way for a coder to circumvent it would be to bloat the code with system-specific instructions, which would be harder to create and optimize, but if a big enough group in resources take on the challenge, it could potentially be achieved.

    On another point, something I expect to become a problem in Linux is that you need the admin’s password, which is pretty much the master key of the system, for way too many things, even to install a web browser or the equivalent of 7-Zip. With scams usually involving social engineering, having the user hand a key from a system that depends mainly on it makes the system far more vulnerable.

    Now, given Windows is still the bigger desktop system, scammers and virus distribution still focus on it, but as Linux grows, more ill-intended people may focus on it.

    But still, Windows has far less variants, barely anything there uses passwords or more adninistration-oriented safelocks, and is much worse for troubleshooting (and having used most systems from 98FE onward, I also think it’s getting worse), so I’d say Linux still has the advantages in those points I could think of.

    • Aelyra@lemmy.ml
      link
      fedilink
      arrow-up
      5
      ·
      7 hours ago

      Also in line with viruses, given how many variants of a base system there can be, unless the virus is compiled in your machine, to my knowledge chances are higher for a virus to fail to function properly, or even at all.

      Cross-platform malware does exist, and one of the most common and practical forms is malicious browser extensions. A harmful Chrome or Firefox add-on can function just as effectively on Linux as it does on Windows.

      On another point, something I expect to become a problem in Linux is that you need the admin’s password, which is pretty much the master key of the system, for way too many things, even to install a web browser or the equivalent of 7-Zip. With scams usually involving social engineering, having the user hand a key from a system that depends mainly on it makes the system far more vulnerable.

      Multiple types of dangerous malware can run on Linux without requiring root privileges. As previously mentioned, malicious browser extensions pose a significant threat. Harmful actions like deleting files or logging keystrokes can also be carried out using a Python script that doesn’t need root access.

      Linux is undoubtedly more secure than Windows for a variety of reasons, but Linux users should still remain cautious. No system is completely invulnerable.