Back to course

11. The Shell and Your First Basic Commands (`echo`, `date`)

Linux Basics: From Zero to CLI Hero

Communicating with the System

When you type commands into the terminal, you are interacting with a program called the Shell. The default shell in most modern Linux distributions (including Ubuntu) is Bash (Bourne Again SHell).

The echo Command

echo is used to display a line of text or variables to the standard output (your screen).

bash $ echo Hello, Linux World! Hello, Linux World!

The date Command

The date command prints the current system date and time.

bash $ date Tue Nov 7 14:30:00 UTC 2023

You can customize the output using format strings:

bash $ date +"Today is %A, %B %d." Today is Tuesday, November 07.

Clearing the Screen

Use the clear command or the shortcut Ctrl + L to clear the terminal history and refresh your screen.