Print text to the screen
Output text with echo
⏱ Est. ~3 min
01 · Read
The echo command prints text to the screen. It sounds simple, but it's the foundation for a lot of powerful tricks.
💡 Picture thisThink of echo as talking to the terminal — whatever you say, it says back.
Key points
- echo prints whatever text you give it
- You can use quotes or skip them (for plain text)
- What echo prints can be redirected into a file (next lesson)
02 · Terminal exercise
echo is the terminal's "print". Whatever you type after echo, it gives back to you. Simple, but super useful.
(This section is interactive — please enable JavaScript.)
03 · Terminal exercise
Quotes are optional. Without them, echo just prints whatever follows. Quotes matter when you have special characters; for plain text, they're optional.
(This section is interactive — please enable JavaScript.)
04 · Fill in the blank
To print the text "goodbye" to the screen, you would type: ___ goodbye
Other lessons in this chapter
⚠ The full interactive experience needs JavaScript. Please enable it and reload.
※ This is an independent Traditional Chinese teaching project — not an official Anthropic product. Claude™ is a trademark of Anthropic, PBC.