It is best to avoid these commands if you don’t know what you are doing.

Dengerous linux commands for hackers.

1. rm Command

The rm -rf command is one of the fastest and most effective ways to delete a folder and its contents. However, a small typo or ignorance on the part of the user can result in irreparable damage to the system. Some of the options used with the rm command are:

  • rm command in Linux is used to delete files.
  • rm -r command deletes the folder recursively, even the empty folder.
  • rm -f command removes ‘Read only File’ without asking.
  • rm -rf / : Force deletion of everything in root directory.
  • rm -rf * : Force deletion of everything in current directory/working directory.
  • rm -rf . : Force deletion of current folder and sub folders.

2. :(){:|:&};: Command

A fork bomb is a type of denial-of-service attack that can cause a computer to crash or become unresponsive. It works by creating a large number of processes, which consume all of the computer’s resources and prevent it from being able to service other requests. Fork bombs can be difficult to detect and can be very destructive, so it’s important to be aware of them and take steps to protect your computer from them.

:(){:|:&};:

3. command > /dev/sda

command > /dev/sda

The above command writes the output of ‘command‘ on the block /dev/sda. This command writes raw data and all the files on the block will be replaced with raw data. This will result in total loss of data on the block.

4. mv folder /dev/null

mv folder /dev/null

The above command will move ‘folder’ to /dev/null. In Linux /dev/null or null device is a special file that discards all the data written to it and reports that write operation succeed. This is useful if you want to delete a large number of files quickly, without having to worry about the disk space they consume. The /dev/null file is also sometimes used as a “bit bucket” to catch unwanted output from programs.

5. mv /home/user/* /dev/null

mv /home/user/* /dev/null

The above command will move all the contents of a User directory to /dev/null, which literally means everything there was sent to blackhole (null). This is a very powerful command as it can be used to delete all the contents of a directory, including any hidden files. Be very careful when using this command as it cannot be undone.

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

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

The above command will wipe out the block sda and write random junk data to the block. Of-course! Your system would be left at inconsistent and unrecoverable stage. The only way to fix this would be to reinstall the operating system and all of your programs. This would be a huge pain and it would be very time consuming. It is best to avoid this command if you don’t know what you are doing.

7. mkfs.ext3 /dev/sda

mkfs.ext3 /dev/sda

As you can see from the heading, the above command will format the block ‘sda’ and this will erase all data from your hard disk drive. This is a very dangerous command to execute and should only be done if you are absolutely sure that you want to erase all data from your system. Once this command is executed, there is no turning back and your system will be left in an unrecoverable state.

7 Ways to Create a File through Linux Terminal

6 Comments

  1. Wonderful article! This is the type of information that should be shared across the internet.
    Shame on Google for not positioning this publish
    higher! Come on over and consult with my web site . Thank you =)

  2. Cool blog! Is your theme custom made or did you download it from somewhere?
    A theme like yours with a few simple adjustements would really make my blog stand out.
    Please let me know where you got your design. With thanks

  3. Another thing is that when evaluating a good on-line electronics retail outlet, look for web stores that are frequently updated, keeping up-to-date with the most up-to-date products, the perfect deals, and helpful information on product or service. This will ensure you are dealing with a shop that really stays ahead of the competition and give you what you ought to make knowledgeable, well-informed electronics buys. Thanks for the significant tips I’ve learned through the blog.

  4. Excellent site you have here but I was wanting to know if you knew of any user discussion forums that cover the same topics talked about in this article? I’d really love to be a part of online community where I can get feed-back from other experienced people that share the same interest. If you have any recommendations, please let me know. Appreciate it!

Leave a Reply