Upvote!
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
oriond@lemmy.ml to Asklemmy@lemmy.ml · 1 year ago

What is the most destroying command you can type in the Linux terminal?

message-square
message-square
142
fedilink
155
message-square

What is the most destroying command you can type in the Linux terminal?

oriond@lemmy.ml to Asklemmy@lemmy.ml · 1 year ago
message-square
142
fedilink
  • Ruscal@sh.itjust.works
    link
    fedilink
    arrow-up
    57
    ·
    1 year ago

    sudo chmod 000 -R / is very fun way of braking your system and is not widely known 🙂

    • Suburbanl3g3nd@lemmings.world
      link
      fedilink
      arrow-up
      8
      ·
      1 year ago

      Can you recover from that?

      • utopianfiat@lemmy.world
        link
        fedilink
        English
        arrow-up
        14
        ·
        1 year ago

        I imagine if you can mount from a busybox possibly

        • grabyourmotherskeys@lemmy.world
          link
          fedilink
          arrow-up
          8
          ·
          1 year ago

          Then figure out the correct perms.

          • CalicoJack@lemmy.dbzer0.com
            link
            fedilink
            arrow-up
            13
            ·
            1 year ago

            Eh, just hit it with the 777 and pray. Then swear at it some more.

            • rattking@lemmy.ml
              link
              fedilink
              arrow-up
              5
              ·
              1 year ago

              deleted by creator

              • LrdThndr@lemmy.world
                link
                fedilink
                arrow-up
                4
                ·
                1 year ago

                Boot from a usb stick, mount the fs, use the live environment’s chmod command to fix stuff.

            • nixcamic@lemmy.world
              link
              fedilink
              arrow-up
              4
              ·
              1 year ago

              I think you’ll need to change passwd and shadow, maybe a few other files, but besides that it’ll mostly work.

            • grabyourmotherskeys@lemmy.world
              link
              fedilink
              arrow-up
              2
              ·
              1 year ago

              This is the traditional method.

          • utopianfiat@lemmy.world
            link
            fedilink
            English
            arrow-up
            4
            ·
            1 year ago

            Yeah that’s the painful part. A backup would be key here

            • intensely_human@lemm.ee
              link
              fedilink
              arrow-up
              1
              ·
              1 year ago

              Worst case you boot up a virtual server with the same OS as your own and just go down the tree learning permissions, and it’s a deep dive learning experience.

      • fossphi@lemm.ee
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        chroot in and then syncing the permissions from something like the equivalent of filesystem package in Arch for your distro should get you going

    • oriond@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      What does this do? nobody can read any file? would sudo chmod 777 fix it at least to a usable system?

      • Ruscal@sh.itjust.works
        link
        fedilink
        arrow-up
        11
        ·
        1 year ago

        The trick is that you loose access to every file on the system. chmod is also a file. And ls. And sudo. You see where it’s going. System will kinda work after this command, but rebooting (which by a coincidence is a common action for “fixing” things) will reveal that system is dead.

      • d3Xt3r@lemmy.nz
        link
        fedilink
        arrow-up
        10
        ·
        1 year ago

        Yep. You could run chmod again to fix it (from a different OS / rescue USB), but that would leave all the permissions in a messy state - having everything set to 777 is incredibly insecure, and will also likely break many apps/scripts that expect more restrictive permissions. So the only way to fix this properly would be to reinstall your OS/restore from backups.

      • Techlos@lemmy.dbzer0.com
        link
        fedilink
        Akan
        arrow-up
        4
        ·
        1 year ago

        How are you gonna run chmod when you don’t have permissions to use it anymore?

    • Skull giver@popplesburger.hilciferous.nl
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      1 year ago

      deleted by creator

Asklemmy@lemmy.ml

asklemmy@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !asklemmy@lemmy.ml

A loosely moderated place to ask open-ended questions

Search asklemmy 🔍

If your post meets the following criteria, it’s welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

  • !lemmy_support@lemmy.ml
  • !fediverse@lemmy.ml
  • !selfhosted@lemmy.world

Looking for a community?

  • Lemmyverse: community search
  • sub.rehab: maps old subreddits to fediverse options, marks official as such
  • !lemmy411@lemmy.ca: a community for finding communities

Icon by @Double_A@discuss.tchncs.de

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1.13K users / day
  • 3.28K users / week
  • 7.02K users / month
  • 19.6K users / 6 months
  • 1 local subscriber
  • 47.9K subscribers
  • 6.95K Posts
  • 360K Comments
  • Modlog
  • mods:
  • Evan@lemmy.ml
  • mekhos@lemmy.ml
  • tmpod@lemmy.pt
  • OrangeSlice@lemmy.ml
  • BE: 0.19.6
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org