Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

echo

The echo command in Linux is used to display text or variables on the console. It’s a simple yet powerful tool for outputting information and can be combined with other commands for more complex tasks.

Example Commands:

echo "Hello, World!"

Outputs the string “Hello, World!” to the terminal.

echo $USER

Prints the value of the USER environment variable, usually your username.

echo -n "Do you want to continue? "

Displays the message without adding a new line after it, allowing for continued input on the same line.

echo -e "\nThis is a new line"

Outputs an empty line followed by “This is a new line” due to the enabled escape character \n.

echo -e "Hello\tWorld"

Displays “Hello World” with a tab space between them, resulting in side-by-side text.

echo "Message" >> log.txt

Adds the text “Message” to the end of log.txt, useful for logging purposes.

The echo command is a simple yet essential tool in Linux for printing text and variables. Its ability to work with other commands via pipes and redirections makes it invaluable for scripting and automation tasks, making it a cornerstone of shell scripting.

Add Your Heading Text Here

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Linux Commands and Tools

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.