Online Linux Terminal Logo
OnlineLinuxTerminal
Обработка текстаCLI Manual

$echo

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

Синтаксис командыPOSIX Standard
echo [OPTIONS] [STRING...]
Сообщество Linux2.4k Онлайн

Общайтесь с пользователями Linux, учите команды и скачивайте шпаргалки.

Попробуйте в интерактивной песочнице

Клиентская симуляция без установки с мгновенным результатом.

Открыть в полноэкранном терминале ↗
bash — terminal

Обзор и принцип работы

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

Основные флаги и параметры команды

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

Практические примеры использования

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