In the first two labs, you typed lines and the computer answered. Two programs did that work.
Keyboardyou push keys
keys
Terminalshows the text
your linereply
Shell (bash)reads the line
| Job | Program |
|---|---|
| Show the keys that you push | Terminal |
| Send the line when you push Enter | Terminal |
| Read the line and decide what to do | Shell |
Write a reply that starts with bash: | Shell |
| Show the prompt and wait for the next line | Shell |
The terminal only moves text. The shell decides what to do. In this course, the shell is bash. Other shells exist, for example zsh on macOS.
The text at the start of each new line, before you type, is the prompt. The shell shows it when it is ready for your next line.
| Computer | Terminal |
|---|---|
| macOS | The Terminal app |
| Windows | The Windows Terminal app |
| This course | The panel at the right side of each lab |