Shell
Also: bash · zsh · PowerShell · 殼層
The program that reads what you typed and goes and runs it.
When you will meet it
When an install script fails, the error usually comes from the shell. Knowing which one you have tells you whether to search for bash or PowerShell syntax — they differ, and copying the wrong one fails.
An analogy
If the terminal is the television set, the shell is the channel. One set can switch channels; one window can run different shells.
Minimal example
echo $SHELL # macOS / Linux:看你預設的 shell
$PSVersionTable # Windows PowerShell:看版本Recent macOS defaults to zsh, most Linux to bash, Windows commonly to PowerShell. Check which one an example was written for.
What people get wrong
- Pasting bash syntax into PowerShell or vice versa. Variables, path separators and quoting rules all differ.
Related terms
Next
- 五分鐘設置你的 LLM 開發環境15 minChinese only