/etc/shells
A system file listing the full paths of programs allowed as login shells.
In more detail
chsh refuses any shell that is not listed there, as a guard against locking an account out. Adding a line needs root, which is why the course uses sudo sh -c with an append redirect rather than a plain redirect.
Related terms
- chsh — The command that changes your login shell to another program listed in /etc/shells.
- login shell — The shell your account starts when you log in, recorded in the user database and shown by the SHELL variable.
- sudo — A command that runs another command with administrator (root) rights after checking you are allowed to.
Taught in
- Which Shell Am I In, And Getting Bash Five — Bash Scripting & Command Line Automation