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.

  • fxdave@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    I deleted /lib64/ld-linux-x86-64.so.

    I did it because valgrind had a problem with it. I thought I can fix it with reinstalling the package. I tried to lookup which package is it from, but the command I used was wrong and I didn’t get any result. So I thought, what if I created it, maybe I just forgot it.

    the moment I deleted it everything stopped working. It was fixable only from a pendrive.

  • ThetaDev@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    3 months ago

    Attempting to resize the system partition without backing the system up first (right after I spent the whole day setting everything up). Gparted failed, the system did not boot any more so I had to stay up the night to redo the whole setup. No personal data loss since the system was fresh, though.

    Since I got into Linux via virtual machines and Raspberry Pi before using it as my daily driver, I made most of my stupid beginner mistakes (like changing permissions on systen files) where it did not really matter.

  • sexy_peach@beehaw.org
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    formatted the wrong drive. I had to run a data rescue program which gave a bajillion files with random names…

  • Hyphonical@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 months ago

    Probably removing the default python 2 runtime environment because i didn’t like how running python redirected to python2.7, had to reinstall my system 4 times in a year, 4th one is currently happening. 🥲

  • nexussapphire@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months 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!

    • flubba86@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

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

  • luciferofastora@lemmy.zip
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    3 months ago

    I footgunned myself with iptables once and couldn’t even google how to fix it. (Well, I could with my phone, just not the convenient google - copy - paste - run workflow)

    I don’t remember the details, but I was trying to control internet access of a VM guest and ended up controlling my own too.

  • Kangie@lemmy.srcfiles.zip
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    I once spent a month automating the production of repositories for each kernel version supported on our HPC and rested every step exhaustively in isolation.

    When I was satisfied I ran it with root permissions and hosed the VMs it was running on because a recursive chmod evaluated to /.

    Oops.

  • vluz@kbin.social
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    Messing around with system python/pip and newly installed versions till all was broken and then looking at documentation.
    This was way back on the 00’s and I’m still ashamed on how fast completely I messed it up.

  • konsn@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    2 months ago

    One time on Manjaro i had a dependency issue regarding python3. So i just removed it. The I watched in horror as i saw what packages depend on python3, including pacman and manjaro-system, but did not dare to interrupt the process and end up with a half-broken system, and my curiosity wanted to see it play out. Then I rebooted, and thus legally turned my Manjaro system into a half-working Arch install. It even displayed the OS as Arch Linux. Still managed to fix it without reinstalling by downloading the package files from http mirrors, but if i was smart the entire thing should have taken 5 minutes instead of a full afternoon. Was a valuable learning experience tho

  • uzay@infosec.pub
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    I have a faint memory of once uninstalling python2 on an Ubuntu system trying to switch to python3. That was a fun learning moment.

  • Macros@discuss.tchncs.de
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    3 months ago

    Run sudo apt dist-upgrade -y right after an upgrade to the Kubuntu 24.04 beta on a semi production system.

    This is right after the xz thing happened. Also while Ubuntu made the t64 migration (Replaced packages with a 32 time variable with a 64 bit one, the packages are renamed. E.g. lib2geom1.2.0 to lib2geom1.2.0t64)

    Packages based on the compromised xz had been removed from the repositories, but I already had some newer ones installed which where dependent on them. Also they already wanted the packages with the t64 addition, which by now where nowhere present in the system.

    So dist-upgrade did what it could to upgrade 5 packages and bring the system into a consistent state: It uninstalled half of the system including some somewhat essential packages.

    I noticed one of them scrolling by and hit CTRL+C. Afterwards I had the choice of saving the data and restoring from a backup a few weeks ago, or to patch it up by hand. So I did the second and created transitional packages like an empty lib2geom1.2.0t64 which depends on lib2geom1.2.0 which was in the repositories back then. 20 of these later I could install packages to get the GUI somewhat working and now weeks later all the t64 migrations are back in the repos and the system is fully functional again :)

    Lessons learned:

    • Be very careful with dist-upgrade
    • Manually trigger a backup before a release upgrade

    In now upgrade with
    sudo apt-get update && sudo apt-get upgrade -yV && read -p "Flatpak Update? (yj/n): " choice && [[ $choice = [YyJj] ]] && sudo flatpak update --noninteractive
    and equivs-build ( sudo apt install equivs) came in really handy in building the transitional packages fast.

  • MrShankles@reddthat.com
    link
    fedilink
    arrow-up
    0
    ·
    2 months ago

    I just finished doing a fresh install this morning, because my wifi card wasn’t working. It honestly needed to be done anyway because I was out-of date, but the wifi card finally got me to back-up all my data and do it.

    Fresh install, and wifi still won’t even toggle-on. Was about to look for manual install of the driver, and so on and so forth… and then I noticed my folly

    Fucking keyboard has a toggle switch to turn the wifi off. Not the worst and glad I didn’t pull my hair out over it, but damn… felt pretty dumb this morning