Online Linux Terminal Logo
OnlineLinuxTerminal
TextverarbeitungCLI Manual

$echo

Print text strings or write data to files using shell redirection.

BefehlssyntaxPOSIX Standard
echo [OPTIONS] [STRING...]
Linux-Community2.4k Online

Tausche dich mit Linux-Nutzern aus, lerne Befehle und lade PDF-Cheatsheets herunter.

Live im interaktiven Terminal ausprobieren

Client-seitige Simulation ohne Installation mit sofortigem Feedback.

Im Vollbild-Terminal öffnen ↗
bash — terminal

Überblick & Funktionsweise

`echo` displays strings of text to standard output. When paired with `>` (overwrite) or `>>` (append) redirection operators, `echo` is the most common way to create config files, append environment variables, or print script debug statuses.

Wichtige Optionen und Flags

Flag / OptionDescription
-eEnable interpretation of backslash escapes (e.g., \n for newline, \t for tab).
-nDo not output the trailing newline character.

Praktische Anwendungsbeispiele

#1Write text to a new file
echo "API_PORT=8080" > /home/user/.env && cat /home/user/.env

Creates or overwrites .env with API_PORT=8080.