What's (are) the funniest/stupidest way(s) you've broken your linux setup?

Tinkering is all fun and games, until it’s 4 am, your vision is blurry, and thinking straight becomes a non-option, or perhaps you just get overly confident, type something and press enter before considering the consequences of the command you’re about to execute… And then all you have is a kernel panic and one thought bouncing in your head: “damn, what did I expect to happen?”.

Off the top of my head I remember 2 of those. Both happened a while ago, so I don’t remember all the details, unfortunately.

For the warmup, removing PAM. I was trying to convert my artix install to a regular arch without reinstalling everything. Should be kinda simple: change repos, install systemd, uninstall dinit and it’s units, profit. Yet after doing just that I was left with some PAM errors… So, I Rdd-ed libpam instead of just using –overwrite. Needless to say, I had to search for live usb yet again.

And the one at least I find quite funny. After about a year of using arch I was considering myself a confident enough user, and it so happened that I wanted to install smth that was packaged for debian. A reasonable person would, perhaps, write a pkgbuild that would unpack the .deb and install it’s contents properly along with all the necessary dependencies. But not me, I installed dpkg. The package refused to either work or install complaining that the version of glibc was incorrect… So, I installed glibc from Debian’s repos. After a few seconds my poor PC probably spent staring in disbelief at the sheer stupidity of the meatbag behind the keyboard, I was met with a reboot, a kernel panic, and a need to find another PC to flash an archiso to a flash drive ('cause ofc I didn’t have one at the time).

Anyways, what are your stories?

UnfortunateShort,

Accidentally deleted system Python, which on GNOME meant my DE was toast as well. Luckily very freshly set up, so no harm done.

Related note, add this in your shell profile:

bash
export PIP_REQUIRE_VIRTUALENV=true

proper scripting language
set PIP_REQUIRE_VIRTUALENV true

Delta_44,

What does it do? Is it some kind of failsafe?

WalrusByte,
@WalrusByte@lemmy.world avatar

Makes it so when you install packages with pip, it will only work if it’s using a virtual environment. This keeps any installed packages separate from ones your system uses.

If you want to learn about python virtual environments, check this out.

Delta_44,

Nice! Thanks!

the16bitgamer,
@the16bitgamer@lemmy.world avatar

stupid was when I wanted to test Linux Mint on an external SSD, and didn’t check that the bootloader wasn’t going to overwrite my internal drive’s.

So anyway I’m running Linux Mint now.

fl42v,

That’s an interesting way to distro hop for sure

martinb,

It’s a fine distribution. I have it on my desktop and at least one laptop. But yes, a weird way to decide to distro hop 🤣

the16bitgamer,
@the16bitgamer@lemmy.world avatar

I was on Manjaro, and I didn’t want to put the effort in for a third time just to break it again. While I prefer arch based distros, I’ve been liking Mint since I can almost use it without a terminal like manjaro.

HotChickenFeet, (edited )

Installed python3 before it was made the native python on the dist. Half broke everything, including apt & python. So I uninstalled it, and then everything was broken. Finally got python3 reinstalled, and lived with it kindof working & awful distribution updates.

I have finally freed myself of that prison last month, by nuking everything and starting fresh.

martinb,

You can have both python 2 and 3 on the system. It just depends upon which is the default as to how much you break it 👍 The symlink to /usr/bin/python is the important bit for most software. For deb-based at least, update-alternative is your friend.

HotChickenFeet,

I’ll happily say I must have overlooked something, but I did try using update-alternatives. I don’t remember all the nuts and bolts from the start, but it involves python3 and distribution upgrades. I spent a good number of nights over the years trying to unmess it up, and am happy to never think about it ever again.

Adanisi, (edited )
@Adanisi@lemmy.zip avatar

Writing and running a script to delete the first 2 characters from all files and folders recursively.

It started backtracking to my home folder. :/

siha,

at’s a funny story, hope you got everything backed up

herc3141, (edited )

Backed up the whole disk image to an external drive because I didn’t have time for a proper backup but knew I would need some of those files later.

Installed a fresh new OS on the same disk, used it for a couple of months.

Needed to make some space on the external drive I had the backup on so I’ll just delete the backed up system files from it.

cd /mnt/external_drive

rm - r /usr /boot …

As you can probably see, a fresh new install was happening again

Scribbd,

Took me a solid second to get it as well.

martinb,

☠️

evatronic,

sudo rm -f /lib /use/share/backup/blah blah.tar.gz

Note the space.

downhomechunk,
@downhomechunk@midwest.social avatar

Oh man, you really owned those libs

liara,

You need to use chown if you want to own the libs

martinb,

Top tip, if tired, replace the rm -f part of the command with something innocuous for a first run. Actually, is better to do this mistake once so that the two important lessons are learned… Backup (obviously, in your case it was backups, but the point still stands) and double check your command if it has potential for destruction 👍

InputZero,

Might be recoverable if you had a live distro ready. Otherwise, o7.

evatronic,

Oh no, this was back in the days when we loaded our distros by way of a stack of floppy disks.

sevenapples,

spaces in rm are a classic one, they’re even mentioned in the Unix-haters handbook

fragment,

I deleted bash on my work computer one week into the job 🫠

martinb,

csh FTW eh 🤣

FractalsInfinite,

Let’s see: Unintentionally making a proxy accessible to anyone online

Accidentally deallocating an ext4 partition and then having to run testdisk on it

Trying to manually create a grub entry and corrupting the bootloader

Installing a arch derivertive and having it silently overwrite grub

Installing puppy Linux and then trying to get it to use apt

Incorrect use of ppa’s on mint resulting in very old packages being installed

And many others besides

papertowels,

The first time I enabled o auth for something self hosted, I gave access to anyone with a Gmail account.

ClusterBomb,
@ClusterBomb@lemmy.blahaj.zone avatar

sudo apt remove python3

Thinking I would install a more recent version. 😂

Ederhex,

Classic

janabuggs,

This was pre-linux for me but something you can still do in most distros so I think it’s a valid story.

In 1999 I was using Napster on computer running MS-DOS. I was 12 years old and an aspiring open media enthusiast/stupid script kiddie. I was using the file explorer interface in Napster and accidentally gave access to my entire C drive. I also had opened ports to share certain media and to fuck with my friends using daemon tools (back then you could do stupid stuff like control a friend’s desktop with certain versions of daemon tools). Immediately I started receiving packages called things like “sleep.tight.tiny.mite” and I knew I was fucked so I clicked in the Napster interface and clicked “delete” and deleted my entire active drive.

I panicked and installed the only operating system we had which was a random copy of Red Hat. When my dad came home I pretended like it had always had Linux on it. I do think he was more impressed than mad.

EponymousBosh,
@EponymousBosh@beehaw.org avatar

“Just pretend it’s always been Linux” is a bold move. I salute 12-year-old you o7

avidamoeba,
@avidamoeba@lemmy.ca avatar

Tried to convert Ubuntu to Debian by replacing the repos in sources.list and apt dist-upgrading. 💣 Teenagers…

Empricorn,

I’m as nerdy as they come, but… I don’t think you did teenage rebellion right.

Dagamant,

I thought about trying something like this the other day and quickly reconsidered

haruajsuru, (edited )

I mistyped my SU password when setup the OS…

jwt,

Suicide Linux?

captain_aggravated,
@captain_aggravated@sh.itjust.works avatar

I uninstalled Python.

I was playing around with Pygame of all things, and it wasn’t behaving as the (apparently out of date) documentation was saying it should, so I figured I’d just uninstall and reinstall Python.

EVERYTHING borked. APT wouldn’t even work.

BrianTheeBiscuiteer,

Ha! Came to say this too!

I tried to uninstall Python because I was just trying to minimize junk on my computer and I usually code in Bash, Node or Java.

khannie, (edited )
@khannie@lemmy.world avatar

Oh that’s a good one. It feels like it should be doable and then… BAM

BestBouclettes,

CTRL-C-ing apt because it looked stuck for more than 10 minutes. I don’t recommend doing it.

maynarkh,

Haven’t used apt in a while, is it not atomic? What happens if you mess with it?

BestBouclettes,

I don’t think it is, if it doesn’t run its course on its own, you’re screwed. It’s Debian so you can recover, but, at least for me, it was painful.

Cwilliams,

Man, gotta love apt sometimes

BestBouclettes,

apt is great, but yeah, if it’s gonna fail, let it fail on its own.

topperharlie,

One that I can remember many years ago, classic trying to do something on a flash drive and dd my main hdd instead.

Funny thing, since this was a 5400rpm and noticed relatively quick (say 1-2 minutes), I could ctrl-c the dd, make a backup of most of my personal files (being very careful not to reboot) and after that I could safely reformat and reinstall.

To this day it amazes me how linux managed to not crash with a half broken root file system (I mean, sure, things were crashing right and left, but given the situation, having enough to back up most things was like magic)

Serinus, (edited )

Many years ago I was dual booting Linux and Windows XP. I was having issues with the Linux install, and decided to just reinstall. It wasn’t giving me the option to reinstall fresh, only to modify the existing install.

So I had the bright idea to just rm -rf /

Surely it’ll let me do a fresh Linux install then.

Immediately after hitting enter I realized that my Windows partitions would be mounted. I did clearly the only sensible thing and pulled the plug.

I think I recovered all of my files. Kind of. I only lost all the file paths and file names. There was plenty to recover if I just sorted though 00000000.file, 00000001.file, 00000002.file, etc. Was 00000004.file going to be a Word document or a binary from system32 directory? Your guess is as good as mine!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #