Users

The chsh command

Changes a user's default shell.

Syntax

chsh -s /bin/bash usuario

Most useful options

-sSpecifies the new shell
-lLists the allowed shells

Copy-ready examples

$ chsh -lSee the available shells
$ sudo chsh -s /bin/bash alumnoChange the shell

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • The shell must appear in /etc/shells; otherwise it is rejected.

Related commands

FAQ

When to change the shell?

If you prefer zsh or another, or if an account needs a restricted shell.

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course