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

Daniel Quinn@lemmy.ca to Linux@lemmy.ml – 262 points –

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.

295

Running the right command on the wrong SSH session/machine.

This is the scariest comment I've read in this thread.

Imagine that you’re using fqdns instead of ips…

I refuse to elaborate.

I set a different background color on all my machines because of exactly this while using VNC/RDP

this. after i set different zsh themes on my servers + my main machine i now know exactly what machine i’m running commands to

I wanted to try inserting and removing kernel modules, so I looked around and thought "well, I don't have a USB stick in right now so I can safely try removing the usb kernel module." So I did that, and after pressing enter I realized my keyboard is connected with USB.

I was smug thinking "I haven't done anything so silly as the people commenting in this thread", then I came across this one. I've actually done this one, and it was earlier this year, and I've been using Linux since 2004, 20 years.

  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.

I have a super-n00b question, and I apologize in advance, but, uh...yeah, what is a serial console?

You attach a secondary computer via serial (COM port) with your primary computer and then you can open a console on that one. You can access the primary computer as if you would be sitting in front of it.

You probably have to explain what Serial actually is.

I mean serial is just a port that runs in serial. You send something and you receive something afterwards, after you've received you can send again...

Tl;dr: Stick in a USB cable and the other side gets your console.

Adding to what DmMacniel said, it's a hardware interface, often accessed via a USB port (which after all, is the universal serial bus).

Christ you guys are making me feel old. I remember back in the day when a serial connection was made through an actual serial port. I know I have some serial cards around here somewhere. I have also used the tar command on an actual tape... Here's a fun fact, if your tape drive (big reel to reel looking thing, not a cassette or other kind of 'tape') has an issue with rewinding, do not use your finger to manually spin the reel. Use a pencil. I finished reeling my tape back up once and realized I now had a blister on the end of my finger.

https://en.wikipedia.org/wiki/Serial_console

tl;dr:

Serial ports are (for example) commonly RS-232, although other types of ports exist. Imagine it to be a very slow Ethernet device. Because it's so slow (and the technology predates Ethernet and also has different requirements), it's usually attached directly to a device instead of to a network. But you could connect a modem to it and it becomes connected to a network device.

It could also be connected to a system console device. These are commonly called terminals. Such devices are often monochrome (especially older ones) because a serial connection is often bandwidth limited (eg, measured in kilobits per second instead of megabits or gigabits). Since it's so slow, it's not practical for video, so it's generally just text-only.

Note that your GPU might also output a system console but rendered on your display at very high resolution and with graphics-drawing capabilities. So a system console would be any console that connects to the system.

What is a console? Well, Wikipedia presents several valid articles and the common theme as far as computers go is that a "console" is typically something that a human and a computer use to interact with each other.

For serial consoles, you might find device files for them at /dev/tty*. But for general serial devices, it could be any of several different types of device files.

Wikipedia's article on /dev devices has a pretty decent listing of what kinds of devices you might find and several of them might be classified as a serial port. Any serial port might be connected to a serial console.

So in my case, a serial console is:

  1. 2x USB-to-RS-232 (USB is a serial protocol and is basically "just" another (Universal) (and perhaps high speed) Serial port (Bus), so conversion is super cheap)
  2. 1x RS-232 null modem cable

That's pretty much it in a nutshell. Then

  1. System 1 (the failing system) UEFI boots into repair system partition on a separately attached disk (eg, boot from CD or live USB) to get a local system console
  2. System 1 repair system mounts the failing system partition
  3. System 1 modifies failing system grub configuration to enable a serial console on the attached USB-to-serial device file and saves changes, then unmounts failing system partition
  4. Power off System 1
  5. Remove repair partition device
  6. Open terminal window on System 2 (recovery system)
  7. Connect System 2 terminal to the attached USB-to-serial device file using screen (oh wow those were some old days)
  8. Power on System 1
  9. System 1 boot enters grub recovery menu which allows fixing the system remotely

To be fair, a lot of that complexity could have been done by either reinstalling, or removing the hard drive and attaching it to another computer. But doing it this way allowed me to poke around and try different ways of solving the issue, rebooting, etc. It was a learning experience worth exploring.

It was years ago though and I think there was some complication with trying to understand what device file (or device number or something) needed to be to work on the correct serial device (there are often multiple)

Wait, that's a tl;dr to you? o_O

I felt the same way so I scrolled down hoping for a shorter answer, but found yours instead and it made me laugh my ass off because how you wrote it really hit me, are you me? xD so I just wanted to say thanks for making my day even better!

I'll quote my current boss's boss's boss when he asked a question of me:

@inetknght, can you please not write a book? I need a quick answer

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.

I was gonna recommend kubuntu for a first time user, seems a bit of a hassle then doesn't it?

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.

I thought kubuntu was fairly stable

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.

Thinking of recommending nobara os. It seems pretty good now that it uses kde

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.

I think it should be fine though, if not, kde neon also seems to be good.

I also used and broke KDE Neon. Especially the transition to Plasma 6 must have been horrendous, as there where tons of people with completely broken systems.

But yes I suppose it is a good distro? But I switched away from it too.

Then what's a good beginner distro that uses kde and doesn't break all the time?

Fedora Kinoite, the best :D

Literally the only KDE distro I can recommend. KDE needs updates at good pace, as they introduce tons of features with their breakages.

Meanwhile Fedora is pretty tested. There is Rawhide which is super rolling and testing.

Then you have the current release, the old supported release and (with 40 currently) the upcoming branched prerelease.

If you always stay on the old release, i.e. Fedora 38 (you should upgrade to 39 now) packages are a bit more stable.

And the atomic model is the best. I want to write a more detailed post about it, but is worlds better than OpenSUSE microOS or the other experiments (VanillaOS, EndlessOS) which you can also see by the tons of variants/images there are

These are literally all different variants of Fedora, which you can install and enjoy a tailored experience.

You should try Aurora which is the "special ublue variant" with the KDE Plasma desktop.

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.

Damn that's the equivalent of going cold turkey.

I don’t use windows for close to 20 years so I didn’t need ntfsclone so far but do I read correctly the man page that only the source is specified as positional parameter? If so, shouldn’t you have to write

nftsclone —overwrite /dev/sdc /dev/sdb? It still can be misleading (given that mv uses two positional parameters so mv -f source destination would have done what you wanted) but a bit less cryptic?

Yeah, sorry it was a long time ago (like 10+ years) but I checked and it would've been the --overwrite arg.

The manpage for the older ntfsclone command has it:

Clone NTFS on /dev/hda1 to /dev/hdc1: ntfsclone --overwrite /dev/hdc1 /dev/hda1

Moral of the story was to RTFM 😂

(RTFM = Read the Fucking Manual)

Adding this because I only learned this acronym just last week, and wish to share the knowledge with anyone else like me)

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.

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

I did pretty much exactly this on a Galaxy S1 (i9000) that was old even when I got it, but my uncle who gave it to me said that to make it usable I needed to install Cyanogenmod.

I thought I fully bricked the phone trying and it actually sat dormant for years afterwards until I re-found the Odin backups I had taken, and was able to fully fix and restore it. Unfortunately by that time, nearly no ROM existed that was both up to date and a usable speed.

Oh man,, Clockwork mod, that takes me back. Although I had my android phone for a while before I built up the courage to root it, in part due to stories like yours

An older friend of mine told me years back about an incident that happened on a university VAX running Unix. In those days, everyone was using vt100 terminals, and the disk drives weren't all that quick. He was working on his own terminal when without warning, he got this error when trying to run a common command (e.g. ls)

$ ls -l
sh: ls: command not found

So he went on over to the system admin's office, where he found the sysadmin and his assistant, staring at their terminal in frozen horror. Their screen had something like:

# rm -rf / tmp/*.log
^C^C^C^C^C^C^C^C^C^C
# ls -l
sh: ls: command not found
# stat /bin/ls
sh: stat: command not found

A few seconds after hitting return, and the rm command not finishing immediately, he realised about the errant space, and then madly hammered Ctrl-C to try to stop it. It turns out that the disk was slow enough that not everything was lost, and by careful use of the commands that hadn't been deleted, managed to copy the executables off another server without having to reinstall the OS.

I totally pulled a LTT and removed my kernel. >_< There was a "real time" kernel listed in apt, and I installed it because I was curious if it would reduce lock latency for a project I was working on. (I wasn't trying to solve a problem, just curious) It didn't and I figured it was probably a bad idea to leave it installed. So I did an apt remove, and the rest went something like this.

Apt: Are you sure you want to remove the your kernel? Y/N

Me: Oh jeez... I don't want to do that.

Motor Memory: Y

Apt: Are you really really sure? Your computer will not boot if you do this. Y/N

Me: Oh, crap! That's not what I meant to do. Definitely not!

Motor Memory: Y

Me: No! Why would my brain betray me!?

Fortunately this was on a PopOS machine, so I booted into the recovery partition. Even if fixing it only took a minute, I still felt very very dumb. >_<

Man, that's a really dumb story that I find really relatable despite not having had any experiences like that. It feels like it'd be very in character for me though. Thanks for sharing, it helps me feel less silly in the various times where I've messed up (of which I am struggling to recall specific examples, but whatever brain part is responsible for embarrassment can remember, apparently)

Everyone here is talking about rm, but when’s the last time you dd’ed the wrong thing by accident?

You can get tripped up by tab completion, hda vs sda, sda vs sdb, flipping the articles around, he’ll, I’ve even blasted a good drive with /dev/random because I did t pay attention to what computer I’m logged into.

My killer app for multiple terminals open at once, weather through several ttys, xterms, tmux or the other one I don’t use was to type out my dd commands with a ls or something safe making in front of it while I look back and forth compulsively to verify that all the targets are correct.

Only reason dd hasn’t bitten me is that in my head, if and of make perfect sense as input and output.

Doesn’t mean I won’t make that error tomorrow, ofc. But I tend not to alias except harmless stuff to avoid that very problem.

Yup, I did that last year. I wrote a Linux ISO to my hard drive instead of a flash drive. It was interesting watching my desktop slowly fail. Thankfully I was preparing a switch to a different distro, so I had backed up what I needed.

All my drives are nvme* now.

I feel so much safer punching in of=/dev/sdaX

3 more...

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!

I once removed all groups from my user by using usermod -g instead of usermod -G

You probably mean that you used usermod -G instead of usermod -a -G

The -a stands for append

I did the same! After that, I never tried to run that command from memory

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

How I lost a Postgres database:

  1. Installed Postgres container without configuring a volume
  2. Made a mental note that I need to configure a volume
  3. After a few days of usage, restarted the container to configure the volume
  4. ...
  5. Acceptance

Well, that's a dumb Docker thing, not necessarily a dumb Linux mistake. You could've made the same mistake on Windows or MacOS when running Docker.

Technically, containers always run in Linux. (Even on windows/OS X; on those platforms docker runs a lightweight Linux VM that then runs your containers.)

And I wasn't even using Docker.

Reformatted windows and installed Linux.

Wait before the hate. This was the first time I did it and knew nothing about it and didn't know it would wipe my system. So I lost everything.

You know, I'm in a constant battle with bootloaders. I've both deleted grub multiple times and windows boot manager by accident and by believing "I could fix it by re-generating it"... More like re-installing.

Virtualization...

Yeah, yeah, I get the point. However, how else am I supposed to learn what not to do huh? "Do not delete your boot partition" is not obvious enough, I need consecuences for my stupidity.

Trusting tab-completion and pressing enter just a tiny bit too early, resulting in overwriting the work of at least four hours, because the files' names started the same. That whilst trying to initiate a git repository to prevent that kind of mistake....

Deleted the certs from the sshd daemon which locked me out of a remote server that required and a 2 hour drive to fix.

Wonderful. Just like deleting all the iptables rules with a default DENY rule in place *chef's kiss*. Required calling the service provider to enable a remote console over HTTPS (it was a manual action for them... supposedly).

Anti Commercial-AI license

I'm curious: Is it a bad idea to have iptables with a default DENY rule? I use a deafult DENY in ufw, and it uses iptables under the hood.

This is why we use ufw or firewalld. If nothing else setup an undo button

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

"I have 200 GB of unused space in the windows partition, I'll just plug a live CD, divide that partition and merge it with the Linux one, ggez"

Yes, dividing the windows partition destroyed it. Yes, mixing the windows and ext destroyed Linux. I might have been able to recover something but I was like 18 and I just reinstalled windows in a fit of misdirected anger against Linux.

Don't do that. Best option is to run windows in a VM. Second best option is to shrink windows in windows and the boot to a live system to grow linux

No shit, now I daily drive Linux and I just have two separate drives for each, with some extra drives for games and files and such. That was 10-ish years ago.

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

I do dumb things like edit my network configuration do some stuff and log out. Then I can't login the next weekend because the IP address is wrong. Also:

Ifconfig eth0 down

And I am booted from ssh.

Yeah screwing with the network interface of the machine you're SSHd into is something nearly every sysadmin have done at least once.

That or changing something, rebooting the server and subsequently being unable to contact it again due to said change. I'm always scared and feeling I'm taking a risk when upgrading a major OS version over SSH, yet Ubuntu never failed me in that, it's the silly things that got me, like messing with fstab.

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

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.

Due to some poorly placed quotes, I managed to create a subdirectory named ~ in my home folder. You can imagine what happened next. Luckily, I had just gotten my backup system up and running the day before, so nothing was lost.

Always do an echo first before you put rm in a script. You know the story.

Alias rm to echo and install trash. Saved me many times.

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.

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.

You know, you could have backups or better yet 3 copies on 2 mediums in 2 locations

I installed timeshift to have a way to create restore points just in case I mess something up while fiddling with my Archbox.

I used it for a while before I decided to remove it. After that, I realized it didn't remove the "restore points" (I didn't fully understand how it worked) and thought it would be good idea to rm -rf /run/timeshift.

My whole /home was smited (it uses symlinks to create these "restore points"). Before I realized, it removed gigabytes of data.

Lesson learned: always understand how something works and always be careful when using rm -rf.

1 more...

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.

My first experience with installing Linux on a hard drive involved wiping the wrong hard drive (my dad’s) and installing on it. Then panicking when Windows 95 didn’t boot up. Thank goodness my dad was understanding lol.

I updated a manjaro system.

I rebooted PC in the middle of Manjaro update. Apparently, kernel was updating, so it broke.

Took me 15mins to restore, but they could make some safeguards.

Other than that, never faced issues updating Manjaro.

Well, there's a reason why Windows says "Don't turn off your computer" during updates. I think noob-friendly Linux distros should implement a similar system, where Kernel updates are only installed on shutdown and a message is displayed telling the user not to shut down their computer. There should still be rescue mechanisms like Btrfs snapshots or a recovery system that automatically detects a broken kernel and reinstalls it.

I think it can be done even simpler - no need for a special screen, just make notification and don't turn off while the kernel is updating.

I moved from Manjaro after a couple system updates just borked something like X11, but those happened over a 3 year course of using Manjaro.

As insightful as it is to find the root cause of a Linux problem like that, on my main system it was just not something I wanted to deal with or risk having right when I need the PC.

I see. Thanks for sharing your experience! What do you use now?

I moved from Manjaro to EndeavourOS and was been pretty happy with that. Unfortunately my study mandates things like .docx files, Visio drawings, things that just are more clunky to do if I'm trying to do it under Linux, so I've been actually using Windows 10 on my daily driver.

However I have LMDE on a second machine which I have been pretty happy with, although I am more of an Xfce guy than Cinnamon.

Thanks! Speaking of .docx files, I never actually encountered the issues with them on Linux. The only issue being macros not working great, so maybe that's your case.

I can usually read them, though issues can range entirely from nothing to entirely broken. I otherwise haven't tried creating a .docx file on Linux (I would usually use .odf instead) and seeing how it renders in MS Office, but when it comes to an assessment I'd prefer not to test that.

Trying to solve any Linux problem via ...

Copying and pasting from Stack Overflow

~Anti~ ~Commercial-AI~ ~license~ ~(CC~ ~BY-NC-SA~ ~4.0)~

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

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.

i accidentally mark iwd as dependency rather than explicit. after that someday im removing a package depends on iwd, iwd itself been removed as a dependency as well. and im been blocked out of my remote machine until someday i have physical acces to it

Wiping out Windows trying to install Linux seems to be a common thing. Did that while trying to install Ubuntu as a teen.
Funnily, I didn't check which Ubuntu iso I downloaded and ended up installing Ubuntu server. I should've noticed with the gui-less installer, but then I thought that it was just Linux being hightech.

Using sudo when it isn't necessary, and the real cannon: sudo su.. Adding sudo to your command lines indiscriminately causes files you create to be owned by root even though they are in your home directory, and then you end up using sudo to make changes to the files... and then the filesystem permissions cannot prevent you from successfully running an accidental "sudo rm -rf /" command.

Seriously... sudo is not a "habit" to develop in order to avoid dealing with filesystem permissions problems.

I regularly find myself trying to tweak some system config and opening the file read-only because I forgot to sudo vim it.

Doesn't help that my everyday user account doesn't have sudo privileges, so I need to su to my admin account first.

1 more...

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:...

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.)

  • apt something that ended up removing sudo. No more admin rights.
  • used rsync to backup pretty much everything in / , with remove source option...
  • find with -delete option miss positioned. It deleted stuff before finding matching pattern
  • chown / chmod on /bin and/or /usr/bin
  • Removed everything in /etc

On the first point: isn't it possible to just go su and reinstall sudo?

Or does it not work with disabled root?

It doesn't work with root disabled.

The way to fix this is to boot in bash recovery where you land a root shell. From there you can hopefully apt install sudo if deb file is still in cache. If not, you have to make network function without systemd for apt install to work. Or, you can get sudo deb file and all missing dependencies from usb stick and apt install them from fs. Or just enable root, give it a password and reboot so you can su - and apt install sudo

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.

Mine falls along with the people who were distracted. Was doing two deployments for work on night and on one I need to clear a cache. As I was typing the cd command, I happened to glance at the instructions for the other deployment and for some reason my mind switched to the deployment folder. I then typed out rm -rf *, and as I hit return realized I wasn't in the cache subdir. Blew away our prod environment and it took hours to get it all restored. The restore kept asking the guy to go pull tape #xxx. It was nerve wracking because depending on the tape, there was a chance it was moved offsite. Got it all restored and turned it back on, and then had to start back from the beginning since the backup was from the night before. The other people doing deployments weren't too happy, but I owned up immediately and we ended up changing the procedure. First, the cache clearing was done via a script after that, and I won my argument about not having to do two deployments simultaneously!

My biggest thing when switching to Linux was understanding why I didn't have permission to alter half of my file structure. I was trying to take ownership of my /usr directory as a user and had to have multiple people explain why that was a bad idea (and why simply making any changes as a super user via terminal was more than adequate for the results I wanted).

My mindset was a result of so many user files being spread across dozens of branches of the Windows file structure. Some very close to the root of the drive, some a few directories deeper. I didn't really understand the benefit of having all my stuff in /home (and am now a full convert. Just thinking about navigating a Windows drive makes my skin crawl now).

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.

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

Guess who got admin permanently banned from that machine.

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

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.

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.

$ grub-mkconfig -o /boot/grub/grub.conf

Thaaat... took me a stupid amount of time to fix.

There's nothing wrong with that command, per se. You must've ducked up something else?

It's grub.cfg not grub.conf. it's really easy to miss because everything else is .conf.

Oh shit that's right, totally missed that! :D

Me too, including when ferociously trying to debug why grub wouldn't find a freaking bootable anything. The error message isn't "uh, no config bro" but "hey, nothing to boot here, see ya in The Shell". Argh.

Yeah, it has definitely caught me off guard a couple of times when installing Arch. At that stage if there's no grub it didn't install or the ESP flag isn't set on EFI. If there is grub but no options it's usually the config.

One time it was because I forgot to install the kernel, it took me a while to figure that one out.

That's why I always press tab to autocomplete due to this.

Yeah, for a while I didn't realize auto complete was as simple as installing bashcompletion. Doesn't help if the file doesn't exist though.

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.

Wait .. you can uninstall sudo?

On "immutable" Fedora, yes :D dont know if I needed to add some enforcement variable.

My buddy was in a class doing a programming test. It was a couple minutes until turn in time, so he went to zip up the source files. He had already ran the appropriate zip command previously, so he pressed up three times and then enter. It appears he had miscalculated, because the command that ran was rm *.c. There were no backups.

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/*

Reminder that bash will resolve uninitiated variables to the empty string.

Luckily he halted the process after it had only nuked /boot and /bin. If it had gotten to /var and the mounted data storage within, we would have been in trouble

Always use set -eu

Yeah if you don't put bash in European mode, it is a lot more dangerous.

Ahhhh why not anything in /tmp or better ${TMPDIR:-/tmp} or best mktemp

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

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

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 &amp;&amp; sudo apt-get upgrade -yV &amp;&amp; read -p "Flatpak Update? (yj/n): " choice &amp;&amp; [[ $choice = [YyJj] ]] &amp;&amp; sudo flatpak update --noninteractive
and equivs-build ( sudo apt install equivs) came in really handy in building the transitional packages fast.

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.

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

Happens to everyone at least once.

Force uninstalled glibc on my Gentoo, which basically broke every shell and binary on the system. Was able to repair in place because I

  1. Had already compiled busybox statically
  2. Still had a copy of the stage 3 tarball on / which I could use to 'restore' glibc libraries
dir="$(something that ultimately resolved to "")"

rm -r $dir/*

on a company server

I also once completely destroyed the data in a db that wasn't backed up for that same company while trying to restore from a dump (which was deleted as part of the script i was running).

Luckily both of these mistakes happened on staging servers so no one really cared. (prod is backed up though so if i did it there, not that i have access to prod, it also wouldn't be catastrophic)

Was trying to get corectrl configured and I was blindly copying text to paste into config files.

Next thing I know, I can't get my system to boot up again. 🤣

Time to reinstall. Again. 😅

  • Accidentally did a partial upgrade of Arch Linux in which I upgraded libssl but not systemd (which depended on it) (which refused to start becuase one of its dependencies had been upgraded to an incompatible version) (which caused the kernel to panic immediately on bootup because the init process died) (writing init=bash on the kernel command line gave me a shell but not network access) (i had to boot off a liveusb, chroot into my /, and run pacman -Syu from there in order to fix it)
  • Use Ubuntu, at all, for anything, ever

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.

I updated my graphics card. Twice. On two different systems. Nvidia sucks. Both times resulted in reinstalling Linux entirely.

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.

There's a lot of gun refference in that school class. Are you by any chance in the US?

Typed "rm -r" in "/home/myuser" instead of "/home/myuser/Documents/ThingINoLongerNeed"

Used gparted to wipe and format the device mounted at "/" instead of the external drive I meant to reformat. I've done this one TWO WHOLE TIMES in my life, three if you count wiping a device that was mounted at "/home/myuser/MyTwoTBDrive4DocsPicsMusicGamesEtc".

was too incompetent to install arch one time so i used archinstaller and created a separate home partition. couple years later that root partiton's close to filled up, and i do an update after deleting come programs to free up space. then some weird text appeaerrs in terminal, and so i try to update again (this time specifically wine), says loads of files already exist in filesystem. i think "this is weird", so i restart.

what instantly gets my attention is this text greeting me on boot

loading Linux linux... error: file '/vmlinuz-linux' not found. Loading initial ramdisk... error: you need to load the kernel first.

Press any key to continue.

yup, i just borked my install, so i hastily whipped out an outdated arch USB, updated it using a spare laptop and am now on a reinstall (luckily i keep the important files on a separate drive, so not all is lost). extra insult to injury was that my previous install had my drive LUKS encrypted, so i couldn't evne get in there to possibly backup anything if i tried lol. but it's feels refreshing starting anew though.

  1. Have Nvidia card
  2. Change the driver to see if I can fix a weird graphical issue I was having.
  3. Rebooted computer and got stuck in boot loop because there was an error with the driver.

I've lived through this one. Fixing it required me taking a full day off to suffer.

Once I omitted a semicolon after an “rm -rf”and the next command. The script was supposed to reduce downtime vs typing the commands manually, but instead it deleted the production site and the “.bak” backup of the site instantly.

Then you restored from the snapshot or backup you had right? Right?

This was hosted on bare metal on a file system that didn’t support snapshots. And the backup system? A state of the art tape drive. That’s why I was creating my own backup as part of the launch.

We recovered by using the staging site content.

Let a narcisist bipolar family member onto my home server for phaseI. For phaseII I granted too much access in sudo because I was busy. Fast forward a year or two and a downswing triggers the victim rage and he attempts to wreck my server after a minor argument -- would have, too, if I wasn't keenly aware of a conversation he had a few weeks before where he detailed "how to fuck with someone horribly" to a peer and I used that recollection to reverse the damage. It was a lucky thing, and 25 years on I have better security and backup processes.

I still regret that. #family, right?

Not got any computer related stories from my messed up family, but I can relate to many of the vibes here. Solidarity on the family front.

I would just give them there own VM. They can blow it up and it will do notho. Bonus if you can restore it quickly.

Ah, but 25 years ago? No easy vm setup. And I trusted the guy then, so I wasn't guarded as I should be.

We learn through pain.

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

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.

Stupid 1

Made a 4-disk RAID10, back when 160GB disks were boss and I couldn't afford WD Raptors. Fiddled with some tune2fs options to make it even faster. After a reboot, fsck found some errors. Asked if I want to fix them. I said yes. It asked again for some more errors. I said yes. Eventually I jammed a screwdriver in the keyboard to accept every prompt. After a while of this a grim feeling came over me that fsck might not be doing me a favor. Stopped the machine. Booted into a live CD, mounted the fs, a good number of music and other files were gone. Luckily the corruption wiped mostly larger files like audio and video which were replaceable. I started making backups after that.

Here's what 160GB disks sequential read benchmarks used to look like:

Stupid 2

Around the same time I tried to convert Debian to Ubuntu by replacing the Debian repos in apt with Ubuntu's and following with dist-upgrade.

I tried to convert Debian to Ubuntu by replacing the Debian repos in apt with Ubuntu’s and following with dist-upgrade

Shouldn't it work though ? Or be close to work with the appropriate options passed down to dpkg

Sadly no. It sounds plausible, which is why I tried it. However there can be unreconcilable package dependencies and all apt can give you is a choice between one broken mess or another.

You might be able to do it if you bypassed apt. Perhaps if you get the list of packages the new OS needs, just download them with apt, then uninstall almost all dpkg packages with purge, then install the new ones.

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.

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.

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.

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.

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.

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.

I was running a Vanilla+ Minecraft server and was wondering why my plugin was not working. I had forgotten to unzip it before uploading it to the Ubuntu server vm and didn't know how to unzip on Linux. So I just unzipped it in windows and re transferred the file. Yaay RSync.

Otherwise just basic mistakes command in the wrong folder type of stuff.

Thinking Android/Linux would behave anything resembling GNU/Linux

Adding a DENY ALL line to the top of iptables, getting disconnected, realizing that I'm fucking SSHing into this removed...

Uhoh, the nannies of lemmy.ml took away your naughty word.

Deleting my grub config instead of editing it. Fortunately that's pretty easy to recover from, just annoying.

F'ed up installing graphics driver and had to reset everything from another TTY, also just annoying.

Chose the wrong permissions or path on a chmod call and locked out a big party of the system. I think that was during a setup though, so I just started from scratch again.

Started to DBAN (destroy) internal drive instead of external drive.

I wonder of there is a physical equivalent to this. Imagine shreading the wrong drive.

In some cases holes are drilled through drives so they can’t recovered or, more efficiently, they are degaussed with large magnets.

Some e-waste processors degauss as a standard practice to limit their liability before the hardware is passed on.

If I've been repeatedly rerunning commands via ctrl-r'ing back through my history, I'll start getting careless and more than i should have I've accidentally hit enter twice on the wrong command without pausing to double check first. Sometimes to less than desirable effect...

Most of mine are variations of getting confused about what system / device is which:

  • Had two magnetic HDDs connected as my root partitions in RAID-1. One of the drives started getting SATA errors (couldn't write), so I powered down and disconnected what I thought was the bad disk. Reboot, lots of errors from fsck on boot up, including lots about inodes getting connected to /lost+found. I should have realised at that point that it was a bad idea to rebuild the other good drive from that one. Instead, I ended up restoring from my (fortunately very recent!) backup.
  • I once typed sudo pm-suspend on my laptop because I had an important presentation coming up, and wanted to keep my battery charged. I later noticed my laptop was running low on power (so rushed to find power to charge it), and also that I needed a file from home I'd forgotten to grab. Turns out I was actually in a ssh terminal connected to my home computer that I'd accidentally suspended! This sort of thing is so common that there is a package in some distros (e.g. Debian) called molly-guard specifically to prevent that - I highly recommend it and install it now.
  • I also once thought I was sending a command to a local testing VM, while wiping a database directory for re-installation. Turns out, I typed it in the wrong terminal and sent it to a dev prod environment (i.e. actively used by developers as part of their daily workflow), and we had to scramble to restore it from backup, meanwhile no one could deploy anything.

This happened just this morning. Probably not the dumbest thing ever, and I blame Snap for putting things where they don't belong: I deleted stuff from the /run/user/1000/doc directory. Turns out the files there are in fact hard links to files which actually reside somewhere else. Well, they were, until I deleted them forever.

Background: Firefox (as an Ubuntu snap package) downloads files in some kind of sandbox mode and references stuff there for some obscure reason. That was my weekly reminder to get rid of snap packages because snap sucks in a myriad of ways.

I've reinstalled a few times throughout the years, simply because I didn't want to deal with fixing something, mainly a bloated mess with multiple desktops. Sometimes it's faster to back up home and nuke it from orbit.

Assuming you put everything important in home, that is...

Ran rm -rf after copying filepath with a space. The directory up to the space did exist. Fortunately so did a backup.

Cleaned a secondary drive mounted at the same point without noticing I was on the wrong SSH terminal tab, at least twice.

Whoever decided that spaces would be allowed in filenames deserves whatever level of hell awaits them.

Spaces are fine in filenames. Just always always always quote your paths and/or variables..

Sounds great in theory, but when you are trying to use awk to print out commands that might have something like printf and have to start escaping quotes, it gets really messy really quick. I have run into situations like this more than I care to as I like writing commands that will write out other commands. Spaces in filenames also mess with things like sed or sort where you want a specific column. Sorry, but in my opinion using the same character that was previously determined to be a delimiter is just a bad idea.

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.

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.

Added an usb drive by its /dev/sd** identifier to fstab without the nofail option. Wanted to do a quick reboot for something I can't remember, then copy the files over to the USB drive, since I'd need them on the next day and… no boot. The reboot had assigned another name to the drive (/dev/sdb instead of /dev/sdc or something) and automount wouldn't skip it because nofail was missing. In the middle of the night, with files I required right the next morning. Fun times.

I wanted to upgrade my Ubuntu to a newer version, but I had to do it through the command line. During the upgrade it asked if I wanted to see the file changes or something, so I said yes for fun... I couldn't get out of the menu, or rather I didn't know how and seemed to be stuck halfway through the upgrade. I tried a bunch of keys and possible combinations including.... Ctrl + X.

So after quitting the terminal halfway through a system upgrade I tried to restore through backup. Turns out the backup was corrupted or something and didn't work. I never realized because I never thought to test it. I lost a few years of photos and some music files that I've had probably for decades that I downloaded off Limewire. I still have the backup file in case it can be salvaged some day, but oh well. Most of the files I was able to download again off of the bay.

Backup file? As in you zipped a folder or something?

Anti Commercial-AI license

I suppose it is like a super zip file. I was using Ubuntu's default backup (Deja Dup) which was just a gui for Duplicity. I was using the gui for everything but I suppose it didn't work. I spent days running through all the command options for duplicity, but it never yielded any results. I still don't really know what went wrong, but no matter.

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.

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.

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.

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.

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

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.

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!

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

I really like the idea of partitions without fixed sizes. I know it's not the same but just as useful when you reinstall your system.

Deleting efi partition just because grub not updated yet.. 😅

I was working on my final project in a class in undergrad on the campus VAX. VMS had a versioned filesystem, which is to say that every time you saved a file (like your source code in LSE), it would create a new file (e.g., FINAL.COB;23). I was getting confused by all of the versions of my project so I decided to clean some of the older ones out:

DELETE FINAL.COB;1*

DELETE FINAL.COB;2*

I had to run to the data center the VAX was in halfway across campus to beg the sysadmins to restore $STUDENTS:[DRWHO.CS1337]FINAL.COB;* from the hourly tape backup (at least there was that) and re-debug the last two functions so I could hand it in before midnight. Lesson learned: Don't worry about cleaning up your workspace until after you're done.

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.

Getting packages from a spider web of repos then not untangling the web before upgrading from one LTS release to another. Ended up with an unfixable problem with essential packages and dependency versions and had to do a fresh reinstall instead. Fortunately I backed up my files first so I didn't lose anything important.

I have made countless mistakes since the 90s, mostly involving rm. The most recent one was yesterday when I was trying to rm files in a directory with lots of other unrelated files.

I don't remember the exact failure, but I was shooting for something like rm *lng and typo'ed rm *;ng (those chars are next to each other on the kb). This happily rm'ed * (d'oh!) then errored on the nonexistance ng. :-(

Yeah at this point I've aliased 'rm' to nothing and exclusively use 'trash'.

In the past I've aliased rm to a wrapper that showed PWD and the files to be affected, slept a couple seconds in case I wanted to abort, then shredded smaller files, rm'ed big files, or placed in a Trash dir for certain kinds of files (.conf, .cfg, etc).

I might try to find or rewrite it.

That sounds great but I don't want to keep the 'rm' muscle memory in case I'm on another computer and delete something important. Having to use 'trash' instead makes you more conscious when it errors out.

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.

Switched to what i thought was an old install usb; it had a close enough directory list to what i expected that i then went ahead and rm -rf * the whole thing.

Turns out that was my / directory. I only noticed because things stopped loading from the drive into memory. Everything still running actually still worked for the most part.

Yeah, mine was pretty similar...

rm -rf / home/user/somedir

I think I realized what was happening somewhere in /etc, and stopped it maybe in /lib. But this was before /bin was a symlink, and I was jumping distros pretty constantly, so I just reinstalled. It was also before Ubuntu popularized sudo, IIRC, so I was probably su'd.

I rembember adding an extra / to dev when using dd. I think I still haven’t fixed that system.

Breaking the bootloader, uninstalling nvidia drivers ton install mesa without removing mesa/nouveau from the blacklist

So there's the time I converted my partition table from MBR to GPT and it corrupted everything on it so I had to reinstall. Took this opportunity to switch from Mint to Arch, something I'd been thinking of doing for a while.

Once on Arch, I had much more opportunities to make epic mistakes: For example not putting enough room on my root partition (home was on a separate one), so after a while I had to reinstall.

Was your project folder synced via nextcloud?? I had a similar issue arise with my projects folder being deleted and not in the trash bin etc, can only think nextcloud was the culprit as I had removed the folder from my server and default behaviour must be to replicate that removal locally.

shutdown -h now on the wrong machine. Should have been “-r”. No IPMI but important enough to force me to drive to the office at night.

Ever since, I force myself to wait a couple seconds before sending any shutdown command, and tend to use reboot instead.

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. 🥲

Ha! I just did something like that. I thought I had "orphaned" BTRFS snapshots taking up space.

I opened a file explorer as root...I deleted this one that wasn't listed.

Oh wait..."Writable snapshot"...? Oh...no.

Yeah suddenly no programs or anything worked. Sadly there was no snapshot restoring out of that one! (That I would be capable of, anyway!)

So yeah, I managed to deliberately bumble past several safeguards into the "I should know what I'm doing" area, and found a magical way to rm -rf / from the GUI, essentially. Wee!

Thankfully, /home was its own partition, so aside from minor inconveniences bringing .configs back over and other little tweaks I'd implemented, I have reinstalled OpenSUSE Tumbleweed leaner, meaner, and cleaner. ¯_(ツ)_/¯

ACTUALLY, glad I backed up /home before the reinstall because the first reinstall attempt failed and wiped it!

Backups, kids. They really are the difference between "Aw darn, live and learn."...and complete heartbreaking despair.

I tried upgrading instead of a fresh install.

Needless to say, I ended up doing a fresh install eventually...

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

Rermoved the Wireless card drivers while troubleshooting the Internet connection..

I activated aur in majoro. Twice.

Now I use endeavourOS to install my arch.btw, lol

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.

I once had grub and rEFInd installed on the same system and an Arch update hosed both. I was able to fix it with an Ubuntu LiveCD and went back to Ubuntu. I still use Arch in a VM as a treat.

Mine was wiping my vps while backing it up. Luckily for me I only lost some files that I could easily replace.

Tried to use Manjaro at some point. What a horrible distribution.

Works amazing for me for a long time. I don't think it classifies as a foot gun.

Same here, and I've enjoyed it more than my Debian experience.

I actually run Debian on laptop, and it's great too, just in its own right. Certainly not installing it on my main machine.

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

I did so many shit on my PC, I don't remember an interesting one. Generally that was during a distro install.

I deleted some python folder and my systems have been having troubles saying the file isn't there

Install Red Hat.

Kidding? Maybe.

Red Hat was the first Linux I installed, about 24 years ago, and got hooked. Switched to Ubuntu about 19 years ago, and have used nothing but Debian and derivatives since. I've attempted Fedora a few times, but could not convince myself to stick to it.

Smh I've never done anything really stupid with my system or at least I don't remember it

Don't worry, also you will get a chance to learn... It'll be fun!

What do you mean? Only absolute skill issue noobs do stupid stuff with their systems (jk). Or maybe I'm so lucky because I never write any scripts and because of that never erase my /home idk