Online Linux Terminal Logo
OnlineLinuxTerminal
Traitement de texteCLI Manual

$echo

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

Syntaxe de la commandePOSIX Standard
echo [OPTIONS] [STRING...]
Communauté Linux2.4k En ligne

Échangez avec des utilisateurs Linux, apprenez des commandes et téléchargez des PDF.

Essayer en direct dans le bac à sable interactif

Simulation côté client sans installation avec retour instantané.

Ouvrir dans le terminal plein écran ↗
bash — terminal

Aperçu et fonctionnement

`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.

Options et drapeaux courants

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

Exemples pratiques du monde réel

#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.