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) |
| Symbol | Means |
|---|---|
$ |
Normal (regular) user — limited permissions |
# |
Root user — full permissions on everything |
$username@hostname: with a colon, then current path, then $Both use the same structure — just minor formatting differences.
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 <--
| 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) |