r/linuxquestions • • Mar 22 '22

Absolute most dangerous command in linux?

I am familiar with the

sudo rm -rf /* 

and yes, this is very dangerous. Like I get it. Beyond comprehension. However, I have ran this command and while everything does get removed and the VM won't boot the next time around, my current shell is still intact. For example, I run:

user@vm:/$ echo we still alive out here?
we still alive out here?

Sure `ls might be gone:

user@vm:/$ ls
-bash: /usr/bin/ls: No such file or directory

but it still knows to print that error message. If I ssh, I want the output to be:

...connection lost

Anybody know a command so deadly, that upon running it, the OS will instantly crash to an unrecoverable state and corrupt everything? Could this command even exist? is the linux kernel designed for this?

148 Upvotes

171 comments sorted by

View all comments

Show parent comments

1

u/space_wiener Mar 22 '22

What does the first do differently?

3

u/iamawhale1001 Mar 22 '22

The first one has 2 arguments, one just being the asterisk. That would match everything in your current directory.

1

u/space_wiener Mar 22 '22

Oh duh. I interpreted that completely wrong.

I blame it on lack of coffee at that point. :)