Forrest logo
back to the chsh tool

chsh:tldr:c9b8c

chsh: Set a specific login [s]hell for the current user.
$ chsh -s ${path-to-shell}
try on your machine

The "chsh" command is used to change the login shell for a user. The "-s" option specifies the new shell that will be assigned.

The "${path-to-shell}" is a placeholder that should be replaced with the actual path to the desired shell. The shell can be any valid executable file on the system. Common shells include "/bin/bash" for Bash, "/bin/sh" for the Bourne shell, "/bin/zsh" for Zsh, and so on.

By running this command, the login shell for the user will be updated to the specified shell. This means that when the user logs in again, the new shell will be used as their default command-line interpreter.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the chsh tool