Master the tiny but powerful `echo` command to display text, expand variables and redirect output. 09.03.2026 | reading time: 2 min You sit at a shell and need to show a message, inspect a variable or feed a pipeline; `echo` is the simplest tool for that job and often the first command every Linux enthusiast learns. Quick demo Try these commands to see behavior and quoting in action: ```bash $ echo "Hello, world" Hello, world $ name=alice $ echo "User:" $name User: alice $ echo '$HOME' $HOME $ echo "$HOME" /home/alice ``` Controls and portability Suppress the trailing newline or interpret backslash escapes, but be careful: `echo -n` removes the newline in many shells and `echo -e` enables escapes in some implementations; the behavior is not strictly portable, so prefer `printf` when exact output is required. Example: ```bash $ echo -n "no newline" $ echo -e "Line1\nLine2" Line1 Line2 $ printf "Line1\nLine2\n" Line1 Line2 ``` Redirection and composition Send `echo` output into files or pipelines to build quick scripts: overwrite a file with `echo "text" > file`, append with `>>`, pipe into `grep` or `sed`, and combine with command substitution to show computed values. Example: ```bash $ echo "startup at $(date)" >> /var/log/example.log $ echo "names:" | tr '[:lower:]' '[:upper:]' | tee names.txt ``` Companions on the command line `echo` is handy, but for formatted output, file writes and interactive pipelines you will often use `printf` for precision, `tee` to split streams, and `cat` to inspect files; learn how they work together. Next steps Practice writing small scripts that combine `echo` with redirection and command substitution to automate checks, then level up toward formal certification; consider CompTIA Linux+ or LPIC-1 and prepare intensively with bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. utilities scripting filesystem