@linuxopsys
Linuxopsys
2 years
11 dangerous Linux terminal commands every Linux user must be aware of (don't run).
69
695
3K

Replies

@linuxopsys
Linuxopsys
2 years
1. Recursive deletion ๐Ÿ”๐Ÿ—‘๏ธ This is one of the scariest commands. When you run this command, it deletes everything in the root directory forcibly and recursively. As a result, all of your directories and subdirectories will be deleted, and all of your data will be lost.
Tweet media one
11
12
207
@linuxopsys
Linuxopsys
2 years
2. Implode hard drive ๐Ÿ•ณ๏ธ This command will move all data to a special location in Linux known as the black hole, which is located in your system at /dev/null.
2
5
116
@linuxopsys
Linuxopsys
2 years
Everything that is moved to this location is destroyed. As a result, if you accidentally move your data to this folder, it will not be recovered
Tweet media one
Tweet media two
3
7
119
@linuxopsys
Linuxopsys
2 years
3. The fork bomb ๐Ÿด๐Ÿ’ฃ This is my personal best, a simple bash recursive function that, when executed, creates copies of itself, which in turn creates another set of copies of itself. This takes up CPU time and memory. As a result, it loops until the system freezes.
2
9
126
@linuxopsys
Linuxopsys
2 years
4. Overwrite the hard drive โœ๏ธ๐Ÿ’ฟ This command writes raw data (command output) to the specified partition. This causes data loss on the hard drive or specified partition. command - this could be any Linux command.
Tweet media one
4
4
70
@linuxopsys
Linuxopsys
2 years
5. Blindly download and execute malicious script โ˜ ๏ธ๐Ÿ“œ Wget and curl are useful Linux commands for retrieving and downloading files from the internet. However, if we blindly download and execute a malicious script, these commands can be dangerous.
Tweet media one
2
9
85
@linuxopsys
Linuxopsys
2 years
Please keep in mind the source from which you are downloading packages and scripts. Use only scripts or applications downloaded from a reputable source.
1
4
64
@linuxopsys
Linuxopsys
2 years
6. Breach the System ๐Ÿ”“ This command does not physically affect your system in the same way that the other commands do, but it does provide a security breach on the system.
2
4
55
@linuxopsys
Linuxopsys
2 years
The chmod command changes file permissions to configure user access to a specific file or directory. By running this command, you grant all system users the ability to read, write, and execute data on your system. In terms of security, this is risky and dangerous.
3
3
47
@linuxopsys
Linuxopsys
2 years
7. The hidden recursive deletion (rm -rf /) ๐Ÿ”๐Ÿ—‘๏ธ The following command is the same as the previously mentioned rm -rf / command. The codes are hidden in hex here to fool an unsuspecting user.
1
3
47
@linuxopsys
Linuxopsys
2 years
Running the code below in your terminal will delete your root partition leaving your system unusable.
Tweet media one
3
4
63
@linuxopsys
Linuxopsys
2 years
8. Unknowingly format a hard drive ๐Ÿงน๐Ÿ“€ This command will erase your hard drive and recreate it. These should only be used when you have a backup of your data on the cloud or an external device.
Tweet media one
2
4
53
@linuxopsys
Linuxopsys
2 years
9. Write random junk to hard drive ๐Ÿˆณ๐Ÿ“€ This command will write random garbage data to your hard drive. Your system will not be recovered as a result of this command.
Tweet media one
2
3
59
@linuxopsys
Linuxopsys
2 years
10. Re-running all the history commands ๐Ÿ”๐Ÿ“œ Because it executes every command from that you have already executed, the history | sh command can be dangerous. The action may cause system instability and the execution of commands that you do not want to repeat.
Tweet media one
2
2
58
@linuxopsys
Linuxopsys
2 years
11. The ^foo^bar Command ๐Ÿ“œ The ^foo^bar command has the potential to be both helpful and dangerous. While the command saves time by allowing you to edit a previously run command and re-run it,
1
2
41
@linuxopsys
Linuxopsys
2 years
it can also cause problems if you don't thoroughly check the changes you make before running it. The command changes the first occurrence of foo to bar.
Tweet media one
1
6
43
@linuxopsys
Linuxopsys
2 years
Please DO NOT run any of the above commands in your Linux terminal or shell, or on the computers of your friends or coworkers. Run them in a virtual machine if you want to test them.
2
3
56
@linuxopsys
Linuxopsys
2 years
Any inconsistency or data loss caused by the execution of the preceding command will bring your system to a halt.
1
2
48
@linuxopsys
Linuxopsys
2 years
That's a wrap! Thank you for taking your time to read our thread. If you know of any other dangerous Linux commands that I have missed, please leave them in the comments. And be sure to rt, like and follow us ( @linuxopsys ) for more future Linux content.
13
5
79
@bhaskerathikay1
bhaลกkerM
2 years
1
0
0