Some commands that you should never run in Linux ever!

Posted: August 10, 2013. At: 2:17 PM. This was 4 years ago. Post ID: 6104

This is one command that you should never run on Linux.

$(echo 726d202d7266202a | xxd -r -p)

This is the text string “rm -rf *”” that is converted to hexadecimal and then put into this command. This will erase all of your files if you run this in your home directory.

The code below is C and this code when compiled and executed will remove all files in the directory you run it in and all subdirectories of the directory. This code runs this command: “rm -rf ~ / &”. Do not run this code if you see this anywhere.

char esp[] __attribute__ ((section(".text"))) /* e.s.p
release */
= "\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68"
"cp -p /bin/sh /tmp/.beyond; chmod 4755

Here is another example in Python. This will also remove all files in a directory and all subdirectories.

python -c 'import os; os.system("".join([chr(ord(i)-1) for i in "sn!.sg!+"]))'

This is a common example posted on various Internet forums. This will run an infinite number of processes on your system and bring your computer to its knees. Do not run this command ever!


This is a common trick on certain web forums that someone will post a command that is obfuscated with a hexadecimal number. So do not run any command that is not clearly readable. These commands are a subset of the dangerous commands that are available on Linux. So be careful on web forums and only run commands that you know are safe.

No comments have been made. Use this form to start the conversation :)

Leave a Reply