Change Your Default Login Shell with chsh

Make fish, zsh or any installed shell the shell you get on every login and terminal session.

LinuxchshshelluserconfigLow risk
Run chsh -s /usr/bin/fish, enter your password, and log out and back in for the new default shell to take effect.

01Command

Command
$ chsh -s /usr/bin/fish

02What it does

chsh edits your entry in /etc/passwd, which is what login managers and SSH read to decide which shell to start — unlike setting SHELL in .bashrc, which only affects the current session. The chosen shell must appear in /etc/shells or chsh refuses it for security; use the absolute path, not just the name. Current setting is visible with echo $SHELL, and valid options with cat /etc/shells.

03Risk

RiskLow risk
RequirementsThe new shell must be listed in /etc/shells; util-linux/shadow chsh (preinstalled)
!Warning: A typo here can break logins on single-user systems — verify the path with which fish first, and keep a root session open while testing.

04Undo

Undo
$ chsh -s /bin/bash

05Sources

  • chsh(1) — change your login shell
    man7.org · community · 2026-09-17
    Evidence: Man page documents chsh changing the login shell and the -s/--shell option; confirms 'chsh', 'shell' and 'login' appear in the text.
  • chsh(1) — Ubuntu man page
    Ubuntu manpages · community · 2026-09-17
    Evidence: Man page text includes -s, --shell (specify login shell) and the note that the new shell must be listed in /etc/shells.

Last verified: 2026-09-19 · Category: System & Settings

06Related solutions