I’m working on a some materials for a class wherein I’ll be teaching some young, wide-eyed Windows nerds about Linux and we’re including a section we’re calling “foot guns”. Basically it’s ways you might shoot yourself in the foot while meddling with your newfound Linux powers.

I’ve got the usual forgetting the . in lines like this:

$ rm -rf ./bin

As well as a bunch of other fun stories like that one time I mounted my Linux home folder into my Windows machine, forgot I did that, then deleted a parent folder.

You know, the war stories.

Tell me yours. I wanna share your mistakes so that they can learn from them.

Fun (?) side note: somehow, my entire ${HOME}/projects folder has been deleted like… just now, and I have no idea how it happened. I may have a terrible new story to add if I figure it out.

  • @[email protected]
    link
    fedilink
    6
    edit-2
    1 year ago

    Not too long ago, on a Slackware box I needed to manually change glibc to another version. No problem, I thought, just remove the version that’s there and install the package for the version I needed. So removepkg glibc and then immediately dawned on me… oh wait I really didn’t want to do that… Of course, after that installpkg and pretty much everything else was broken since pretty much everything either depends on glibc, or has a dependency that depends on glibc, so I couldn’t install the new package or do pretty much anything other than smack my forehead.

    Wasn’t actually too big of a deal to fix. Used another computer to create a bootable USB stick with the Slackware installer, booted the computer with the USB stick, and did some chroot trickery to reinstall the old glibc package again. Then booted it back up normally and used upgradepkg to change glibc like I should have in the first place.

  • Kawawete
    link
    fedilink
    31 year ago

    Breaking the bootloader, uninstalling nvidia drivers ton install mesa without removing mesa/nouveau from the blacklist

  • @[email protected]
    link
    fedilink
    English
    41 year ago

    Mounted root to a game folder on home and sudo rm -rf ~/games/* because I accidentally copied the home folder into the games subvol which turned out to be the root subvol. Thanks btrfs!

    • @[email protected]
      link
      fedilink
      91 year ago

      BTRFS: yo dawg, we heard you like partitions, so we put partitions in your partitions, so you can mount it inside your mounts.

      • @[email protected]
        link
        fedilink
        English
        11 year ago

        I really like the idea of partitions without fixed sizes. I know it’s not the same but just as useful when you reinstall your system.

  • @[email protected]
    link
    fedilink
    12
    edit-2
    1 year ago
    • apt something that ended up removing sudo. No more admin rights.
    • used rsync to backup pretty much everything in / , with remove source option…
    • find with -delete option miss positioned. It deleted stuff before finding matching pattern
    • chown / chmod on /bin and/or /usr/bin
    • Removed everything in /etc
    • @[email protected]
      link
      fedilink
      31 year ago

      On the first point: isn’t it possible to just go su and reinstall sudo?

      Or does it not work with disabled root?

      • @[email protected]
        link
        fedilink
        6
        edit-2
        1 year ago

        It doesn’t work with root disabled.

        The way to fix this is to boot in bash recovery where you land a root shell. From there you can hopefully apt install sudo if deb file is still in cache. If not, you have to make network function without systemd for apt install to work. Or, you can get sudo deb file and all missing dependencies from usb stick and apt install them from fs. Or just enable root, give it a password and reboot so you can su - and apt install sudo

  • @[email protected]
    link
    fedilink
    91 year ago

    My buddy was in a class doing a programming test. It was a couple minutes until turn in time, so he went to zip up the source files. He had already ran the appropriate zip command previously, so he pressed up three times and then enter. It appears he had miscalculated, because the command that ran was rm *.c. There were no backups.

    • Chris L
      link
      fedilink
      English
      51 year ago

      Red Hat was the first Linux I installed, about 24 years ago, and got hooked. Switched to Ubuntu about 19 years ago, and have used nothing but Debian and derivatives since. I’ve attempted Fedora a few times, but could not convince myself to stick to it.

  • @[email protected]
    link
    fedilink
    51 year ago

    I’ve reinstalled a few times throughout the years, simply because I didn’t want to deal with fixing something, mainly a bloated mess with multiple desktops. Sometimes it’s faster to back up home and nuke it from orbit.

  • Laura
    link
    fedilink
    161 year ago

    dd if=/dev/zero of=/dev/sda status=progress

    hmm why is it so fast

    OH

    CTRL-C

    and then a kernel panic yeah my fs was gone

  • @[email protected]
    link
    fedilink
    4
    edit-2
    1 year ago

    Trying to add my user to wheel: sudo groupmod -a wheel Deleted my group membership in everything but wheel. That was fun! Remote system too! Edit: I still don’t remember the syntax. Geez.

  • Norgur
    link
    fedilink
    51 year ago

    Added an usb drive by its /dev/sd** identifier to fstab without the nofail option. Wanted to do a quick reboot for something I can’t remember, then copy the files over to the USB drive, since I’d need them on the next day and… no boot. The reboot had assigned another name to the drive (/dev/sdb instead of /dev/sdc or something) and automount wouldn’t skip it because nofail was missing. In the middle of the night, with files I required right the next morning. Fun times.

  • OADINC
    link
    fedilink
    61 year ago

    I was running a Vanilla+ Minecraft server and was wondering why my plugin was not working. I had forgotten to unzip it before uploading it to the Ubuntu server vm and didn’t know how to unzip on Linux. So I just unzipped it in windows and re transferred the file. Yaay RSync.

    Otherwise just basic mistakes command in the wrong folder type of stuff.

  • @[email protected]
    link
    fedilink
    41 year ago

    Getting packages from a spider web of repos then not untangling the web before upgrading from one LTS release to another. Ended up with an unfixable problem with essential packages and dependency versions and had to do a fresh reinstall instead. Fortunately I backed up my files first so I didn’t lose anything important.