1. The Shell Prompt

Shell Prompt Structure

When you open the terminal, you see something like this:

aliaa@rocky-srv1:~$

It has 4 parts:

Part Example Meaning
Username aliaa The user you are logged in as
Hostname rocky-srv1 The name of the server/machine
Current directory ~ The tilde ~ means the home directory of the current user
Prompt symbol $ or # Indicates user type (see below)

Prompt Symbol: $ vs

Symbol Means
$ Normal (regular) user — limited permissions
# Root user — full permissions on everything

Differences Between Distros

Both use the same structure — just minor formatting differences.


2. Shell Types

What is a Shell?

The shell is the interface between you and the kernel. You type commands into it, and it sends them to the kernel.

You (Terminal)  -->  Shell  -->  Kernel  -->  Hardware
                                              |
You (Terminal)  <--  Shell  <--  Kernel  <--

Common Shell Types

Shell Full Name Notes
bash Bourne Again Shell Default on most Linux distros
sh Bourne Shell Original shell from UNIX era
zsh Z Shell Default on macOS since Catalina (10.15)