i KILLED my Linux computer!! (to teach you something)

About this video

In a disposable Hack The Box Academy Linux lab, the host teaches file and directory basics before deliberately breaking the machine twice. He creates empty files with touch (including several at once), creates files with content using cat redirection, a cat heredoc ending with EOF, and a one-line echo redirection. He then makes directories with mkdir, explains reading ls -l output instead of relying on colors, and uses mkdir -p to create nested parent and child directories, viewing the result with tree. Next he moves and renames files with mv, copies with cp (using cp -r for directories), and deletes with rm, rmdir for empty directories, and rm -r for non-empty ones. He warns heavily before demonstrating sudo rm -rf with –no-preserve-root on / to destroy the lab system. After resetting, he explains his million-directory stunt: because he could only nest about 600 or so directories in one go, a simple looping script repeated the mkdir -p process like 1500 times, ending with a tree count of 1,116,017 directories.

Key takeaways

  • Create files with touch for empty files, cat redirection or a heredoc (ended by EOF) for multi-line content, and echo with redirection for a quick one-liner.
  • mkdir makes directories, mkdir with multiple names makes several at once, and mkdir -p creates nested parent and child directories; tree displays the structure.
  • mv moves and can rename at the same time, cp copies, and copying a directory and its contents requires cp -r for recursive.
  • rm deletes files, rmdir only removes empty directories, and rm -r recursively deletes a directory and everything inside it irreversibly.
  • Never run sudo rm -rf –no-preserve-root / on a real machine; in the disposable lab it deleted system files/commands, and his separate script ultimately created 1,116,017 directories.

Episode details: published June 29, 2022 · 22:20 long. Summary written by Self Growth Videos from the episode itself. Business results and any income figures mentioned are NetworkChuck’s own claims, shared for education — they are not typical or guaranteed.


← Previous: the $0.30 Hacking Lab · Next: ditch Google!! (build your own PRIVATE search engine) →

All NetworkChuck videos · NetworkChuck profile · NetworkChuck on YouTube

Sister brand · Vacation Club Promo

All-inclusive resort stays from $435

Qualified couples: promotional Mexico and Caribbean packages at real resorts. Short presentation during your stay — enjoy the rest of the trip.

Qualifications apply · presentation during stay · no purchase required

Subscribe YouTube Suggest