User Management
chsh
Change the login shell for a user account.
Synopsis
syntax
chsh [OPTION]... [USER]
Examples
Change your shell to zsh
chsh -s /bin/zsh
Change alice's shell to bash
sudo chsh -s /bin/bash alice
List all valid login shells
chsh -l
Common options
| Flag | Description |
|---|---|
| -s | Specify new shell |
| -l | List available shells |
About chsh
The `chsh` command change the login shell for a user account. User management commands handle creation, modification, and deletion of user accounts and groups.
Multi-user access control is a core feature of Linux. These commands are essential for system administrators managing servers, enforcing security policies, and provisioning access for teams.
The command accepts 2 commonly used flags shown above, though the full set of options is available in the man page (`man chsh`). The 3 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.
Related commands
More User Management Commands
Other commands in the User Management category