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 HelloThe terminal
The terminal is the window. The shell runs inside it.
echo TerminalThe shell
The shell is the program that runs commands.
echo ShellExample
echo Terminal
echo ShellKey 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?