Skip Navigation

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:

 undefined
    
$ 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.

301 comments
  • 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.

  • Way back when I was just beginning to experiment with Linux back in the 90s I installed ZipSlack, which was a GUIless 100MB distro based on Slackware that ran from a folder on Windows. It was okay but I couldn't really do much with it and back then 100MB was a chunk of space, so i went to delete it. But i thought I would give it one last hurrah by deleting it from Linux. So I made use of the infamous rm -rf and sat there thinking "this is taking a long time"... then realised I had my Windows drive mounted as a sub folder and I was in the process of wiping my hard drive of everything!

  • Not me, and not Linux, but a school mate found the following bash snippet online :(){ :|:& };:.

    Naturally, he tried it on the SunOS servers we had access to for schoolwork. He got his account suspended for the rest of the year.

    I think most Linux distros are configured to kill fork bombs nowadays.

  • I accidentally overwrote /etc/passwd once and I allowed /boot to run out of space during a kernal update and I created a local user with the same user that was also on the realm/domain that I had joined and various bash script issues.
    Some stuff I've had to fix that someone else did:

    • named a file rm -rf
    • rm -rf /bin instead of ./bin -- Also the fact that they had sudo was crazy and also I guess this was the second time
    • chmod -R 777 /
    • Various software bugs running swap out of space or hitting the inode limit by creating files over and over again with a timestamp in the filename and having to remove all of them because there was no backup to the OS
    • Someone disabled SELinux because something wasn't working but didn't tell anyone -- ugh
    • Compiled java because they googled some issue and followed some old tutorial without understanding anything instead of using alternatives and symlinked the old java from /bin to /home/theiruser/java -- had sudo because he was a Windows domain admin.
    • Cybersecurity guy didn't know what some VMs did so he turned them off and figured he'd find out if/when someone complained. Caused a massive core services outage.
    • Same Cybersecurity guy deleted a bunch of data because he wanted to see how the sysadmins would respond and witness backup restorations. He did not inform anyone.
    • Cybersecurity guy above still has Domain Admin and sudo everywhere. I would have personally removed his privileged access regardless of what 'CyberSecurity' management thought but I was leaving for a new job by then anyway so I figured I'd just let them eventually lie in the bed they made.

    There's more but I don't want to keep going because it is Sunday and I don't want to ruin it.

  • I mounted a disk of a server in rescue mode, since I needed to extract everything (the provider didn't have the option to dump everything as a zip). Then installed an FTP server, added a user/pass, it worked.

    But I couldn't access the files of the original disk, even though I could see them. So I just chgrp/chown the original files, since the disk was just "mounted" in the rescue disk /mnt, I thought it was alright (at the time I thought permissions were volatile, stored separately from the files). I could now download the entire disk, yay!

    Upon booting the original disk again, a bunch of errors: shell not starting, tools not running, because they were owned by user and not root...

    Well we reinstalled all the server from scratch that day.

  • The Arch installation tutorial I followed originally advised using LVM to have separate root and user logical volumes. However, after some time my root volume started getting full, so I figured I would take 10GB off of my home volume and add it to the root one. Simple, right?

    It turns out that lvreduce --size 10G volgroup0/lv_home doesn't reduce the size by 10GB, it sets the absolute size to 10GB, and since I had way more than 10GB in that volume, it corrupted my entire system.

    There was a warning message, but it seems my past years of Windows use still have me trained to reflexively ignore dire warnings, and so I did it anyway.

    Since then I have learned enough to know that I really don't do anything with LVM, nor do I see much benefit to separate root/home partitions for desktop Linux use, so I reinstalled my system without LVM the next time around. This is, to date, the first and only time I have irreparably broken my Linux install.

    • I was confused cause I remember reading this exact comment... I wondered if my brain is starting to fail and hallucinate...

      But no, you did post the same story 5 months ago :'D

      • Oh no, I've been caught, haha. Good memory!

        To my defense, the story seemed relevant to OP's question, and the post that it was originally in has been deleted, apparently.

  • chmod'd all my home directory's files and folders recursively. First to 600, which prevented me from listing any folders, then to 700, which broke a few programs, then to 755, which broke ssh.

  • For this very reason, I have aliased rm -rf with trash-cli

    • Its fine as long as you are very careful. Best option is to just not delete anything. mv is your friend.

      It also helps to have a VM with snapshots

301 comments