Browse Linux & CLI Topics ▼

Standard Streams (stdin, stdout, stderr)

📂 Streams, Pipes & Redirection 📘 Lesson 8 of 21

Understand the three standard Unix I/O streams and their file descriptors (0, 1, 2).

Standard Streams (stdin, stdout, stderr) is an essential topic in LINUX.

Overview

Mastering standard streams (stdin, stdout, stderr) provides the core mental model and practical skills needed for real-world software engineering workflows.

# Stream File Descriptors:
# 0 = Standard Input (stdin)
# 1 = Standard Output (stdout)
# 2 = Standard Error (stderr)

# Redirect stdout (1) and stderr (2) separately
python app.py > output.log 2> error.log

Key Concepts

  • Understand the fundamental syntax, commands, and architecture.
  • Learn standard conventions, safety guardrails, and common pitfalls.
  • Apply practical idioms directly in production environments.

[!TIP] Practice these core patterns thoroughly. Next, proceed to linux-pipes-and-filters.

Test your understanding of Standard Streams (stdin, stdout, stderr)

Quick interactive practice questions with instant feedback.

Take Quiz →