RackNerd Billboard Banner

How to Change Your Default Shell on Linux with chsh

The Linux shell is where you spend most of your time if you’re working in the terminal. While Bash is the default for many distributions, there are other powerful shells out there—Zsh, Fish, and others. Want to switch things up? Here’s how you can change your default shell using the chsh command.

Why Change Your Shell?

Maybe you want more features, better customization, or just a fresh experience. Zsh offers robust autocompletion and plugins. Fish brings smart suggestions and a modern feel. Whatever your reason, switching shells is quick.

Step 1: Check Which Shells Are Available

First, see what shells are installed and available on your system:

cat /etc/shells

You’ll get a list like:

/bin/sh
/bin/bash
/usr/bin/zsh
/usr/bin/fish

If your preferred shell isn’t listed, you’ll need to install it first.

Step 2: Install a New Shell (If Needed)

For example, to install Zsh:

  • Debian/Ubuntu:
    sudo apt install zsh
  • Fedora:
    sudo dnf install zsh
  • Arch:
    sudo pacman -S zsh

Repeat for Fish or any other shell.

Step 3: Change Your Default Shell

Run:

chsh -s /path/to/shell

Example, for Zsh:

chsh -s /usr/bin/zsh

Note: Use the exact path from /etc/shells.

Step 4: Log Out and Back In

Your new shell won’t kick in until you log out and log back in, or restart your terminal session.

Step 5: Check It Worked

Open a terminal and run:

echo $SHELL

It should show the new shell’s path.

Rollback: Changing Back

You can always repeat the process and pick another shell, or go back to Bash by running:

chsh -s /bin/bash

Quick Tips

  • Changing your shell only affects your user. Other users and system processes aren’t impacted.
  • Don’t delete your old shell—you might need it for troubleshooting.
  • If you get locked out or something breaks, you can usually fix things by logging in as another user or using a TTY.

Bottom line:
chsh makes switching your default shell on Linux quick and easy. Try it out and see which shell feels right for you.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
RackNerd Billboard Banner
© 2025 Computer Everywhere
Your Everyday Guide to the Digital World.
Terms of Service | Privacy Policy
Copy link