chsh
The command that changes your login shell to another program listed in /etc/shells.
In more detail
After installing a newer bash with Homebrew you add its path to /etc/shells and then run chsh -s with that path. The change applies to new logins, not to the terminal you are already in.
Example
chsh -s /opt/homebrew/bin/bashRelated terms
- login shell — The shell your account starts when you log in, recorded in the user database and shown by the SHELL variable.
- /etc/shells — A system file listing the full paths of programs allowed as login shells.
- Homebrew — A popular package manager for macOS and Linux, run with the brew command, which installs software into its own directory.
Taught in
- Which Shell Am I In, And Getting Bash Five — Bash Scripting & Command Line Automation
- Starters, Leavers And A Service Account: Accounts On Two Families — CompTIA Linux+ (XK0-006) Exam Prep