🎓 A1Learner
🔍
0 of 50 lessons completed

Shell and Terminal

The terminal is the window, and the shell is the program that runs inside it. The terminal shows the shell, and the shell runs your commands.

The prompt

The prompt is the mark that waits for a command.

# shell$ is the prompt. Type after it.
echo Hello

The terminal

The terminal is the window. The shell runs inside it.

echo Terminal

The shell

The shell is the program that runs commands.

echo Shell

Example

echo Terminal
echo Shell

Key points

  • Terminal: a window that shows text and takes typed input.
  • Shell: the program inside the terminal that runs commands.
  • Use the terminal to open a shell and type commands.

In this example, the first line prints Terminal for the window. The second line prints Shell for the program inside it.

Note

On macOS the usual shell is zsh, and on most Linux systems it is bash.

Try it Yourself

Edit the code, then press Run.

Running is simulated

Exercise

What runs inside the terminal?