http://www.junauza.com/2008/11/7-deadly-linux-commands.html
Don't try at home.![]()
-
Those are all fun commands I use on a daily basis!
I know a couple they don't put up there but I won't post it here even with full warning because one not so smart person will be curios and cry their eyes out when their system is messed up.
-
Something I've never had the courage to try:
Code:# cat /dev/random > /dev/sda
-
I did something similar years ago trying to make a copy of the partition table. But I had the redirection backward.
Surprisingly I was able to recover because I figured out I had screwed up before I tried to reboot. It's been a while, but ISTR recovery involved manually editing the MBR and partition table. Fortunately these are more or less well documented. I held my breath on the first reboot following that.
-hank -
Fork bombs don't do much of anything unless you have your system misconfiguredCode:
pita@pita-t61:~$ :(){ :|:& };: [1] 30208 pita@pita-t61:~$ bash: fork: Resource temporarily unavailable bash: fork: Resource temporarily unavailable bash: fork: Resource temporarily unavailable bash: fork: Resource temporarily unavailable bash: fork: Resource temporarily unavailable bash: fork: Resource temporarily unavailable bash: fork: Resource temporarily unavailable bash: fork: Resource temporarily unavailable bash: fork: Resource temporarily unavailable [1]+ Done : | : pita@pita-t61:~$
Check ulimit -a for info. You can edit /etc/security/limits.conf to add all kinds of system resource limits in.
-
Is the fork bomb nonoperational with the default config in Ubuntu or does configuration need to take place?
-
It'll eat up a lot more processes by default, but you should be ok. The default limit is somewhere around 48000 processes, which is pretty high, but shouldn't nuke anything.
-
These commands only become truly dangerous when run as root. The forkbomb is kinda unique in that it can incapacitate a machine with user access, but limits.conf can foil it easily. On the other hand, once you've got root you can pretty much tell the machine to brick and it will do so.
-
I don't get the forkbomb command. Why include a command that is just a bunch of symbols, call it a forkbomb and have it nuke your system (well, not nuke but you get what im saying)? Kind of like an anti-easteregg?
-
It actually means something. The proper name for this thing is fork() bomb, and here's how it goes:
' : ( )' creates a function called ' :' that executes the body stored in the curly brackets.Code:: ( ) { : | : & } ; :
' : | :' is a recursive call to ' :' that pipes the output to another instance of ' :'. This makes it so that the processor is constantly used.
The ' &' sends the process to the background, where it cannot be easily killed. This ensures that none of the child processes die.
' ; :' closes the function definition and initiates the first call to ' :', e.g. it sets up the parent process which will flood your system with its children.
As you can see, the function's name doesn't have to be ' :'. It can be Sammy for all you care, ' :' just looks way more intriguing.
P.S. It turns out that fork() bombs are legally DoS attacks.Code:sammy ( ) { sammy | sammy & } ; sammy
P.P.S. There seems to be a somewhat subtler threat to the fork() bomb: running out of PIDs. Haha, it's kinda fun having a brain-dead interface. -
Fork bombs are how I reboot the windows computers at my school. Its just so much easier that way.
-
From the Ubuntu forums.
ATTENTION ALL USERS: Malicious Commands
http://ubuntuforums.org/announcement.php?f=234 -
sudo rm -rf /
tada! -
Can't you just hold the power button?
-
That's much less fun.
-
Lol, forkbomb worked here...
that was fun, though.
Can i do it via ssh?
Will try it later. We have ssh enabled at college pcs, that will also be fun.
Btw, good post!
-
Depends on how competent your admins are. You should be able to run a forkbomb as a normal user on ANY system and not have it kill the machine.
-
Darn right:
Code:brick(8) brick(8) NAME brick - bricks a system SYNOPSIS brick [OPTIONS] DESCRIPTION If you are not root, brick does nothing. On the other hand, once you've got root you can pretty much tell the machine to brick and it will do so. OPTIONS -p Requests that the brickage be permanent. Without -p, brick will render the machine nonfunctional but resintalling the OS will restore functionality. With -p, brick will attempt to completely mess up any kind of on-board firmware so that the system remains permanently bricked. NOTES Do not use on production systems. -
rofl, awesome
-
Been there, done that.
-
I was going to reformat my Linux partion and reinstall, so once I backed everything up, I thought it would be fun to run this command. Unfortunately, my windows partition (which I hadn't fully backed up) was mounted under /mnt. Fortunately, I remembered this soon enough and killed the command before I lost anything.
Deadly Linux Commands
Discussion in 'Linux Compatibility and Software' started by Leon, Nov 20, 2008.