What're some of the dumbest things you've done to yourself in Linux?

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:


<span style="color:#323232;">$ rm -rf ./bin
</span>

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.

luciferofastora,

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.

toddestan,

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.

little_tuptup,

I accidentally wiped my backup. I’m redoing my storage setup and had the backup laying nearby.

I was stunned. I immediately gave up and went to bed.

mlg,
@mlg@lemmy.world avatar

I already posted this before but a friend did chmod -R user /usr/bin and broke every suid and guid bin including sudo lol.

Personally have accidentally shadow deleted /home via an incorrect bind mount so I couldn’t log into my own user.

Archr,

I did something similar (that my professor still talks about in class as a cautionary tale)

I ran chown -R user .* (intending to target all hidden files in the folder) and for people that don’t know .* also matches ( was / in this case) which changed the permissions on all files on the system to that user, including sudo.

We fixed it by mounting the root of the file system in a docker container which effectively gave us root.

circular,

I’ve also been hit by .* matching . First of all, I find this really really jarring. It makes sense and doesn’t at the same time. I also wonder how to properly only glob the hidden files but I’m too afraid to experiment.

possiblylinux127,

Today I did rsync backwards. I just restored the backup and moved on.

fxdave,

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.

ilinamorato,

I was setting up fail2ban on an sftp server at work.

Guess who got admin permanently banned from that machine.

possiblylinux127,

I had a situation where I though my user was banned. I was troubleshooting an entirely different issue when it hit me. The Debian install was extremely corrupt. It was a restore from a snapshot but for some reason the snapshot was totally corrupted. I loaded a different snapshot and the machine worked fine.

The .ssh/authorized_keys was just gibberish in the bad snapshot

ChaoticNeutralCzech,

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.

unionagainstdhmo,
@unionagainstdhmo@aussie.zone avatar

Switching to Arch.

afox,

sudo apt-get purge java* good lord what a simple thing to avoid. I was pretty green at work during the time :(

urfavlaura,

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

ThetaDev,

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.

tiita,

Rermoved the Wireless card drivers while troubleshooting the Internet connection…

CosmicCleric, (edited )
@CosmicCleric@lemmy.world avatar
jwt,

And then accidentally copy/pasting the failed attempt code snippets of the OP describing the situation.

ilinamorato,

I’ve regularly found a solution to my problem on SO, only to discover that I need to figure out how to break my system exactly the same way the asker did before the fix will work.

loppwn,

crontab -r … now i always look on the keyboard when i want to edit my cronjobs

racketlauncher831,

crontab -e, right? 🤭

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • fightinggames
  • All magazines