Scroll to navigation

CHSH(1) chsh CHSH(1)

NAME

chsh - change login shell

SYNOPSIS

chsh [option...] [user]

DESCRIPTION

chsh is used to change the user login shell. A normal user may only change the login shell for their own account, the super user may change the login shell for any account.

If a shell is not given on the command line, chsh operates in an interactive fashion, prompting the user with the current login shell. Enter the new value to change the field, or leave the line blank to use the current value. Enter a space or none to remove the old content. The current value is displayed between a pair of [...] marks.

The only restrictions placed on the login shell is that the command name must be listed in /etc/shells, unless the invoker is the super-user, and then any value may be added. An account with a restricted login shell may not change their login shell.

This implementation does not require the setuid bit set, instead it will communicate via varlink protocol with pwaccessd(8) and pwupd(8) to read and modify the account data.

OPTIONS

-s, --shell

Specify the login shell.

-l, --list-shells

Print the list of allowed shells(5) and exit.

--help

Print a more verbose help text and exit.

-v, --version

Print version information and exit.

FILES

/etc/passwd

user account information

SEE ALSO

pwaccessd(8), pwupd(8), login(1), passwd(5), shells(5)

12/17/2025 account-utils 1.0.0