Apple Replaces Bash With Zsh as macOS's Default Shell
The June 2019 WWDC announcement that Catalina would ship with zsh as the default login shell, and why an old GPL licensing decision, not a technical preference, actually drove the change.
tag
16 posts
The June 2019 WWDC announcement that Catalina would ship with zsh as the default login shell, and why an old GPL licensing decision, not a technical preference, actually drove the change.
Commands from an earlier session seem to vanish, or history from multiple open terminals overwrites itself instead of combining. Here's how history file writing actually works, and the specific settings that fix each symptom.
Opening a new terminal tab takes a visibly annoying second or two before you get a prompt. Here's how to actually find which specific line in your config is responsible, rather than guessing.
Every shell in daily use today — Bash, Zsh, tcsh, fish — descends from a lineage that started with a genuinely minimal 1971 command interpreter, branching twice into distinct, still-visible family trees.
A complete walkthrough of the two genuinely essential shell scripting debugging tools — one that traces exactly what a script actually executes, and one that catches whole categories of bugs before the script ever runs.
Announced by maintainer Chet Ramey on February 20, 2009, Bash 4.0 added key-value associative arrays and several other features that had been requested by scripters for years.
Released as beta version .99 on June 8, 1989, Bash was built for the GNU Project as a genuinely free replacement for the Bourne shell — and would eventually become the default shell on more systems than any of the proprietary shells it set out to replace.
They all accept most of the same basic commands, which is exactly what makes their real differences easy to miss until a script written for one breaks silently on another.
That colorful prompt showing your git branch, exit code, and current directory isn't a separate program running alongside your shell — it's a string your shell re-evaluates before every single command.
An unquoted variable works fine in testing, then silently breaks in production the first time it holds a value with a space in it. This is the single most common category of real-world shell scripting bug.
By the time a command you typed actually runs, the shell has already rewritten it — expanding variables, substituting command output, and turning wildcard patterns into real filenames. Here's the exact order that happens in.
You just installed a tool, its binary is definitely on disk, but your shell insists it doesn't exist. This is almost always a PATH problem, and there are only a few actual explanations for it.
Re-running the last command with sudo, or fuzzy-searching back through everything you've typed today, both rely on the same underlying mechanism — a persisted, indexed log of your previous commands.
A complete walkthrough of the actual difference between an alias and a function, when each one is the right tool, and how to avoid the specific mistakes that make aliases behave unpredictably.
Disclosed on September 24, 2014, the Shellshock vulnerability let attackers execute arbitrary commands through a flaw in how Bash processed environment variables — and botnets were scanning for vulnerable systems within hours.
Pressing Tab and getting a sensible list of filenames, commands, or flags looks simple from the outside. Underneath, it's a programmable system matching the word you're typing against rules specific to the command you're running.