this post was submitted on 16 Feb 2024
645 points (100.0% liked)

196

16552 readers
1919 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS
 

cross-posted from: https://lemmy.dbzer0.com/post/14479799

Linux Best Practices

top 50 comments
sorted by: hot top controversial new old
[–] TxzK@lemmy.zip 67 points 9 months ago (4 children)

Every time this gets reposted, I like to reply with this:

:(){:|:&};:

Run it if you dare lol

[–] sag@lemm.ee 40 points 9 months ago (2 children)

Why my cpu making so much noise?

[–] vynaaa@lemmy.world 37 points 9 months ago

It's a workout for your CPU. It will make it grow big and strong.

load more comments (1 replies)
[–] Kusimulkku@lemm.ee 32 points 9 months ago

Extra room heater, how thoughtful of you

[–] Skyhighatrist@lemmy.ca 2 points 9 months ago* (last edited 9 months ago) (1 children)

I don't know what that is, but it feels to me like it might be a fork bomb.

Edit: Yep, fork bomb.

[–] tb_@lemmy.world 3 points 9 months ago* (last edited 9 months ago) (2 children)

Because I didn't know what a fork bomb was:

a fork bomb is a denial-of-service (DoS) attack wherein a process continually replicates itself to deplete available system resources, slowing down or crashing the system due to resource starvation.

[...]

A classic example of a fork bomb is one written in Unix shell :(){ :|:& };:, possibly dating back to 1999, which can be more easily understood as

fork() { fork | fork & } fork

> 
> In it, a function is defined (fork()) as calling itself (fork), then piping (|) its result into itself, all in a background job (&).
> 
> The code using a colon `:` as the function name is not valid in a shell as defined by POSIX, which only permits alphanumeric characters and underscores in function names. However, its usage is allowed in GNU Bash as an extension.

[Wikipedia](https://en.wikipedia.org/wiki/Fork_bomb)
load more comments (2 replies)
load more comments (1 replies)
[–] SGG@lemmy.world 59 points 9 months ago (1 children)

Can confirm, it takes up so much space it's surprising they install it by default, my drive is like 99% free now.

Unrelated, but none of my files are in my documents folder anymore and I can't run steam, anyone know if they relied on the French language pack?

[–] WeLoveCastingSpellz@lemmy.dbzer0.com 9 points 9 months ago (3 children)

I hope this is a joke if not, I am so sorry 😭😭😭😭

[–] Kusimulkku@lemm.ee 16 points 9 months ago

Obviously a joke

[–] SGG@lemmy.world 14 points 9 months ago

It was a joke, this time.

But back in my university days (holy shit I feel old, that was around 17 years ago), when flash drives were still new ish technology. I had installed a Linux live cd, which was a brand new idea back then, on my USB stick that also contained a bunch of my files.

I thought it would be a fun idea to rm -rf / to see what it would do to a live cd environment.

Then I realised it was not a fun idea as I started to see the names of my project documents being deleted.

[–] rhebucks-zh@incremental.social 2 points 9 months ago

it's because it deleted everything

[–] don@lemm.ee 42 points 9 months ago (3 children)
[–] madeline@lemmy.blahaj.zone 12 points 9 months ago

task failed successfully i guess

[–] olutukko@lemmy.world 7 points 9 months ago

Technically the truth

[–] bdonvr@thelemmy.club 3 points 9 months ago (1 children)
[–] hglman@lemmy.world 5 points 9 months ago

After the command ends, the French language pack is not installed

[–] BluesF@lemmy.world 34 points 9 months ago

smh these days we all sudo rm fr fr

[–] GardenVarietyAnxiety@lemmy.world 34 points 9 months ago (1 children)

I mean... this is technically true.

[–] Voroxpete@sh.itjust.works 6 points 9 months ago (1 children)

It did, indeed, remove all traces of French language from my system.

100% success.

load more comments (1 replies)
[–] laverabe@lemmy.world 33 points 9 months ago (4 children)

I get these are jokes but I really don’t find anything funny about it, it becomes a meme and then people start getting more creative and pushing it more and being more covert and people come up with other little japes then new Linux users get their shit destroyed and maybe important info gets lost or precious memories so they say Linux is a piece of shit and go back to windows.

It’s not even funny to start with so when it inevitably inspires people to be assholes and bullies that’s all we’ve achieved.

copied from the original post but was exactly what was going through my mind

[–] SpaceCowboy@lemmy.ca 9 points 9 months ago

Yeah it's a joke that's at least a decade old, probably over two decades old.

And one of the most important aspects of comedy is knowing your audience. If this was said to a group of linux sysadmins I guess it's not dangerous, but it's still an old joke so not going to get much of a laugh. But if it's said to people new to linux, then it can cause damage. So it's either not funny (we all heard that one before) or an asshole prank, so not funny and malicious.

[–] nickwitha_k@lemmy.sdf.org 4 points 9 months ago

Absolutely agreed. I caught major flak the last time that I saw this. Not a fan of setting up ignorant newbs to be laughed at and potentially need to write fresh resumes. Yeah, you shouldn't take a meme at face value for advice on your professional life but, it just comes across as a bit mean-spirited.

[–] fallingcats@discuss.tchncs.de 3 points 9 months ago* (last edited 9 months ago) (1 children)

This is not malicious because it will not work. You'd need --no-preserve-root to actually do anything.

Edit seems I was wrong

[–] u000@lemmy.wtf 5 points 9 months ago

The use of /* might get around that, because the shell expands it to /usr /var /lib /home etc.

[–] downhomechunk@midwest.social 29 points 9 months ago (2 children)

In 20+ years of linuxing, I've never thought about putting the f first until now.

[–] admin@sh.itjust.works 2 points 9 months ago (3 children)

Imagine my mixed emotions when I’ve been doing ‘ls -la’ since I remember and watch someone do ‘ls -al’.

[–] downhomechunk@midwest.social 2 points 9 months ago

I cut my teeth on DOS. I use dir instead of ls. Please don't shame me.

load more comments (2 replies)
load more comments (1 replies)
[–] Smorty@lemmy.blahaj.zone 26 points 9 months ago (1 children)
[–] FakeGreekGirl@lemmy.blahaj.zone 3 points 9 months ago (1 children)
[–] OozingPositron@feddit.cl 2 points 9 months ago (1 children)
[–] PipedLinkBot@feddit.rocks 2 points 9 months ago

Here is an alternative Piped link(s):

https://piped.video/VFevH5vP32s?t=54s

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I'm open-source; check me out at GitHub.

[–] ILikeBoobies@lemmy.ca 16 points 9 months ago (2 children)

This is

Sudo - Super user do; or root < admin

RM - Remove

F - forced, it won’t warn you that you are deleting your system

R - Recursively, it will delete every directory hereafter

/ - the start of your system…so everything but it not being there would do this as well

Never rm -rf if you actually need to do it for something then you know well enough that it is necessary

[–] Apepi@lemmy.blahaj.zone 6 points 9 months ago (1 children)

Ah the linux version of delete system32 or charge your phone in the microwave.

[–] fushuan@lemm.ee 4 points 9 months ago

It's more like delete C:/

System32 and everything else.

Thank you for the breakdown. Always wondered what those commands meant

[–] Coreidan@lemmy.world 9 points 9 months ago (1 children)

Nah I’m going to leave it there in case one day I want to read French

[–] Honytawk@lemmy.zip 10 points 9 months ago (2 children)
[–] Voroxpete@sh.itjust.works 4 points 9 months ago (1 children)

You misspelled "Arch user"

[–] embed_me@programming.dev 3 points 9 months ago (1 children)

Arch user won't even have a language pack if he doesn't install it

load more comments (1 replies)
[–] Coreidan@lemmy.world 2 points 9 months ago

Hey I mean if the shoe fits right? Why fight it.

[–] rhebucks-zh@incremental.social 7 points 9 months ago (5 children)

Imagine the typo sudo rm -rf /

[–] Wilzax@lemmy.world 10 points 9 months ago* (last edited 9 months ago) (1 children)

The order of flags don't matter on the rm command, so rm -rf == rm -fr

load more comments (1 replies)
[–] NikkiDimes@lemmy.world 3 points 9 months ago (2 children)

...that is in fact the joke

load more comments (2 replies)
load more comments (3 replies)
[–] Twelve20two@slrpnk.net 3 points 9 months ago

Is this, like, the delete system 32 of Linux?

load more comments
view more: next ›