June 14, 2026 · by Meegrow Labs

Printing Text in the Terminal: The echo Command

So far you have mostly been reading files and peeking inside them. Now it is time to do something new: make the computer say something back to you. It sounds tiny, but printing text in the terminal is a real superpower you will use again and again.

The tool for this is the echo command. By the end of this short lesson, you will be able to type one word and watch the computer talk back.

The echo command prints whatever text you give it straight back to the screen. You type echo hello, press Enter, and the terminal replies with hello. That is the whole idea.

What is the echo command?

Think of shouting in the mountains. You yell “hello”, and the hills echo “hello” back to you. The echo command does exactly the same thing. You hand it a word, and it returns that word to you on the screen.

In plain words: echo means “repeat this”. Whatever text you write after it gets printed back, untouched. It is the simplest form of output a computer can give you.

How do I print text in the terminal?

Open your terminal and type this:

echo hello

Press Enter, and the screen shows:

hello

Let us break that line apart so nothing feels like magic:

  • echo is the command. It tells the computer, “repeat the text that follows”.
  • hello is your text. You can replace it with anything you want printed.
  • The space between them separates the command from your message.

Try changing the word. Type echo namaste or even echo I am learning AI, and watch your own words come straight back.

Why does such a small command matter?

It is fair to ask why printing one word deserves a whole lesson. The answer is that echo is a building block. Once you can print text, you can do far bigger things.

Later on, you will use the same echo command to fill files with content, to print the result of a calculation, and to quickly test whether something is working. Almost every script you ever write will print something to the screen, and this is where that habit begins.

If you have already followed the earlier Level 3 lessons on looking inside files, this is the natural next step: instead of only reading what exists, you are now creating output yourself.

How do I try the echo command right now?

The best way to learn is to do it this minute. Here is your tiny task:

  • Open a terminal.
  • Type echo hello and press Enter.
  • Watch the word hello appear on the line below.

That is it. The computer just talked back to you. It feels small, but you have crossed a real line: you are no longer only reading the machine, you are telling it what to say.

This is exactly the kind of confidence-building step that the free Zero to AI Hero course is built around. We start with simple commands like this, and step by step you reach a point where you can command AI tools and build real projects.

What comes next after printing text?

Printing to the screen is great for quick checks, but words on a screen disappear. The next natural question is: how do I keep that text? In the next lesson, you will take the very same echo output and save it into a file, so it stays even after you close the terminal.

That single move turns echo from a fun trick into a genuinely useful tool. For now, enjoy the small win of making the computer speak.

Key takeaways

  • The echo command prints any text you give it back to the terminal screen.
  • The format is simple: echo, a space, then your text, for example echo hello.
  • It works like a mountain echo: you give a word, the computer returns it.
  • echo is a building block you will reuse to fill files, print results, and test your code.
  • Try it now, then move on to saving that printed text into a file in the next lesson.

🚀 Take the full free course: Zero to AI Hero — learn to build with AI from scratch. New lessons daily, in Hindi & English.

Meegrow Labs

We help India go from zero to AI hero — learn to use & build with AI from scratch, in Hindi & English. Start the free course →

Want to actually learn this?

151 free 2-minute lessons — from "what's a file?" to building with AI.

▶ Start the free course