linux isnt immune to viruses even though its not as bad as windows

what should i do to be safe if i have a safe browser, vm, but pirate and download risky things? i know its a vm but i still dont want to have to delete everything in the vm if something happens. also the malware doesnt go to the router and spread rigt???

  • gandalfthewhite@lemmy.ml
    link
    fedilink
    arrow-up
    6
    ·
    23 hours ago

    Honestly the biggest things are don’t run shit as root and don’t expose port 22. Especially don’t run things you downloaded from some website as root but in general just don’t run things as root. That’ll handle most problems that are likely to arise.

    • data1701d (He/Him)@startrek.website
      link
      fedilink
      English
      arrow-up
      1
      ·
      55 minutes ago

      I’ll also add that if you do enable SSH and are stupid enough to expose port 22, then at least make sure you have key-based authentication instead of password authentication and keep your keys safe.