5 very dangerous commands in Linux

linux computer penguin
linux computer penguin

Last updated: July 3, 2022

I present here a list of five orders à never use on your linux machine but you can possibly test on a virtual machine.

Some malicious users may post dangerous commands to Discord or to a Facebook group that destroy the system or data. You must therefore be careful and know how these commands work to avoid using them without thinking.

rm-rf /

This command simply erases all the files on your hard drive. Once deleted, files cannot be recovered.

The rm -rf command is one of the fastest ways to delete a folder and its contents.

mkfs.ext3 / dev / sda

Mkfs is a command used to format hard drives. Here it will erase the data from the disk / Dev / sda.

: () {: |: &} ;:

This command is actually a fork bomb. If you run it, your system will be forced to create processes until memory is full. Which forces you to do a sudden shutdown and can cause system corruption.

mv ~ / * / dev / null

Moving a file or directory to / dev / null is like throwing it in the trash.
/ Dev / null is the equivalent of the final recycle bin, any file sent to this output will be deleted. And this without the possibility of restoration.

With the addition of the character ~ would delete all files from your home folder, while the character * would delete all of your configuration files.
Linux will gladly obey this command and delete everything without prompting you, so be careful when using it!

dd if = / dev / zero of = / dev / sda

This command will write zeros to all blocks on the hard drive and result in complete data loss. This is like doing a complete formatting.

info: Do not run any of the above commands on your machine or on your friend's or school's computer. If you want to test them, run them in a virtual machine. Any loss of data, due to the execution of the above command, will result in a failure of your system for which neither the author of the article nor FunInformatique are not responsible.