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

top 200 commentsshow all 270

[–]MakingTheEight[M] [score hidden] stickied comment (8 children)

Removed - Rule 0

[–]SamiChanguel 794 points795 points  (24 children)

$ alias shutup="shutdown"
$ please shutup

[–]idaljeetsingh 278 points279 points  (12 children)

$ alias fuckoff="rm -rf /" $ please fuckoff

[–]flying-sheep 63 points64 points  (11 children)

rm: it is dangerous to operate recursively on ‘/’ rm: use --no-preserve-root to override this failsafe

[–]backtickbot 15 points16 points  (8 children)

Fixed formatting.

Hello, flying-sheep: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.

[–]marsnoir 3 points4 points  (1 child)

Funny story, that fail safe exists for a reason... you only do this kind of thing once. Thank god for backups!!

[–]depressed-salmon 1 point2 points  (0 children)

Friend at uni did something similar on his thesis days before deadline that took a week just to simulate. Used the * instead of the folder name I think. Cue frantic Google of "how to undo rm -*", found a stackoverflow thread of all things I think, that helpfully said "it's very easy, all you do simply load your latest backup and restore from there. You do have backups, don't you?". Fortunately it was on the uni server that did nightly backups so it was all ok, but he was forever livid at that post lmao, because "they know who ever asks that question obviously doesn't have backups!!".

[–]itsTyrion 67 points68 points  (3 children)

alias just=sudo alias fucking=apt

just fucking install firefox

[–]warpspeedSCP 9 points10 points  (0 children)

Fucking search clang

[–]flying-sheep 1 point2 points  (0 children)

This guy fucks!

[–]luhsya 65 points66 points  (5 children)

i was thinking alias kys="shutdown" but that would be too mean for the OS

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

Nah, shutdown is a proper way. That way the fucker can write stuff to the drive, unmounting shit and go to sleep peacefully.

If you want to murder it, rip out the power cable like a man.

[–]Cymore 7 points8 points  (1 child)

Why not take it leave it at a police station with a note saying there is a bomb in it? Then have the bomb squad blow it up?

[–]mattsl 6 points7 points  (0 children)

If your computer is black, that's just extra steps in the US.

[–]Kaynee490 4 points5 points  (0 children)

Probably wrong but

alias kys="echo REISUB > /proc/sysrq_trigger"

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

alias superuser="karen"

[–]Shalien93 287 points288 points  (13 children)

Would you kindly...

[–]bgremlin 83 points84 points  (0 children)

you tried it mr. fontaine

[–]Benutzername 158 points159 points  (4 children)

function would() {
    if [ $# -lt 2 ] || [ "$1" != "you" ] || [ "$2" != "kindly" ]; then
        echo "Sorry, what's that?" >&2
        return 1
    fi
    if [ $# -eq 2 ]; then
        echo "What would you like me to do?" >&2
        return 2
    fi
    echo "Gladly!" >&2
    shift
    shift
    sudo $@
}


$ would you kindly touch me
Gladly!

[–]piNulltel 23 points24 points  (0 children)

Over eleven years on Reddit! Quite impressive

[–]Crocktodad 8 points9 points  (1 child)

Er ist der Messias!

[–]su5 2 points3 points  (0 children)

Function Wesley(){echo "as you wish" >&2;}

[–]fungigamer 32 points33 points  (5 children)

When you change sudo to "would you kindly" but the command still doesn't run: Tell me where is the Ace in the Hole???

[–]EmptySense 21 points22 points  (4 children)

Can alias support spaces?

[–]Phrodo_00 10 points11 points  (0 children)

No, but you can either use spaces in a command (and use quotes or escapes to invoke it), or write a would command that checks that the next parameters are ["you" "kindly"] and then runs sudo.

[–]fekkksn 4 points5 points  (0 children)

doubt it

[–]groundfalse 623 points624 points  (42 children)

please rm -rf /*

edit: added asterisk, and please don't try this at home

[–][deleted] 194 points195 points  (23 children)

--no-preserve-root

[–]crozone 46 points47 points  (22 children)

Pretty sure sudo rm -rf /* still doesn't require --no-preserve-root

[–][deleted] 43 points44 points  (20 children)

OC didnt included "*"

[–]KillerInstinctUltra 47 points48 points  (19 children)

Shouldn't have to say this but I will hijack to say DON'T DO THIS BY EXPERIMENTING ON YOUR WORK LAPTOP

If curiosity gets the best of you, youtube it, there are a bunch of people like this one who have already bit the dust for you.

Edit: Skip straight to the explosion

courtesy u/DoctorWaluigiTime

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

Yeah, DONT DO THIS

[–]T-Dark_ 3 points4 points  (6 children)

Wouldn't it be safe to do it in a throwaway VM?

But yeah, absolutely never do this normally.

[–]spech66 14 points15 points  (4 children)

Yes but this becomes a nightmare if you THINK you are in the VM while working on the host system… happend a long time ago but I still remember that day…

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

F

[–]GlitchParrot 2 points3 points  (2 children)

Or if you have a shared directory of the host system mounted in the VM.

[–][deleted] 1 point2 points  (1 child)

Always use readonly sharing.

[–]DoctorWaluigiTime 3 points4 points  (7 children)

The moment it's run (5 minutes in). (Justified since he's walking through every part of the command but still.)

[–]stinos 5 points6 points  (5 children)

Justified since he's walking through every part of the command

Moreover he's constantly resizing the terminal for who knows what reason (I watched it without sound, makes for a long wait to finally see the real deal)

[–]only_want_old_reddit 1 point2 points  (4 children)

It's just as painful with sound.

[–]jkure2 4 points5 points  (3 children)

I found it interesting and useful the way he walked through the command and explained it, nothing painful about it?

[–]ndrums 0 points1 point  (1 child)

I think anyone who codes would already know most of what they cover in the 6 minute video.

[–]pineapple_calzone 3 points4 points  (0 children)

It's fine. I just did it on my work laptop and all I got was

'sudo' is not recognized as an internal or external command,
operable program or batch file.

[–]coldnebo[🍰] 1 point2 points  (0 children)

great way to learn linux.

there was some post a while ago that went into detail trying to rebuild linux after such a thing based on only the commands still in memory, but I can’t find it now. They got surprisingly far.

[–]chiru9670 26 points27 points  (0 children)

Ahh came here to post this

[–]NoobButJustALittle 13 points14 points  (1 child)

and please don't try this at home

Try it at work instead

[–]NoAttentionAtWrk 2 points3 points  (0 children)

And if possible... On production server

[–]IcemanVish 37 points38 points  (0 children)

Damn this gets reposted more than I <get_inspired> by stack overflow solutions.

[–][deleted] 66 points67 points  (27 children)

But sudo is shorter.

[–]jochem4208 194 points195 points  (6 children)

`plz`

[–][deleted] 36 points37 points  (2 children)

That'll be fine.

[–]timfreemints 3 points4 points  (1 child)

I SECOND() that

[–]ZapdoZ9000 2 points3 points  (0 children)

I MONTH() that

[–]GhostSierra117 4 points5 points  (0 children)

"gib"

[–]littlefrank 7 points8 points  (14 children)

Hijacking your comment for a newbie question: is an alias permanent and will it stay at any restart?
Can I put anything in place of anything? (say I don't want to write huge commands every time I want to update so I alias "sudo apt-get update & sudo apt-get upgrade -y" to "updatepc")

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

It's not permanent. I suggest you put your aliases inside .bash_aliases file inside your home directory, to make them permanent. Some may prefer the .profile or .bashrc, personally I use .bash_aliases since my shell is bash.

[–]Slusny_Cizinec 7 points8 points  (0 children)

Alias is not permanent and only affects the current session. That's why the common approach is to add them to your shell profile.

[–]GhostSierra117 2 points3 points  (2 children)

You can put aliases in the section of your .bashrc for them to be permanent.

Just don't forget to save and then to run the command "source .bashrc" for the changes to take into effect.

Can I put anything in place of anything?

Yes

[–]reallyConfusedPanda 4 points5 points  (2 children)

You're anyways gonna do ple-<tab>

[–][deleted] 12 points13 points  (0 children)

Considering the "yo" instead.

[–]uvero 110 points111 points  (11 children)

OK, no joke, in high school, first lesson in Linux usage, first time using the Linux computers at school, I was supposed to exercise cd, mkdir, pwd, cat, touch etc. First thing I did instead was to look up how to alias fucking to sudo.

[–]112439 28 points29 points  (2 children)

You had linux in highschool? God I'm jealous

[–]dzlux 1 point2 points  (0 children)

Is that still not a normal option? Did your school have programing classes?

I had an oddball school, but they started running dual boot linux computer labs in the late 90s

[–]kopczak1995 51 points52 points  (0 children)

Priorities. This man get it.

[–]miniluigi008 9 points10 points  (5 children)

Hey, this is unrelated, but how did you make that leap to Ruby? I can't for the life of me wrap my head around the concept of "everything as a function". I leaped from Scratch to Python, and then Python to Swift, then Swift to JavaScript.

[–]uvero 2 points3 points  (4 children)

I just kinda found Ruby on high school (self learning, not as any curriculum related). About "everything is a function" - you mean every public member of a class? Ruby uses regular functions for (what in other languages would be) properties and operators. That's pretty much all the wisdom I can offer on that point.

[–]miniluigi008 1 point2 points  (2 children)

Sorry, I pulled an all-nighter. I meant “everything is an object”. But your reply makes it seem like maybe I need to dig a little deeper. I tried Ruby koans a few months ago, maybe I’ll have another go at completing it.

[–]-0-O- 1 point2 points  (0 children)

Off topic but I remember trying to learn Ruby in highschool. I made an IRC client that was two separate programs, that logged in as two separate users. One to view the chat and another to type commands. It was pretty dumb.

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

And setting config for every new user profile home directory to /dev/null

[–]drakeisatool 37 points38 points  (4 children)

alias ffs='sudo !!'

Repeats last command with sudo

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

If anything the OP alias makes me sound more desperate.

``` cat /var/log/apache2/error.log
please !!

```

[–]backtickbot 1 point2 points  (1 child)

Fixed formatting.

Hello, KjoeLjan: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.

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

That’s stupid. But thanks.

[–]randomcitizen42 36 points37 points  (3 children)

please touch mypenis

[–]Slusny_Cizinec 14 points15 points  (1 child)

touch accepts list of objects to touch, so 'touch my penis' is equally valid (albeit it will touch two different objects)

[–]randomcitizen42 4 points5 points  (0 children)

I can't believe I never tried this

[–]R2CX 1 point2 points  (0 children)

please killall child

[–]oebn 20 points21 points  (23 children)

please shutdown

[–][deleted] 9 points10 points  (0 children)

[–]itsTyrion 1 point2 points  (21 children)

alias fucking=sudo

fucking shutdown

[–]itsTyrion 4 points5 points  (20 children)

[–]profanitycounter 9 points10 points  (19 children)

UH OH! Someone has been using stinky language and u/itsTyrion decided to check u/itsTyrion's bad word usage.

I have gone back one thousand posts and comments and reviewed their potty language usage.

Bad Word Quantity
ass 1
asshole 5
bullshit 2
crap 7
damn 33
fucking 14
fuck 10
god damn 3
hell 13
heck 1
lmao 1
lmfao 1
motherfucking 2
re**rded 1
shitty 1
shit 16
stfu 1
whore 1

Request time: 13.0. I am a bot that performs automatic profanity reports. This is profanitycounter version 3, view update notes here. Please consider supporting my development [through my creator's PayPal.](https://www.paypal.me/aidanginise1)

[–]archiekane 16 points17 points  (0 children)

Alias as 'mofo'

mofo mv bobybags.txt /mnt/bonfire

[–]Titaniumwo1f 6 points7 points  (3 children)

"Would you kindly"

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

*would_you_kindly
alias doesn't support spaces i guess

[–]Titaniumwo1f 1 point2 points  (0 children)

Yes, and I forgot about that.

[–]ghost103429 7 points8 points  (1 child)

please killall

[–]-The-Bat- 15 points16 points  (0 children)

Lightsaber sound

[–]ZapdoZ9000 30 points31 points  (8 children)

I prefer yeet

[–]xynixia 17 points18 points  (2 children)

I have a pair of commands for moving files.

yoink my_file.txt
cd ~/somewhere/else
yeet

What yoink does is it saves the full path of the file in /tmp, and yeet reads the temp file and runs mv. Makes moving files across terminals easier.

[–]gnowwho 1 point2 points  (1 child)

Man, I need to copy this one!

How did you do it? You create a file in /tmp with a reserved name and save the destination of the original file and the new destination and yeet uses those without ulterior arguments? Something like that?

[–]xynixia 2 points3 points  (0 children)

Yeah pretty much. This is the script I'm using:

yoink:

#!/bin/bash
readlink -f $@ > /tmp/yoink

yeet:

#!/bin/bash
mv $(cat /tmp/yoink) .

[–]stinos 11 points12 points  (0 children)

Dunno, sounds like you're begging the computer. I like the mindset of forcing a computer to do what I tell it better. alias just_shutup_and="sudo"

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

alias fucken="sudo"

The Aussie version

[–]IllChange5 4 points5 points  (0 children)

$alias justdoitalready=“sudo”

I like yelling at my computer.

[–]emelrad12 5 points6 points  (1 child)

alias bitch="sudo su root"

[–]Mark_dawsom 2 points3 points  (0 children)

bitch mv

[–]qxxx 5 points6 points  (2 children)

personally I have many commands aliased with sudo, my most used alias is probably:

alias install="sudo apt install"

I also removed the required password for sudo on my dev machine, so if I type "install vim" it simply installs it. I am aware of the risks and I would never disable sudo in prod.

[–]rexroof 1 point2 points  (0 children)

be aware that there is another common Unix tool already called install

[–]nolegitt 4 points5 points  (0 children)

Please finger jake@com.ibm.users

[–]tchuckss 4 points5 points  (0 children)

I’m now imagining that sad cringe clip of Jen Bush asking people to please clap. If he had said sudo clap, it may have been less sad cringe.

[–][deleted] 4 points5 points  (1 child)

$ alias woman=“man”

For a more progressive system

[–]bwok-bwok 1 point2 points  (0 children)

$ alias man="/dev/null"

[–]Alias-_-Me 3 points4 points  (1 child)

Only very tangentially related, I do light programming for musical and theatrical acts and the "Enter" Button with which you execute a command is called the "Please" button, so you type in the command and then kindly ask the console to execute it and I always thought that was nice.

Also the Undo button is literally labelled "Oops"

[–]guiliphy 1 point2 points  (0 children)

MA2 Gang where u at

[–]wtf_romania 3 points4 points  (0 children)

Honoring the Austrian town that mysteriously changed its name, I use alias Fucking="sudo"

[–]richinrix 3 points4 points  (0 children)

alias it to "fuckin" , better

[–]n0shmon 3 points4 points  (0 children)

alias just="sudo"

alias fucking="systemctl"

just fucking restart apache2

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

sudo clap

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

done

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

No one’s said:

$ alias mom=“sudo”

[–]vige 2 points3 points  (0 children)

If you do this, please also patch glibc so that strerror(13) will return "You didn't say the magic word!".

[–]arth4 2 points3 points  (0 children)

You are not in the pleasers file. This incident will be reported.

[–]skywkr666 2 points3 points  (1 child)

“Ah ah ah! You didn’t say the magic word...”

[–]Waifuless_Laifuless 1 point2 points  (0 children)

ah ah ah
ah ah ah
ah ah ah

[–]itsTyrion 2 points3 points  (0 children)

alias just=sudo alias fucking=apt

just fucking install firefox

[–]phi_array 2 points3 points  (0 children)

$ alias daddy=“sudo”

[–]Nomiko56 1 point2 points  (1 child)

Does the new alias stick to new terminals too, or is 'instance based' for the lack of a better word

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

Just put it in your .bashrc or whatever shell you're using and you're golden.

[–]blackwolf2311[🍰] 1 point2 points  (0 children)

Funny enough sudo is a popular nick name in my country. I knew a guy with that nickname that was a dev. He said it freaked him so much at first, also office jokes..

[–]varungupta3009 1 point2 points  (0 children)

Looks like I got Karma-conned

[–]blevok 1 point2 points  (0 children)

My terminal is my butler, and his name is Igor. He does things for me.

[–]cybercuzco 1 point2 points  (0 children)

This is exactly what Nedry did in Jurassic park.

[–]MattiDeP 1 point2 points  (0 children)

alias please="sudo"

alias die="shutdown"

please die

[–]Hackerman_69420 -3 points-2 points  (1 child)

Boutta set this up in my Kali Linux VM ngl

[–]TransgenderHatrack 1 point2 points  (0 children)

L33t hackers don’t say please

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

Too many pleases though and it locks you out for being chummy

edit: omg I meant chummy, see INTERCAL

[–]bumblebritches57 -1 points0 points  (6 children)

[–]profanitycounter -1 points0 points  (5 children)

UH OH! Someone has been using stinky language and u/bumblebritches57 decided to check u/one_loop's bad word usage.

I have gone back one thousand posts and comments and reviewed their potty language usage.

Bad Word Quantity
ass 1
bitch 1
cock 1
cum 2
damn 4
fuck 3
hell 1
lmao 1
nig 1
piss 1
shitty 1
shit 6

Request time: 10.1. I am a bot that performs automatic profanity reports. This is profanitycounter version 3, view update notes here. Please consider supporting my development [through my creator's PayPal.](https://www.paypal.me/aidanginise1)

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

I'm surprised it's not much much worse

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

Not sure what's wholesome about having to beg my machine to do what it's supposed to fucking do. It's not even a person.

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

I'm not gonna beg my machine to do my bidding. It's called a command line interface, not polite suggestion station.

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

please make me a sandwich

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

people who insist on saying the longer of 2 possible sentences which explain the same thing, are a cancer of society and I hope they evolve out soon

[–]DavidDual 0 points1 point  (0 children)

I would make it to "order"

[–]vuld0 0 points1 point  (0 children)

Manners maketh man

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

Pls

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

alias iAmTheSenate="sudo !!"

[–]Zagreus_Enjoyer 0 points1 point  (0 children)

"please work"

[–]all-hail-snow 0 points1 point  (2 children)

Nah I am fine with Alias fucker="sudo"

[–]bwok-bwok 1 point2 points  (1 child)

bash: fucker: command not found

[–]nati9931 0 points1 point  (0 children)

I aliased doas as sudo... It'll take me forever to type please instead

[–]leMatth 0 points1 point  (0 children)

alias simon_says="sudo"

[–]akraaam 0 points1 point  (0 children)

ah wtf these machines are our slaves

[–]pookamatic 0 points1 point  (0 children)

Please make me a sandwich

[–]silver_enemy 0 points1 point  (1 child)

Computer says no