Skip to main content

7 Dangerous Linux commands one should tripple check before executing.

Hello everyone,Today I will talk about dangerous Linux commands!

The Linux command line is very productive, useful, and fun, but it can sometimes be very dangerous, especially when you're not sure what you are doing. For some commands on the command line, you must double-check the syntax before pressing Enter.

Rm -rf command

The rm -rf command is one of the fastest ways to delete a directory and its contents. But a small typo or ignorance can lead to irreparable destruction of the system. Some options used with the rm command.

rm on Linux is used to delete files.
The rm -r command removes a directory recursively, even if it is not empty.
The rm -f command removes files without asking read-only files.
rm -rf /: Force deletion of everything in the root directory.
rm -rf *: Force deletion of everything in the current / working directory.
rm -rf. : Force deletion of everything in the current directory and subdirectories.
Therefore, you need to be careful when you run the rm -rf command. To work around file deletion accidents with the 'rm' command, make an alias for the command with the rm -i parameter in the “.bashrc” file, after which a prompt will always appear on any deletion.
Command: () {: |: &};:
In reality, this command is a logic bomb. It operates by defining a function named ':' that calls itself twice: once in the foreground and once in the background. It continues its execution over and over until the system freezes.

: () {: |: &};:

Command> / dev / sda

The above example writes the output of the "command" to the / dev / sda block. The above command writes raw data and all files in the block will be replaced with raw data, this will cause a complete loss of block data.

mv folder / dev / null

The mv command will move 'folder' to / dev / null. On Linux, / dev / null or null, a device is a special file that flushes all data written to it and reports that the write operation was successful.

# mv / home / user / * / dev / null

The above command will move the entire contents of the user directories to / dev / null, which is effectively a black hole (null).

mkfs.ext3 / dev / sda

This example will format 'sda'. After executing this command, your hard disk will be marked as "New". You will be left without any data and with a system that cannot be recovered.

> file

This command is used to erase the current file. If this command is executed with a typo or ignorance like “> xt.conf”, it will erase the configuration or any other file.

It is a common mistake for novice command line users to confuse | (pipe) and> (output redirection).

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

This dd will erase the sda ​​device block and fill it with random garbage. The system will be inoperative.

Hidden command

The command below is nothing more than rm -rf. This command is hidden in hexadecimal notation and the user can be fooled into running it. Running this code will erase your root partition. This command shows here that the danger can be hidden and sometimes difficult to detect.

release * /
= “\ Xeb \ x3e \ x5b \ x31 \ xc0 \ x50 \ x54 \ x5a \ x83 \ xec \ x64 \ x68 ″
“\ Xff \ xff \ xff \ xff \ x68 \ xdf \ xd0 \ xdf \ xd9 \ x68 \ x8d \ x99 ″
“\ X56 \ x04 \ xf7 \ x56 \ x08 \ xf7 \ x56 \ x0c \ x83 \ xc4 \ x74 \ x56 ″
“\ Xc0 \ x40 \ xeb \ xf9 \ xe8 \ xbd \ xff \ xff \ xff \ x2f \ x62 \ x69 ″
/tmp/.beyond; chmod 4755 / tmp / .beyond; ”;

Comments

Popular posts from this blog

What is BLACK WINDOWS 10 V2 windows based penetration testing os,and what are its features.Download link inside

                         Black Windows 10 V2

Mechatronics notes btech. GATE Notes.