1. What does “standard” mean in stderr / stdout?
“Standard” comes from the Unix philosophy (“standard streams”).
Every program automatically starts with three built-in streams:
| Name | Abbrev | FD | Meaning |
|---|---|---|---|
| Standard Input | stdin | 0 | Where the program reads input |
| Standard Output | stdout | 1 | Normal program output |
| Standard Error | stderr | 2 | Error, warning, panic messages |
The term “standard” just means:
These streams are available by default for every program.
No special setup needed.
Redirecting stderr
You often see:
2>&1
This means:
Redirect file descriptor 2 (stderr) into file descriptor 1 (stdout)
So now stdout + stderr both go to the same place.
Using tee
tee is a Unix command that lets you see output live AND save it to a file at the same time.
Example logging:
my_program > log.txt 2>&1
or with live view:
my_program 2>&1 | tee log.txt