this post was submitted on 21 Apr 2024
0 points (NaN% liked)

Linux

47233 readers
769 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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.

top 28 comments
sorted by: hot top controversial new old
[–] Morphior@feddit.de 0 points 4 months ago (1 children)

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

[–] isolatedscotch@discuss.tchncs.de 1 points 4 months ago

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

[–] inetknght@lemmy.ml 0 points 4 months ago (1 children)
  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.

[–] EveryMuffinIsNowEncrypted@lemmy.blahaj.zone 0 points 4 months ago (2 children)

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

[–] DmMacniel@feddit.de 0 points 4 months ago (1 children)

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.

[–] Morphior@feddit.de 0 points 4 months ago (1 children)

You probably have to explain what Serial actually is.

[–] DmMacniel@feddit.de 0 points 4 months ago (1 children)

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

[–] EveryMuffinIsNowEncrypted@lemmy.blahaj.zone 0 points 4 months ago (1 children)

Not all people know that, to be fair.

[–] DmMacniel@feddit.de 0 points 4 months ago

True. It's not quite common nowadays unless you work in administration or are an enthusiast.

[–] Bienenvolk@feddit.de 0 points 4 months ago

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

[–] ChaoticNeutralCzech@feddit.de 0 points 4 months ago

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

[–] groet@feddit.de 0 points 4 months ago

Can't remember exactly what happened but it involved changing permissions on /bin /sbin and similar. You know for security ...

In the end I didn't have permissions to run chmod, su or sudo

Fortunately there is little that can't be fixed by booting from a live image.

[–] bleistift2@feddit.de 0 points 4 months ago

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

[–] phanto@lemmy.ca 0 points 4 months ago* (last edited 4 months ago)

Trying to add my user to wheel: sudo groupmod -a wheel Deleted my group membership in everything but wheel. That was fun! Remote system too! Edit: I still don't remember the syntax. Geez.

[–] boredsquirrel@slrpnk.net 0 points 4 months ago (1 children)

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.

[–] DmMacniel@feddit.de 0 points 4 months ago (1 children)

Wait .. you can uninstall sudo?

[–] d3Xt3r@lemmy.nz 0 points 4 months ago (1 children)

Wait till you find out that you can even uninstall Linux!

[–] DmMacniel@feddit.de 0 points 4 months ago (1 children)

Ha... and then what, install... Windows?

[–] AVincentInSpace@pawb.social 0 points 4 months ago (1 children)

did you know you can use debian on the freebsd kernel

[–] DmMacniel@feddit.de 0 points 4 months ago
[–] theroff@aussie.zone 0 points 4 months ago* (last edited 4 months ago) (1 children)

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.

[–] DmMacniel@feddit.de 0 points 4 months ago

Damn that's the equivalent of going cold turkey.

[–] DmMacniel@feddit.de 0 points 4 months ago

I distrohopped once and wanted to try OpenSuse Tumbleweed. Would have went really well if I didn't by accident deleted all my partitions...

I lost all of my curated music files I gathered over the span of the last 15 years.

I'll never get those back.

[–] MonkderDritte@feddit.de 0 points 4 months ago

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

[–] IsoSpandy@lemm.ee 0 points 4 months ago (1 children)

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

[–] MonkderDritte@feddit.de 0 points 4 months ago

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

Happens to everyone at least once.

[–] naptera@feddit.de 0 points 4 months ago

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

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

[–] elmicha@feddit.de 0 points 4 months ago

Btw you can just use

rm -rf bin

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

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