Top 10 Deadly Linux Commands - You Should Never Run - TechBeginner

Welcome to TechBeginner.in, Tech Beginner provides technical blog for Online Linux Tutorials, Ubuntu Tutorials, Redhat Tutorials and CentOS 7, Configuration of server like Web Server, Application server, Database server, Window server, networking, html, css, java script, php, wordpress, opencart, magento, joomla and etc.

Top 10 Deadly Linux Commands - You Should Never Run

Share This


Here are the 10 most Deadly Linux commands which you should run at your own risk.

1. Hidden command / invisible command

This is very similar to rm-rf that codes are invisible and running this code terminates
and erases your partition completely.

2. :(){:|:&};: Command

As Linux administrator on Bash therefore, it is important to understand what the command is going to do to
your system before you execute it. This is a simple bash script which once executed creates copies
of itself which in turn creates another set of copies of itself. This consumes the CPU time and memory.
Thus, it runs recursively until the system freezes.

3. command > / dev /sda

It runs a command to send output directly to your HDD (Hard Disk Drive) and thereby
crashing it. It related all the files on the block with “Raw data” i.e. writes raw data
directly to HDD.

4. My folder /dev/null

The above command will move your file to “NULL”. That means it delete all the files
and destroy your whole data.


5. Mkfs.ext3 / dev /sda

The above command creates a new “ext3” file system on the device. It formats the
block “sda (it specifies a partition on the HDD)” and resets all the data on the HDD.

6. > File

It releases the file content and it leads to a lot of damage when there is slightly
mistaken in command.


7. ^ foo ^ bar

The above command edits the previous run command without the need of retyping
the whole command again. So, you can check the change in the original command
through the “^ foo ^ bar” command.

8. dd if=/dev/random of =/dev/sda

The above command writes junk on your hard drive and it would leave your system at
the inconsistent and unrecoverable state.

9. rm -rf

The rm –rf command is one of the fastest way to erase your entire files and even
entire content. This command leads to a lot of loss.

● rm: rm commands in Linux are used to erase/delete files.
● rm –r: this command used to delete the folder recursively and empty the
folder.
● rm –f: this command leads to “Read only files” without asking.
● rm-rf/: this command will delete everything in the root directory.

● rm –rf*: This command leads to force deletion of everything in current
directory/working directory.

10. mv /home/root/* dev/null

The given command moves all the data in the home/root folder to the black hole thus
resulting in data loss. Let’s work on these command to understand what each section does.

2 comments: