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.

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

  • inetknght@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    5 months ago
    1. have an nvidia GPU

    2. have Fedora

    3. download RPM package of drivers for Red Hat (after all, Fedora and Red Hat are… compatible, right?)

    4. Everything goes fine

    5. Six months later, upgrade to a new version of Fedora

    6. oops, kernel panic at boot after the upgrade, and no video to troubleshoot after UEFI boot

    7. figure out how to boot into a recovery partition from UEFI

    8. figure out how to enable a serial console over a USB device

    9. figure out how to connect to the serial console from another computer using another USB device

    10. figure out what the kernel panic is from (not the upgrade, but the driver which wasn’t upgraded)

    11. figure out how to uninstall the incorrectly installed driver

    12. figure out how to install the correct driver

    That was a fun three week OS upgrade.

  • ChaoticNeutralCzech@feddit.de
    link
    fedilink
    arrow-up
    0
    ·
    5 months ago

    Wanted to customize GRUB and tried the GUI program. I wanted it to boot without delays unless a key is being held, and also add a “Shutdown” option (GRUB script halt), in case I open the laptop and didn’t want it turned on. The edits looked alright in GRUB Customizer but I should not have made them both at once, because it made “Shutdown” the default option somehow, so the OS would never boot and holding none of the special keys worked. I failed to update or reinstall GRUB using a live USB and ended up having to reinstall the entire distro.

  • groet@feddit.de
    link
    fedilink
    arrow-up
    0
    ·
    6 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.

  • bleistift2@feddit.de
    link
    fedilink
    English
    arrow-up
    0
    ·
    6 months ago

    I’m not sure anymore how I got into a state where that was necessary, but do keep a reference around for how to boot Linux or Windows from the Grub command line.

  • boredsquirrel@slrpnk.net
    link
    fedilink
    arrow-up
    0
    ·
    6 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.

  • theroff@aussie.zone
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    5 months ago

    ntfsclone /dev/sdc /dev/sdb

    /dev/sdb was a blank filesystem and /dev/sdc was my Windows filesystem.

    ntfsclone man page

    It ran for less than a second and didn’t take me long to figure out what happened. That’s the story of how I stopped using Windows.

  • macniel@feddit.de
    link
    fedilink
    arrow-up
    0
    ·
    6 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.

  • IsoSpandy@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    5 months ago

    I have a story that most of here might have faced. I ran dd on my external drive instead of my usb stick to create an iso. 1.8TB of data poof.

    • MonkderDritte@feddit.de
      link
      fedilink
      arrow-up
      0
      ·
      5 months ago

      Lession learned: always unplug your important stuff, before you do disk operations.

      Happens to everyone at least once.

  • naptera@feddit.de
    link
    fedilink
    arrow-up
    0
    ·
    5 months ago

    Just recently I have skill issue’d myself by doing git clean -rf in my home directory where my dotfiles live and therefore deleted all of my home files. I was tired and looked for a quick way to resolve my conflicts and made the stupidest mistake one can do: execute a command you do not really understand.

    At least I know what it does now and now I also do hourly local backups of my files with cron and borg.

  • elmicha@feddit.de
    link
    fedilink
    arrow-up
    0
    ·
    6 months ago

    Btw you can just use

    rm -rf bin
    

    So you can’t forget the dot or put a space between ./ or after the slash.

    My biggest fuckup that I can remember was when I ran out of disk space and thought that the /var directory contained only unimportant things that will be recreated automatically. Oops, bye bye rpm database.

  • Morphior@feddit.de
    link
    fedilink
    arrow-up
    0
    ·
    5 months ago

    If you count Android too, then this: I got my first Android phone when I was 10 or 11 and rooted it on the first day of having it. This was during a time when we were all still using ClockworkMod because TWRP didn’t exist yet, and I somehow ended up with a system without a kernel. Panic ensued, and I spent that entire night (like 10 hours) digging through xda in order to find a tutorial on how to get this damn phone to run again. Imagine having to tell your parents “I broke my phone I got yesterday.” I did get it working at like 6:30 AM. Fun times.

    • isolatedscotch@discuss.tchncs.de
      link
      fedilink
      arrow-up
      1
      ·
      5 months ago

      what’s the fun in modding if not the two hours where you think you’ve bricked everything and you’re scrambling through a 52 page post on XDA trying to find someone with your same problem