Dangerous command in Linux. Know about Linux death command and Linux secret commands; Linux commands you should never run.
Linux Commands You Should Never Run
Below are 8 most dangerous Linux commands. These are the Linux commands you should never run:
1. rm -rf / Command
The most infamous Linux command. When you run this command it recursively deletes all files and directories on your system, including the root (/).
This command completely wipes out your system which can never be recovered.
2. :(){:|:&};: Command
This command is known as fork bomb or Wabbit Virus or Rabbit Virus. A fork bomb command is a form of DoS (Denial-of-Service) attack.
It creates a function which is self called twice, first in the foreground and secondly in the background. It is called and processed repeatedly until all the system resources are consumed and finally it crashes the system.
3. mkfs.ext3 /dev/sda
This command formats your disks and partitions. Which means it can delete all the files from the system.
4. mv folder /dev/null
Never execute the above command which can move a directory or file to /dev/null. You must know that the /dev/null file, also known as the null device or “the black hole”. Anything which is moved or kept here (/dev/null) gets destroyed and discarded.
5. Chmod -R 777/
You must be aware of chmod command. It is used to changes the access permissions of the named files.
When you execute chmod -R 777 you give access red/write/execute permissions to all the users of the system. Anyone is able to read, write and execute data on your file system. Which means, the system is completely exposed for public and anyone can do whatever they desire.
You should also not execute “command > /dev/sda” (overwrites the /dev/sda block on your hard drive. Because the /dev/sda block contains the filesystem data and when you overwrite it, the sytem crashes).
Similar to the above command is “dd if=/dev/random of=/dev/sda”. It is also a dangerous command as it wipes out the /dev/sda block and brings the system at an unrecoverable stage.