Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Captain Awesome

macrumors regular
Original poster
Jul 1, 2009
170
0
Vancouver/Tsawassen, Canada
I was surprised to not find one of these threads here. Thought I might as well start one. Here is a list of commands you should NEVER run in Terminal unless you're sure what you are doing. There are fake tutorials around that will try and get you to run these:

DO NOT PASTE THESE COMMANDS IN TERMINAL.

1) Erase everything on hard drive with no warning:

Code:
rm -rf /
Code:
rm -rf *

2) Erase everything in Home folder with no warning:

Code:
rm -rf ~/

3) Instantly format current drive:

Code:
mkfs.(anything)

4) Forkbomb. Will keep executing processes until the system freezes:

Code:
:(){:|:&};:
Code:
fork while fork

5) Open every application in /Applications at once:

Code:
open /Applications/*

Feel free to add to the list.
 
People who blindly execute Terminal commands without knowing what they mean deserve what they get.

Most of those will also need a `sudo` to be the most harmful BTW
 
  • Like
Reactions: old-wiz
will do nothing with out being root or Sudo. and i herd somewhere, but i have no clue the validity, that Apple changed the OS so you couldn't do
Code:
Sudo rm -rf /

dont wanna try it :p
 
this worries me. because, i am one of the people that will search the internet and find something that will "open all safari windows in tabs" or whatnot, and blindly paste the info into terminal. Although, i do try to stick to trusted mac hint/tip websites
 
this worries me. because, i am one of the people that will search the internet and find something that will "open all safari windows in tabs" or whatnot, and blindly paste the info into terminal. Although, i do try to stick to trusted mac hint/tip websites

Don't do that then. Make sure you can read what a command is doing before you use it. For the most part though defaults write can't do much harm.
 
Awesome, I was looking for this baby (although I'd like the look of the one with foo instead)
:(){:|:&};:
Apparently you need to run it for as many cores to really test it out? or was that the yes > null command?
 
The fork bombs don't actually hurt your system though do they? won't they just crash the computer and a restart will fix everything?

Yeah, it basically a bottomless tree of threads. But it crashes your computer o so efficiently.

EDIT: or not...all I get is a pile of "-bash: fork: Resource temporarily unavailable" and nothing.
 
Yeah, it basically a bottomless tree of threads. But it crashes your computer o so efficiently.

EDIT: or not...all I get is a pile of "-bash: fork: Resource temporarily unavailable" and nothing.

Same. Neither of those did anything for me, although I really didn't expect "fork while forking" to do anything.
 
While this is a nice idea, there are tons of "dangerous" unix commands. People who don't understand what they are doing shouldn't be playing around in terminal. Get a book about unix basics and read man pages. Even if someone here gives them a command to run (like I've done before), they should take the time to learn each and every part of it so they fully understand what it does.

BTW, I like the fork bomb one.
 
  • Like
Reactions: old-wiz
Yeah, it basically a bottomless tree of threads. But it crashes your computer o so efficiently.

EDIT: or not...all I get is a pile of "-bash: fork: Resource temporarily unavailable" and nothing.
lolololol this is what im looking for

I will definately run some of these on my friends computer
 
I will definately run some of these on my friends computer
@Captain Awesome: Above quote is exactly why these threads aren't around...

I'll reiterate what has already been said: Don't execute terminal commands without a rudimentary understanding of what they do. Any half-decent search engine will help you there.
And whatever you do: If you play around with things that might cause data loss, keep backups of your data.
 
  • Like
Reactions: old-wiz
Fooling around with *NIX commands without knowing exactly what happens is a recipe for disaster. When I was working we would have newbies who supposedly had CS degrees and were "fluent" with whatever *NIX and they would learn the hard way. It was kind of fun giving them a polite lecture on how not to wreck the system. Fortunately we always had multiple incremental backups offline so nothing was really damaged.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.