Terminal (macOS) Explained
Terminal. Shell. Config files. Three different things — here's how they connect.
You type in the emulator. The shell interprets. Unix executes.
GPU-accelerated, native macOS app. Supports Kitty keyboard protocol. Fast, modern, opinionated defaults.
Most popular among Mac devs. Split panes, tmux integration, rich profiles and triggers. Feature-heavy.
Ships with macOS, zero setup required. Fine to start with, but hits limitations as your workflow grows.
Fastest renderer. No tabs, no UI chrome — for minimalists who use tmux. Config via TOML file.
~/.zshrc works identically in every one of them. Pick one and stop thinking about it.
git status, the shell finds the git binary and runs it.Why 3.2? Apple froze it in 2007 — GPLv3 licensing issue prevented updates.
Still works, just very old.
Better completions, themes via Oh My Zsh, Starship prompts.
Same syntax as bash for everyday use.
- Config:
~/.zshrc - Themes: Oh My Zsh, Starship
- Great tab completions
- Config:
~/.bashrc - Most scripts target bash
- Frozen at v3.2 on macOS
- Config:
~/.config/fish/ - Autosuggestions built-in
- Not POSIX — scripts differ
echo $SHELLTo change it:
chsh -s /bin/zsh
Reads:
.zprofile (zsh) / .bash_profile (bash)Sets: $PATH, environment variables that must exist early
Think of it as: the session initializer
Reads:
.zshrc (zsh) / .bashrc (bash)Sets: aliases, functions, prompt, completions
Think of it as: your shell personality
.zprofile and .zshrc both run. On Linux this is often not the case.
~/.config/fish/config.fish
Highlighted boxes = the file you'll edit 99% of the time for each shell.
Your everyday config — edit this 99% of the time.
For things that must run once at login — before .zshrc.
Runs for every zsh invocation — including scripts. Keep it minimal.
Fish breaks the pattern — everything lives in one file.
path_helper.echo $SHELL
Your default login shell
echo $0
Shell running in this session
cat /etc/shells
All shells installed on the system
which zsh
Path to a specific shell binary
chsh -s /bin/zsh
Set default shell to zsh
chsh -s /bin/bash
Set default shell to bash
chsh -s /opt/homebrew/bin/fish
Set to Homebrew-installed fish
exec zsh
Restart shell without new window
source ~/.zshrc
Reload zsh config in current session
. ~/.zshrc
Same — dot is POSIX alias for source
exec $SHELL
Start fresh shell (cleaner reload)
source ~/.bash_profile
Reload bash login config
echo $PATH
Full PATH (colon-separated)
which git
Which binary runs when you type 'git'
type git
Like which but also shows aliases
printenv HOME
Print a specific env variable
| File | Shell | When it runs | Use for | Edit? |
|---|---|---|---|---|
| ~/.zshrc | zsh | interactive | aliases, functions, prompt | YES — main config |
| ~/.zprofile | zsh | login | PATH, Homebrew, version mgrs | YES — for PATH setup |
| ~/.zshenv | zsh | always | $EDITOR, $ZDOTDIR only | rarely |
| ~/.bash_profile | bash | login | same as .zprofile | if using bash |
| ~/.bashrc | bash | interactive | same as .zshrc | if using bash |
| ~/.config/fish/config.fish | fish | always | everything | if using fish |
source ~/.zshrc or open a new tab.Related Topics
Git Worktrees
Parallel development with shared object stores. Work on multiple branches simultaneously without stashing or cloning.
GCP IAM
Identity & Access Management — principals, roles, hierarchy, service accounts, and policy evaluation in one mental model.
Helm Charts
Chart structure, templating engine, release lifecycle, and everything you need to package Kubernetes applications.