LOGBOOK

HELP

Quiz Entry - updated: 2026.06.20

What are input and output in Linux and how are they visualized in the terminal?

Input is what a program reads (usually keystrokes), output is what it writes back (usually to the screen) — by default both flow through the terminal.

Every interactive program sits between two streams: it reads input and writes output. In a terminal, the keyboard is the default source of input and the screen is the default destination for output, which is why typing and seeing results feels seamless.

read -p "What's your name? " name   # reads a line of input into $name
echo "Good day, $name"              # writes output back to the screen

Run it and you get:

What's your name? Florian
Good day, Florian

Why this matters: because input and output are just streams, not hard-wired to the keyboard and screen, you can later redirect them — feed a file in as input, or capture output into a file or another command. That decoupling is the whole foundation of redirection and pipes.

Tip: read -p prints the prompt and reads in one step; without -p you'd echo the prompt yourself.

From Quiz: LIOS / Reading and Editing Files from the Command Line | Updated: Jun 20, 2026