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.

  • taaz@biglemmowski.win
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    7 months ago

    Removed and apt purge’d python2 package.

    Pity debian folded in on itself and dpkg required it at the time for something so that wasn’t an easy one.

    • embed_me@programming.dev
      cake
      link
      fedilink
      arrow-up
      0
      ·
      7 months ago

      Similar thing in ubuntu, something required a newer python version than the system installed one. I thought I’ll uninstall the old one bcoz why have two versions. Ended up reinstalling ubuntu.

  • Aniki 🌱🌿@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    ·
    7 months ago

    I once tried to restore replication on a broken MySQL cluster by restoring the backup on the only good, running node.

  • Yuki@kutsuya.dev
    link
    fedilink
    arrow-up
    0
    ·
    7 months ago

    Tip: don’t put important things in just 1 place.

    That aside!

    Years ago when I first tried out Linux (I was around the age of 10), I didn’t really pay much attention while installing Linux back then, so I wiped my entire data disk D:…

    • Random Dent@lemmy.ml
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      7 months ago

      I like the 3-2-1-1-0 backup rule personally.

      tl;dr:

      • 3 copies of your data
      • on 2 different media
      • at least 1 offsite copy
      • 1 copy offline (preferably air-gapped)
      • 0 errors (IE verified backups)

      (For the super important stuff, obviously. I’m more lax about other things.)

  • bionicjoey@lemmy.ca
    link
    fedilink
    arrow-up
    0
    ·
    7 months ago

    Not me but a colleague of mine wrote a bash script that had something like this and ran it on a server:

    FOO="/home/bar"
    
    ... Many lines later ...
    
    rm -rf $FOOT/*
    
  • boredsquirrel@slrpnk.net
    link
    fedilink
    arrow-up
    0
    ·
    7 months ago

    I once just uninstalled sudo and replaced it with doas. Turns out, the shutdown process needs sudo and a lot more. So I am still using my system since then, without shutting down.

    No joking, I use Fedora Atomic and can not break my system… unless you mess up your dotfiles, and a lot more.

    I also put a drive into my /etc/fstab once without the nofail argument.

    No idea why that is not set by default, but when removing that drive my system couldnt boot and I exited to a very scary dracut shell.

  • boredsquirrel@slrpnk.net
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    7 months ago

    I tried to install an OS to a USB stick. This is Kubuntu specific.

    You need to create a GPT partition on the stick, then you should be able to just use the installer and install on another USB stick.

    I went through it, selected the usb stick… was not sure if everything was right and went a menu back, was correct, went forth again, past the install target selection and installed.

    Well… turns out the Kubuntu installer (Calamares) selects the first disk always. And that selection seems to reset to default when going a menu back…

    I deleted my complete normal disk, with like everything I had.

    No Backup no mercy. Luckily did one only a few weeks before. The first since half a year! Damn… had my uni stuff on Nextcloud, a lot of personal stuff synced to my phone with syncthing.

      • boredsquirrel@slrpnk.net
        link
        fedilink
        arrow-up
        0
        ·
        7 months ago

        I mean if you actually want to overwrite the main SSD this is okay. Calamares is very nice too.

        Kubuntu stays on Plasma 5 forever so I highly recommend against it. There are many bugs that will not get fixed, the fixes are only in Plasma 6.

        I recommend Fedora Kinoite. Use Flatpaks, layer the packages you dont need. Add rpmfusion and layer libavcodec-freeworld to get video playback working.

        I broke all KDE distros, Kubuntu included. I wouldnt use anything other than Fedora Kinoite, nor want to maintain that mess. Have a look at my latest post for some explanations.

          • boredsquirrel@slrpnk.net
            link
            fedilink
            arrow-up
            0
            ·
            7 months ago

            Yes it is stable. Stable means you ship packages that dont change. Which in general is a really bad idea if you want your issues to be solved.

            The timing was just really bad, as Plasma6 now is perfectly usable. Bad decision if you ask me.

            At least on Fedora Plasma6 is really good.

              • boredsquirrel@slrpnk.net
                link
                fedilink
                arrow-up
                0
                ·
                7 months ago

                It is a very experimental repackaging of Fedora, ripping out SELinux and replacing that with Apparmor, which will be way less secure as it is not the focus. They add a ton of custom stuff but the Distro is still mutable.

                If you want that amount of tweaking, I recommend Bazzite. There you will have reproducible bugs and rollbacks.

  • ulkesh@beehaw.org
    link
    fedilink
    English
    arrow-up
    0
    ·
    7 months ago

    Renamed a drive mount folder, while it was mounted. Back in 1999 with big box Redhat 5.1, it said “okay!” And I lost all data on that drive. I was just learning Linux at the time, without an internet connection since the PCI winmodem I had didn’t work in Linux.

  • groet@feddit.de
    link
    fedilink
    arrow-up
    0
    ·
    7 months ago

    Can’t remember exactly what happened but it involved changing permissions on /bin /sbin and similar. You know for security …

    In the end I didn’t have permissions to run chmod, su or sudo

    Fortunately there is little that can’t be fixed by booting from a live image.

  • phanto@lemmy.ca
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    7 months 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.

  • Corroded@leminal.space
    link
    fedilink
    English
    arrow-up
    0
    ·
    7 months ago

    Mostly powering off my system when I shouldn’t have. I believe one time I began the process to format a drive I didn’t mean to and when I saw the process had started I pushed the power button and just made things worse. The other times were when I was updating.

    This all happened when I first started using Linux.

    • Yuki@kutsuya.dev
      link
      fedilink
      arrow-up
      0
      ·
      7 months ago

      Lmao, completely unrelated but back in the early 2000s, I played a lot of runescape. I got attacked by another player and pulled the power cord, smirking and thinking I successfully escaped. I didn’t lmao.

  • macniel@feddit.de
    link
    fedilink
    arrow-up
    0
    ·
    7 months ago

    I distrohopped once and wanted to try OpenSuse Tumbleweed. Would have went really well if I didn’t by accident deleted all my partitions…

    I lost all of my curated music files I gathered over the span of the last 15 years.

    I’ll never get those back.

    • pipe01@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      7 months ago

      Probably too late now lol, but you can totally recover deleted files if you don’t overwrite them. I recommend the System Rescue image, it has a lot of tools to deal with these things.