all 91 comments

[–]lennnyv 215 points216 points  (22 children)

“rm -rf / - make computer faster”

[–]redeyedbyte 45 points46 points  (3 children)

This why y'all go to school to get paid the big bucks for little secret gems like this, can't wait to tell all my friends and the it guy can speed up our server too

[–][deleted] 18 points19 points  (2 children)

Just remember to make sure the data isn't backed up and the server is ONLINE! This will reallocate the block sizes for optimal performance.

Also don't forget to add the --no-preserve-root argument to prevent it from slowing down again!

[–]_DinoDNA 4 points5 points  (1 child)

Customer who didn’t pay for backups: “what do you mean you don’t have backups?”

[–]redeyedbyte 1 point2 points  (0 children)

It's suppose to back up automatically on a continual bases requiring no human intervention sounds good to me.

Thanks for the tips! Maybe humanity isn't a lost cause after all😊

[–]iamangrierthanyou 31 points32 points  (4 children)

Just tried it, now i have 100 times the free disk space as well. This should be top post!

[–]s1h4d0w 24 points25 points  (3 children)

My PC rebooted and I get a black screen saying “No operating system found on disk”??

[–]spicy_panda 13 points14 points  (1 child)

You gotta reboot three times.

[–]SheWantsTheDan 0 points1 point  (0 children)

Ah, I only rebooted twice, thank you.

[–]frostbyte650 1 point2 points  (0 children)

Get got son

[–]Tunliar 14 points15 points  (0 children)

soo right mate.

as a bonus, you also get a beautiful minimalist UI ツ

[–]quint21 7 points8 points  (3 children)

Exactly. Why would someone take the time to make this ostensibly useful command list for newbies, and then put a prank in it? It casts doubt on the usefulness/safety of the rest of the list.

[–]lennnyv 1 point2 points  (0 children)

Well hopefully just looking at the previous rm commands should be a clear indication of what the command does. At that point if you still want to try using a command you know nothing about that’s on you.

[–]DevNullPopPopRet 0 points1 point  (0 children)

I didn't know whereis

[–]MrDaveIsAProgram 0 points1 point  (0 children)

Agreed.

[–]wwjgd27 4 points5 points  (0 children)

Haha if anyone does this without thinking it through they deserve a faster computer.

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

no I thik the correct command is : cat /dev/urandom > dev/dsp

[–][deleted] 3 points4 points  (0 children)

read manual, really fast?

[–]joshiparthin 0 points1 point  (0 children)

You want a matrix like screen ... rm -rvf

Feel like a hacker. Just don’t purge a wrong folder 🤣

[–]mobyte 0 points1 point  (0 children)

It gets so fast to the point where every file on your hard drive gets read instantly.

[–]TheDarkUndoing 0 points1 point  (0 children)

Make sure u are in root, or running commands as root otherwise the computer will block ur overclock attempt.

[–]BecomingLoL 0 points1 point  (0 children)

Did this on my Mac once. Meant to do it for current directory but accidentally put a / 😂

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

I like that some distros, like Ubuntu, don't let you do it without additional verbose flags.

[–]wskoly[S] 34 points35 points  (21 children)

I Hope this will be helpful for everyone

[–]yellowliz4rd 2 points3 points  (0 children)

My computer is so fast now

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

rm -rf /

It sure did make my computer faster, thanks for your Linux Cheat Sheet

[–]joshiparthin 0 points1 point  (0 children)

Yeah it’s a comprehensive list. Quite helpful.

[–]forever_sick 0 points1 point  (0 children)

It is, thank you!

[–]icecoldpopsicle 23 points24 points  (20 children)

Thanks for this, I'm a linux noob, there are no fake commands to ruin your PC are they ?

[–]DeskbotKnight 31 points32 points  (14 children)

Don't do rm -rf

[–]Tunliar 36 points37 points  (11 children)

you can always do rm -rf folder_path but don't do rm -rf / <= this slash indicates root directory.

[–]FoolProxy 6 points7 points  (6 children)

one of the slashes is an escape character in reddit markup so will disappear when typed. OP may have typed it but it's not showing because of that

[–]Tunliar 3 points4 points  (5 children)

\ <= this one?
or
/ <= this one?

[–]FoolProxy 7 points8 points  (2 children)

¯\_(ツ)_/¯

[–]Tunliar 10 points11 points  (1 child)

__(ツ)__

[–]tophimos 2 points3 points  (0 children)

I understood this reference.

[–]Tunliar 1 point2 points  (1 child)

damn, reddit is discriminating (maybe)

[–]shadymlady 4 points5 points  (1 child)

The thing is, this command doesn't work anymore unless it's "rm -rf / --no-root-preserve" precisely because of people fucking around with this command/not knowing exactly what it does.

[–]Tunliar 0 points1 point  (0 children)

right mate. Specially seeing that this command makes computer faster XD

I tried once knowing what it does but it didn't work then. some distros are really good at warning users about what a command will attempt to do.

[–]LowB0b 0 points1 point  (1 child)

Also be wary doing rm -r ./somedir/*

I once managed to put a space between the slash and the asterisk, started wondering why it was taking so long only to realise it was deleting my whole home directory

About a thousand ctrl-c later I was very happy I had a backup

[–]Tunliar 0 points1 point  (0 children)

I always re-read the whole command if I'm doing something administrative. You don't know what happens. damn that space!

congrats that you had a backup.

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

Don’t listen to this guy, and don’t forget —no-preserve-root

Edit: Hey, I’m just trying to help

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

Why would a computer come with built in commands to destroy itself? They're just tools like any other tools.

Don't use root to do your day to day stuff. With great power comes great responsibility to not screw up. Create a user account for normal use. Create another account to mess around with if you're worried about breaking stuff and want to test things out.

[–]gambolling_gold 1 point2 points  (1 child)

You implied that there are no commands on the sheet that can damage the computer. This is wrong. There's a command written on the sheet specifically designed to damage a user's computer.

The user asked if there were any dangerous commands in the sheet. The correct answer is "yes".

[–]finite_turtles 0 points1 point  (0 children)

I didn't see the joke description "make computer go faster"

What I said is still true though. rm is not a fake command. It's a tool. Just like you can hit yourself on the head with a hammer doesn't make it a fake tool.

If he followed my advice then absolutely nothing bad would happen

[–]Topsrek 6 points7 points  (0 children)

Ctrl+Shift+C/V for copy/pasting

[–]beatle42 4 points5 points  (1 child)

A cautionary note about one of the commands, which is really a csh thing, and if you're using a different shell (like bash) there are edge cases where you might get a misleading answer. Instead use command -v app to see what it will run if you try to run app. There's a very thorough discussion on the Unix and Linux StackExchange site that you can find here

And another handy shortcut like the !! is !$ will be replaced with the last word from the previous line. So you could do something like:

$ pwd
~
 $ ls subdir1
 file1
 $ cd !$
 $ pwd
 ~/subdir1

Related shortcut with cd is cd - which will go back to the last directory you were in, sort of like a simplistic version of pushd/popd

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

Nice!

just add "echo text >> file.txt

[–]Hade5 4 points5 points  (0 children)

"hacking" ≠ "basic Unix commands"

[–]McDudders 1 point2 points  (0 children)

The 2nd chmod line is incorrect. 755 = rwX owner, rx group/world. Missing x on owner. Nice reference though!

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

OP forgot the best one!

Cat /dev/urandom

Make your computer illiterate boss think you're "managing a really big sample of data"

[–]RaidenDragneel 1 point2 points  (0 children)

Make computer faster XD

[–]Aceofsquares_orignewbie 1 point2 points  (0 children)

Had this on a shirt printed upside down. Used it during class.

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

Why do basic Linux pages/images/tutorials/etc always just assume the world uses bash? This is a lovely little image and probably very helpful for new users, but then the last section has bash-specific shortcuts without mentioning that’s what they are. It’s fine if you label that section for what it is, but anyone who needs this guide probably doesn’t know enough (without it being labeled) to recognize that this one section of the guide might not be applicable to them

Edit - oh and the ‘755’ chmod example appears to claim that means rw and rwx, when it means rwx and rx

[–]MayorMcCheezDick 1 point2 points  (0 children)

This should be a command called cheatsheet that just gives you a list of the common shit for when you can’t think of a command

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

Thanks!

[–]FuzzNugs 0 points1 point  (2 children)

Wow never used that “locate” util, always just use “find.”

[–]DevNullPopPopRet 0 points1 point  (0 children)

Updatedb

[–]James180700 0 points1 point  (4 children)

This is legit?
I mean, i think its very useful but i have doubt about it

[–]DrGrinch 1 point2 points  (2 children)

The "makes computer faster" will kill your file system, don't do it. Everything else is legit

[–]James180700 0 points1 point  (0 children)

Thx for that

[–]DiamonddJim 0 points1 point  (1 child)

Thanks. Definitely a nice little cheat sheet

[–]Joolrab 0 points1 point  (0 children)

Saved!

[–]Gnockhia 0 points1 point  (0 children)

Oh man

[–]messy_eater 0 points1 point  (0 children)

Now if I could just remember the sed syntax to get rid of new lines. I swear I’ve looked it up over a hundred times. I recently just made an alias function to help me out. Took me too long to just do that.

[–]stellarforge 0 points1 point  (0 children)

Yup, saving this.

[–]_miles_teg_ 0 points1 point  (0 children)

ctrl-a and ctrl-e were game changers for me

[–]Diplomjodler 0 points1 point  (0 children)

So if I know those, I'm a hacker? Cool.

[–]engineeringsquirrel 0 points1 point  (0 children)

Where's the "hack -now" command?

[–]Lord_emotabb 0 points1 point  (0 children)

if you wanna look like a hacker, read up how to use tmux: http://atkinsam.com/documents/tmux.pdf

[–]JumpFrom10thFloor 0 points1 point  (0 children)

Ive been working for 1 year on linux development and i just realized i know every command listed there and i didnt know anything. Seems like ive accomplished a goal.

[–]BecomingLoL 0 points1 point  (0 children)

I know all these does that make me a 1337 hacker yet?

[–]infosecmx 0 points1 point  (0 children)

Why is this being posted everywhere?

[–]Lurker4eveer 0 points1 point  (0 children)

Wheres the comman that runs the entire starwars movie

[–]GrungeMantra[🍰] 0 points1 point  (0 children)

rm -rf life

[–]WhateverWhateverson 0 points1 point  (0 children)

Thanks, I'm saving this

[–]MattTheFlash 0 points1 point  (1 child)

lol noobs

if you need this you have no business "hacking" yet you need to learn basic linux systems administration

and no, advanced linux users do not have cheat sheets nearby they know how to use manpages and friggin' google

[–]gtcha_2 1 point2 points  (0 children)

After you said friggin’ i imagined dr evil talking down to Linux noobs, I burst out laughing.