![]() ![]() Running the mkfs command on a partition wipes all the data stored in it. The mkfs command creates a new filesystem (either ext2, ext3, ext4, etc) on a formatted storage device, in most cases a partition of a hard disk drive. The above command downloads a script from a malicious source and then executes it. The wget command is a command that downloads files from a web or file server. The following command moves all the contents of the user’s home directory to /dev/null, consequently discarding all the data contained in the user’s home directory # mv /home/user/* /dev/null Anything that is moved to /dev/null is discarded and destroyed. The /dev/null file is a special type of file known as the null device or “ the black hole“. mv folder /dev/nullĪnother harmful operation that you should not try is moving a directory or file to /dev/null. This block contains filesystem data and when overwritten, results in a damaged system that is irrecoverable. Running a command followed by >/dev/sda overwrites the /dev/sda block on your hard drive. You can later verify this using the command: $ ulimit -u You can do this by running the command: $ ulimit -S -u 4000 Thankfully, you can shield yourself from this attack by limiting the number of processes run by local users to around 4000. The worst part is that you don’t need to be root to launch this attack. It is also referred to as the Wabbit or Rabbit virus. In fact, a fork bomb command is essentially a form of DoS (Denial-of-Service) attack. The function executes repeatedly and in doing so, consumes all the system resources resulting in a system crash. It operates by creating a function called ':', which calls itself twice, once in the foreground and once in the background. To overcome accidental deletion of files by the ‘ rm‘ command, create an alias of the ‘rm’ command as ‘rm -i’ in the “.bashrc” file, it will ask you to confirm every deletion. ![]() In fact, when you run the command as a regular user, you will get two warnings on the terminal. : Force deletion of current folder and subfolders. rm -rf * : Force deletion of everything in the current directory/working directory.rm -rf / : Force deletion of everything in the root directory.rm -f command removes ‘Read only File’ without asking.rm -r command deletes the folder recursively, even the empty folder.rm command in Linux is used to delete files.The some of options used with the rm command are. In a nutshell, the rm -rf / command completely wipes out your system resulting in a broken and unrecoverable system. When executed as root with the -rf / option, the command recursively deletes all files and directories on your system starting from the root (/) which is the highest in the Linux File Hierarchy structure. However, extreme caution should be taken when using the rm command as a slight typo or mistake can result in unrecoverable system damage. The rm command is a Linux command used to delete files and directories depending on the arguments used. In this guide, we have compiled a list of some of the riskiest commands that you should not think of executing on your system. Running bad commands can cause harm and irrecoverable damage to your system. While useful in managing your system, the command line is fraught with risks. It provides a fast and versatile way of running the system, especially when managing headless systems which do not have a graphical interface. The command-line interface is a powerful and handy utility for administering a Linux system. ![]()
0 Comments
Leave a Reply. |