Meet the Terminal

Terminal, shell and command line

These words are often mixed up, so let's get them straight:

  • The terminal is the window you type into.
  • The shell is the program inside it that reads what you type, runs it and shows the result. The most common shell on Linux is bash.
  • The command line is the line where you type a command.

Reading the prompt

When the shell is ready for a command, it shows a prompt. On our lab machine it looks like this:

student@vulntech:~$

PartMeaning
studentYour username: who you are logged in as
@vulntechThe name of the computer (its hostname)
~Where you are right now. ~ means your home folder
$You are a normal user. The administrator, root, gets a # instead

To run a command, type it after the prompt and press Enter.

Your first commands

whoami prints the name of the user you are logged in as:

whoami

In the terminal

student@vulntech:~$ whoami
student

hostname prints the computer's name:

hostname

In the terminal

student@vulntech:~$ hostname
vulntech

date shows the current date and time:

date

In the terminal (your date and time will be different)

student@vulntech:~$ date
Fri Oct 16 19:03:49 UTC 2026

echo prints back whatever you give it. It is the simplest way to make the terminal say something:

echo Hello from the terminal

In the terminal

student@vulntech:~$ echo Hello from the terminal
Hello from the terminal

Tip: Press Try it under an example to open the practice terminal and run the example there. Or type it yourself: typing is how the commands stick in your memory.

When something goes wrong

If you mistype a command, the shell tells you it doesn't know it:

whoamii

In the terminal

student@vulntech:~$ whoamii
-bash: whoamii: command not found

Nothing bad happened. Read the message, fix the typo and try again. Error messages are your friends: they tell you what went wrong.

Common mistake: Linux is case-sensitive. whoami works, but WhoAmI or WHOAMI do not. Commands are almost always lowercase.

HOME LEARN COMMUNITY DASHBOARD
Practice terminal Starting…