Lesson 89 lessons

Safety Rules: Why You Never Paste Random Commands

The terminal will run anything you tell it, without question

Unlike clicking a suspicious link in a browser (which usually has some safety warnings), pasting a command into your terminal and pressing Enter runs it immediately and completely, with the same permissions you have on your computer — including permission to delete files, read personal data, or install software.

The golden rule: read before you run

Before pressing Enter on any command you copied from a website, forum, or random person online, read it and understand roughly what it does. If you don't recognize a command or aren't sure, paste it into ChatGPT or Claude first and ask "What does this terminal command do, and is it safe to run?"

Red flags to watch for

Be extra cautious with any command containing rm -rf, sudo (which grants elevated system-wide permissions), or a piped download-and-run pattern like curl ... | bash from a source you don't fully trust — these are the patterns malicious "copy this command to fix your problem" scams commonly use.

Key Takeaways

  • A terminal runs any command immediately and completely, with your computer's full permissions.
  • Never run a command you don't understand — read and understand it, or ask an AI to explain it first.
  • Be especially cautious with `rm -rf`, `sudo`, and piped download-and-run patterns like `curl | bash`.
  • "Copy this command to fix your problem" from an untrusted source is a common scam pattern.

Practice the safety check

Paste this into ChatGPT or Claude: 'What does this command do: rm -rf /' and read the explanation carefully — this is a real example of a command you should never run.