Echo command
From NetworkCommands
A command shell built-in function available on most Linux platforms; used to display a line of text on the terminal (or command line.)
Contents |
Usage Syntax
echo [options] text
Common options include;
- -n - do not output the trailing new line
Usage Examples
echo hello world
echo $HOME
echo -n $HOME
Typical Output
steve@test-laptop:~$ echo hello world hello world
steve@test-laptop:~$ echo $HOME /home/steve
steve@test-laptop:~$ echo -n $HOME /home/stevesteve@test-laptop:~$
Usage Notes
As shown above, the environment variables can be specified instead of actual text
Text containing spaces does not need to be enclosed in quotes: ""
Special characters must be 'masked' with \
Linux Usage Notes
With most Linux or Unix commands;
- Brief help can be displayed using the option/keyword: -h or --help, for example: chmod --help
- A full command manual can be displayed using the man command followed by the command name, for example: man chmod
- Sometimes 'info' pages are used instead of or to provide more information than man pages; for example: info chmod
- Version information can be display using the option/keyword: -v or --version, for example: chmod --version
Related Files
The echo executable is normally found here: /bin/echo
Related Articles
Information on other Linux shell commands
Information on other Linux commands
Information on F5 BigIP commands
Information on Cisco commands
Information on Vyatta commands
Information on Extreme commands
Information on Blue Coat SGOS commands
Information on Nokia IPSO commands







