Commands in this lesson
cp facts.txt facts-backup.txtCopy a filecp -r penguins penguins-copyCopy a whole foldermv facts-backup.txt notes/facts.txtMove it into another foldermv facts.txt penguin-facts.txtRename it (same thing as moving)rm penguin-facts.txtDelete itNotice something? Linux has no separate rename command. Renaming is just moving a file to a new name in the same folder.
⚠️ rm has no undo
There is no bin to fish things out of. rm deletes immediately. Never type rm -rf on a folder unless you are completely sure, and never on / .
🔬 The grown-up version
-r means recursive: do it to the folder and everything inside. -f means force: stop asking. Together, rm -rf is the single most destructive pair of flags in Linux, so people often alias rm to a safer wrapper.
🐧 Tux tip
Before you delete something, run ls on it one last time. Two seconds of checking beats an afternoon of regret.
Now you try
This terminal is pretend, so you cannot break anything. Tap a chip or type a command yourself.
Quick check
How do you rename a file in Linux?
Why is rm -rf dangerous?
Finished this one?
Mark it done to collect 30 XP and keep your streak growing.