August 25, 2016

10 Dangerous Linux Commands You Should Never Run! Be Alert While Executing!

Linux commands are most interesting, productive and very much helpful. It is most powerful as it never asks for confirmation. But it is very dangerous especially when you have no clear idea about the command. Even small mistakes in a command lead to irreversible loss to the Operating System. A new Linux user should be very careful w ile executing the commands. As it allows the user root, a user should be always alert about what he is doing.

linux

Here are the 10  Linux Commands  about which you should know clearly before executing those commands

#1. rm -rf

This command is the fastest way to delete the folder and entire content in it. But when you make a mistake in typing it leads to the lot of loss.

  • -rm-rf- deletes all the files in the home folder.
  • rm -rf* delete all the configuration files
  • rm -rf* delete all the configuration files.
  • rm -f deletes only read files.
  • Rm -r deletes the folder recursively (even the empty folder)

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

This command is known as Fork Bomb as it creates the new copies of itself. This replication process continues until it freezes. This is because of consumption of lot of memory of RAM.

#3. command> / dev / sda

This runs a command and sends the output of that directly to your hard drive and thereby crashing it. It replaces all the files on the block with raw data i.e writes raw data directly to hard drive.

#4. mv directory / dev / null

This command moves all the files to NULL i.e it deletes all the files. So, it finally destroys all the files.

#5. wget http://example.com/something -O – | sh

wget command will download the script from the site and sh will run the script on your system. So be careful before running the script.

#6. Mkfs.ext3 / dev / sda

This command creates a new ext3 file system on the device. sda specifies a partition on the hard drive. It simply formats the block ‘sda’ and resets the hard drive. i.e it formats the default drive.

#7. > File

The above command releases the file content. But it results in lot of damage when there is a slight mistake in command.

  •  “> xt.conf” will write the configuration file or any other system or configuration file.

#8. ^ foo ^ bar

This command edits the previous command by reducing the need to retype the entire command again. so, carefully check the change in the original command using ^ ^ foo bar command.

#9. dd if=/dev/random of=/dev/sda

This command writes junk onto a hard drive. It performs copying of files from one place to another. /dev/sda transfers random data. This finally leaves your system inconsistent.

#10. Invisible command

This is similar to that of the first command rm -rf except that codes are hidden and running this code terminates and clears your partition.

Do let us know if we miss any in your comments below.

About the author 

Imran Uddin


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}