Deadliest Commands For Linux That you must know




1. rm -rf / = Will Delete Everything.
Explanation:
 rm : Removes the files.
-rf : This Command will Run rm and will delete all files and folders without promting you
/ : This command will tell rm to start from root directory ie: all files on your computer including removable Drives.

2. :(){ :|: & };: = This Line Looks Simple but its Dangerous
It Defines Shell Function that will Create New Copies Of Itself . This Process will Continue and Freeze Your Computer. It Can also be Called as Danial-of-Server Attack.

3. mkfs.ext4 /dev/sda1 = This Command will Format Your Hard drive
Explanation:
mkfs.ext4 : This part of command will create a new ext4 file system on following device.
/dev/sda1 : This part specifies the 1st partition on the 1st hard drive which is probably in use.

Similarly, This Command >  mkfs.ext3 /dev/sdb2  will Format the 2nd partition on the 2nd Hard drive with ext3 File system.

4. command > /dev/sda – This Command will Write Directly to a Hard Drive.
It Runs The command and sends the output of the command directly to Hard drive, writing the data to a Hard drive and Damaging your System.

Explanation:
command : Runs any Command
> : Sends the Output of the command to the following location.
/dev/sda : This command writes the output of the command directly to the hard disk.

5. mv ~ /dev/null – This Command Will Move your Home Directory To Black hole.
Consider /dev/null as Black hole here, moving anything to /dev/null is Gone Forever. Hence mv ~ /dev/null  will send all your personal files into black hole.

Explanation:
mv : moving following files to Another location.
~ :  This Represents your Entire Home Folder.
/dev/null : moves your home folder , Destroys all your files and deletes the original copy.