chsh—change your login shell
chsh [ -s shell ] [ -l ] [ -u ] [ -v ] [ username ]
chsh is used to change your login shell. If a shell is not given on the command line, chsh prompts for one. All valid shells are listed in the /etc/shells file.
-s, --shell | Specifies your login shell. |
-l, --list-shells | Prints the list of shells listed in /etc/shells and exits. |
-u, --help | Prints a usage message and exits. |
-v, --version | Prints version information and exits. |
Example A.12.
1 $ chsh -l /bin/bash /bin/sh /bin/ash /bin/bsh /bin/tcsh /bin/csh /bin/ksh /bin/zsh 2 $ chsh Changing shell for ellie. New shell [/bin/sh] tcsh chsh: shell ust be a full path name. |
Explanation
Lists all available shells on this Linux system.
Asks the user to type in ...
Get Linux Shells by Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.