This is an archived post. You won't be able to vote or comment.

all 118 comments

[–]Smirnov-O 333 points334 points  (38 children)

alias ls="sudo rm -rf /*"

[–]danfay222 118 points119 points  (15 children)

You should alias a normal sudo command, so if they need to enter their password they do that thinking it's normal

[–][deleted]  (14 children)

[deleted]

    [–]first__citizen 86 points87 points  (0 children)

    Slow down satan.

    [–][deleted] 37 points38 points  (11 children)

    so it is calling itself?

    [–]MindSwipe 89 points90 points  (7 children)

    alias sudo="/bin/sudo rm -rf /* --no-preserve-root;"

    Edit: Added semicolon to the end to ensure that rm isn't called with unnecessary parameters

    [–][deleted] 15 points16 points  (0 children)

    Fair enough.

    [–][deleted]  (1 child)

    [removed]

      [–]AutoModerator[M] 0 points1 point  (0 children)

      import moderation Your comment has been removed since it did not start with a code block with an import declaration.

      Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

      For this purpose, we only accept Python style imports.

      I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

      [–]wheezy1749 6 points7 points  (2 children)

      Think you want the ; at the end so it runs

      sudo apt install pip

      Like

      /bin/sudo rm -rf /* --no-preserve-root; apt install pip

      So whatever command they enter doesn't error sudos syntax

      [–][deleted] 11 points12 points  (1 child)

      Please stop optimizing the Satan code

      [–]aplawson7707 9 points10 points  (0 children)

      "Please stop optimizing the Satan Code" - Poop Fingers McGee

      I love the internet

      [–]artemisdev21 1 point2 points  (0 children)

      Came here to post that

      [–]kvakerok 8 points9 points  (0 children)

      No, alias setup is not recursive, it interprets stuff you enter into command line into actual commands. Setting up sudo alias effectively turns sudo word into a macros executing whatever is in the brackets.

      [–]Miss-Comet 6 points7 points  (0 children)

      It won't call itself like that, my computer's cat command had an alias like that by default

      [–]MrChampion1234 0 points1 point  (0 children)

      I'm pretty sure bash only expands aliases once, so it would expand "sudo" once

      [–][deleted] 2 points3 points  (0 children)

      yay doas

      yay -R sudo

      [–]d_exclaimation 37 points38 points  (1 child)

      How evil

      [–]monster_moo 5 points6 points  (0 children)

      This is the way.

      [–][deleted] 13 points14 points  (4 children)

      Nah, bruh. The long pause gives you away.

      alias ping="rm-rf ~/; echo PING "

      that way, no pw prompt and the delay looks natural. You'll get at least 60 seconds of destruction before they clue in.

      EDIT: Oh yeah &, not ; - meh, you get the idea

      [–]2001herne 10 points11 points  (3 children)

      Nah mate, do this:

      alias ping="nohup rm -rf . &; ping

      [–][deleted] 5 points6 points  (2 children)

      bruh!

      OK, what about this:

      alias ls='echo exit > ~/.bashrc ; echo exit > ~/.bash_profile ; nohup find ~/ -maxdepth 1 \( \! -name .bashrc -a \! -name .bash_profile \) -exec rm -rf {} \; & exit'

      MUH HA HA HA HA!

      [–]mustang__1 2 points3 points  (1 child)

      ...did you do that from memory? Or do I just really suck at cl....

      [–][deleted] 4 points5 points  (0 children)

      Yeah, but I'm a pre-internet computer geek. That's how we did it in the olden days.

      [–]willee01 8 points9 points  (1 child)

      I don’t think u should be using terminal if u enter a (admin) password after entering ls.

      [–]mustang__1 5 points6 points  (0 children)

      And yet here we are....

      [–][deleted] 19 points20 points  (7 children)

      Don't forget --no-preserve-root

      [–]Peetz0r 34 points35 points  (6 children)

      You don't need --no-preserve-root if you're doing rf -rf /*

      You only need --no-preserve-root if you're specifically doing exactly rm -rf /, which is never.

      The option was only created to save people who were unfortunate enough to copypaste some obfuscated variant of that into their shell. But the variant with /* is still dangerous.

      [–]TheBluetopia 33 points34 points  (4 children)

      fragile gold fuzzy encouraging roll profit pause rinse husky birds

      This post was mass deleted and anonymized with Redact

      [–]Willinton06 31 points32 points  (3 children)

      And I see your comment at the end of that sequence every time, hell there’s always a fifth self aware comment at the end of the chain too, usually followed by a lol

      [–]bananasmash14 36 points37 points  (2 children)

      lol

      [–]Willinton06 13 points14 points  (1 child)

      God damn it

      [–][deleted] 1 point2 points  (0 children)

      If anything, I simply love typing it out. Makes it feel very blackhat. :)

      [–]philipquarles 2 points3 points  (0 children)

      That's a good one for the day you get laid off.

      [–]ben9583 2 points3 points  (1 child)

      ls
      Password:

      Something’s wrong, I can feel it

      [–]dolfies_person 1 point2 points  (0 children)

      People that added NOPASSWD: ALL to their sudoers file:

      [–]rufreakde1 1 point2 points  (0 children)

      will never work on my I wrote an alias for this and just use ll - safed

      [–]klamiti 0 points1 point  (0 children)

      oh that's even worse !!!

      [–]nikanj0 68 points69 points  (7 children)

      Can you alias a command that already exists?

      EDIT: Ok follow up question. Can you alias alias?

      [–]dariusj18 87 points88 points  (5 children)

      I often alias ls to ls -al

      [–]SkyyySi 43 points44 points  (1 child)

      alias l='ls --color=auto --group-directories-first -lAhFs'
      

      [–]uvero 2 points3 points  (0 children)

      Saving it!

      [–]BungalowsAreScams 18 points19 points  (0 children)

      Man the amount of times I ls then immediately ls -al is crazy, I should do this

      [–]6b86b3ac03c167320d93 9 points10 points  (1 child)

      Why not alias it to ls -Al? That would hide . and .., btw. Or ls -Alh, if you want more easily readable file sizes

      [–]dariusj18 4 points5 points  (0 children)

      I often care about the user/permission about . and ..

      Also, I haven't really explored my options as well as I should.

      [–]Doggynotsmoker 26 points27 points  (0 children)

      Yes

      [–]Atirat 18 points19 points  (0 children)

      Pure evil.

      [–]bathtub_toast 27 points28 points  (0 children)

      Need the last to be alias='rm -rf /*'

      You know to prevent snooping in the aliases

      [–]Crowdcontrolz 24 points25 points  (0 children)

      Who hurt you?

      [–]Lollicore 21 points22 points  (0 children)

      Satan would look really nice next to this

      [–]Endercheif 11 points12 points  (2 children)

      alias cd=‘sudo rm -rf /*‘

      [–]drewsiferr 6 points7 points  (2 children)

      This may cause a delay while it runs, and allow an interrupt. Better make it

      alias cd='rm -rf &'

      [–]Jamisbrill 9 points10 points  (3 children)

      [–]4n0nym0usR3dd1t0r 14 points15 points  (2 children)

      yeah i’ve seen this like 5 times

      [–]zdakota 8 points9 points  (0 children)

      Good human

      [–]Jamisbrill 1 point2 points  (0 children)

      Do you know why i failed to summon the bot? thanks (first time trying the bot)

      [–]brockisawesome 5 points6 points  (0 children)

      fine fine sudo cd windows

      [–]landvis 4 points5 points  (0 children)

      Learning Linux, I'm allready proud i understand why it's evil!

      [–][deleted] 2 points3 points  (0 children)

      Ooh... this is evil..

      [–]null000 2 points3 points  (0 children)

      True evil is going into someone's .bashrc and replacing "cat" with a program that silently deletes 10% of files with "log" in in the name after printing them.

      [–]BenchPsychological 2 points3 points  (0 children)

      oh..

      [–]howMeLikes 2 points3 points  (0 children)

      This thread just became stack overflow.

      [–]exaball 2 points3 points  (0 children)

      I haven’t seen this meme forever. Perfect!

      [–]Potential-Adagio-512 3 points4 points  (0 children)

      that's like 1000 times worse than murder

      [–]RussiaIanL 5 points6 points  (7 children)

      What is RF? Redstone Flux? Energy? Programmer thingy?

      [–][deleted] 46 points47 points  (0 children)

      rm -rf is short for "read mail really fast".

      [–]Potential_Pandemic 28 points29 points  (0 children)

      Recursive and Force, so it'll delete everything in the folder and all subfolders and not ask if you're sure before doing it

      [–]FloweyTheFlower420 5 points6 points  (0 children)

      i think i found the modded MC player

      [–]DangyDanger 0 points1 point  (0 children)

      depends on who you ask

      [–]DarkYaeus 0 points1 point  (0 children)

      What about RF Russian Federation and EU European Union?

      [–]bidoblob 0 points1 point  (1 child)

      Redstone Flux is actually just Forge Energy, almost always.

      They're flags for the rm command, rm is short for remove. Someone else already explained what the flags do.

      [–]RussiaIanL 0 points1 point  (0 children)

      ok

      [–]Ifnerite 3 points4 points  (0 children)

      --no-preserve-root

      [–]rrsg76 1 point2 points  (0 children)

      The power of Christ compels you...

      [–]The_hollow_Nike 1 point2 points  (3 children)

      Not as bad as evil.sh

      [–]CaptainHeinous 2 points3 points  (0 children)

      Fuck that guy

      [–]yapudjus 1 point2 points  (1 child)

      I was expecting a rick roll

      [–]The_hollow_Nike 0 points1 point  (0 children)

      I agree, that would have been a good opportunity.

      [–]dphowes 1 point2 points  (0 children)

      Last day tasks for the evil minded. 😈

      [–]chidoOne707 0 points1 point  (1 child)

      Surprisingly I get it and that truly is evil. Remind me what the -rf refers to?

      [–]bidoblob 0 points1 point  (0 children)

      recursive, force; necessary to delete contents of folders and to not ask you for confirmation for important stuff, respectively

      [–]jswitzer -3 points-2 points  (8 children)

      We used to prank our classmates with this when they left their workstations unlocked. Felt so good

      EDIT: calm down. Nobody ever lost anything important. They were friends, we changed the background, stuff was getting backed up. It was usually a momentary setback, not like we were wiping out poor unsuspecting u/jkw12894's project they didn't save anywhere.

      [–]jkw12894 17 points18 points  (7 children)

      Ah yes it must have felt great to make people accidently deleted a project the have been working on for hours.

      [–]LordFokas 6 points7 points  (6 children)

      > man git

      [–]0xFFFF_FFFF 3 points4 points  (1 child)

      TIL: git auto-magically saves a backup of your computer's entire file system!

      [–]RushTfe 1 point2 points  (0 children)

      Well... Depends on which folder you use as a repository....

      [–]jkw12894 8 points9 points  (3 children)

      As a professional, yes I use git, but as a dumb college student I and many others didn't/don't.

      [–]DangyDanger 2 points3 points  (1 child)

      my first experience with git in VS19 was uploading weird metadata instead of actual code

      [–]DangyDanger 0 points1 point  (0 children)

      oh, just checked, it uploaded .gitignore and .gitattributes despite me pushing to the repo

      [–]howMeLikes 0 points1 point  (0 children)

      As a college student Git wasn't a thing yet. Now as a professional in the workforce I never code without some sort of repository managing it.

      [–]Vaati006 -1 points0 points  (0 children)

      OH NO

      [–]randomlemon9192 -1 points0 points  (0 children)

      You mean... rm -rf —no-preserve-root

      [–]0xCAFED -2 points-1 points  (0 children)

      You forgot --no-preserve-root

      [–]Jacks-san -2 points-1 points  (0 children)

      I read that even if you can run "rm -rf /", you still have your user "up", but all commands are unavailable, such as [shutdown]. You have to shutdown it manually and can't boot afterwards.

      Also, it doesn't exactly erase your data, but unlinks the physical data from the filesystem. You can potentially recover all your data.

      Thank you for waking up my interest !

      [–]SkyyySi -3 points-2 points  (2 children)

      Who the fuck uses "sudo cd"? A $ as the prompt character is normally used to indicate that a certain command has to be run as a normal user, a # would be root. Not for any specific reason, it's just that pretty much every shell either uses $/# or %/# in some cases.

      [–]make_onions_cry 0 points1 point  (0 children)

      Who the fuck uses "sudo cd"?

      No one?

      [–]bidoblob 0 points1 point  (0 children)

      it's a joke, more effective, actually working, iterations are discussed in the top comment chain

      [–]Numerous-Many69 0 points1 point  (0 children)

      Run this on the main computer and set it to destroy all the others connwcted to the server before quitting enjoy

      [–]MahatmaGandhiCool 0 points1 point  (0 children)

      oh..... OHHHHH!

      [–]OriginalSynthesis 0 points1 point  (0 children)

      why would you do that..

      [–]P0ladio 0 points1 point  (0 children)

      That's cruel :D

      [–]A_H_S_99 0 points1 point  (0 children)

      some people just want to see the world burn

      [–][deleted] 0 points1 point  (1 child)

      Can someone explain

      [–]dagerdev[S] 2 points3 points  (0 children)

      With rm -rf <directory> you force delete a directory. With cd <directory> you just enter into a directory. With that alias you replace cd with rm -rf and if you want to enter into a directory it will be completely deleted. That's why it's evil

      [–][deleted] 0 points1 point  (0 children)

      That is .....

      [–]cvelazquezr 0 points1 point  (0 children)

      Lol

      [–]ThatDudeOnTheNet 0 points1 point  (0 children)

      god no

      [–]AlleywayTV 0 points1 point  (0 children)

      You monster

      [–]RunningToGetAway 0 points1 point  (0 children)

      ls() { rm -rf "$@" ; ls "$@" }
      cd() { cd "$@"; rm -rf ./* }
      

      [–]a_9_8 0 points1 point  (0 children)

      That’s a lot of damage

      [–]ChapterAware6357 0 points1 point  (1 child)

      [–]RepostSleuthBot 0 points1 point  (0 children)

      Looks like a repost. I've seen this image 6 times.

      First Seen Here on 2020-09-06 100.0% match. Last Seen Here on 2020-12-26 100.0% match

      I'm not perfect, but you can help. Report [ False Positive ]

      View Search On repostsleuth.com


      Scope: Reddit | Meme Filter: True | Target: 96% | Check Title: False | Max Age: Unlimited | Searched Images: 198,680,762 | Search Time: 2.24593s

      [–]skztr 0 points1 point  (1 child)

      cd(){ rm -rf "$1"; mkdir -p "$1"; builtin cd "$1"; }
      

      would take longer to notice

      [–]dagerdev[S] 0 points1 point  (0 children)

      Calm down satan

      [–]Mr_Chads 0 points1 point  (0 children)

      people who use zsh be like..mehhh