Operations 5 min read

Harmless‑Looking Linux Commands That Can Cause Massive Damage

The article compiles a series of highly‑rated Zhihu answers that showcase seemingly innocuous Linux commands—such as chmod ‑R 666 *, rm ‑rf --no‑preserve‑root /, and the classic fork bomb :(){ :|&; }; :—and recount real‑world incidents where their execution led to system crashes, data loss, or locked‑out servers.

dbaplus Community
dbaplus Community
dbaplus Community
Harmless‑Looking Linux Commands That Can Cause Massive Damage

The author gathered several top‑voted Zhihu answers that illustrate Linux commands which appear harmless but can wreak havoc when executed.

Traditional rescue "three axes" (all dead)

chmod

busybox

ld.so

Curve‑rescue "three parts" (all dead)

cp

python

gcc

Ancient secret "three pieces" (all dead)

perl

setfacl

install

The most dangerous command identified is: sudo chmod -R 666 /* and the truly catastrophic one: rm -rf --no-preserve-root / Although it looks like a routine recursive permission change, running it wipes the entire filesystem. On legacy kernels with non‑compliant UEFI devices, it also clears UEFI variables, bricking the hardware.

Another classic is the fork bomb: :(){ :|&; }: Executing it spawns processes that recursively fork, quickly exhausting system resources and forcing a reboot.

Additional anecdotes from the community include:

Disabling root login in SSH configuration, then being unable to access a server that was always managed as root.

Running rm -rf /* inside WSL2, which caused the underlying Windows host to crash.

Upgrading a CentOS 7 server to CentOS 8, replacing yum with dnf, removing the kernel, and then encountering OpenSSL vs. NetworkManager conflicts that prevented the kernel from installing, ultimately leaving the server unreachable.

Configuring a server to prohibit root and password login, adding a public key to a single regular account, then mistakenly closing the Putty session with Ctrl+D twice, resulting in permanent lockout.

These stories serve as cautionary "cyber lightbulb" moments, reminding practitioners to treat even the simplest commands with respect and to test potentially destructive operations in safe environments.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Linuxsecuritycommand-linesysadminbash
dbaplus Community
Written by

dbaplus Community

Enterprise-level professional community for Database, BigData, and AIOps. Daily original articles, weekly online tech talks, monthly offline salons, and quarterly XCOPS&DAMS conferences—delivered by industry experts.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.