How do I change my shell?

0196

To change your default shell, you can use the chsh command or usermod command, depending on your system. Here are the steps for both methods:

Using chsh Command

  1. Open your terminal.

  2. Run the following command, replacing /bin/bash with your desired shell:

    chsh -s /bin/bash
  3. You may need to log out and log back in for the changes to take effect.

Using usermod Command (for Linux)

  1. Open your terminal.

  2. Run the following command with superuser privileges, replacing username with your actual username and /bin/bash with your desired shell:

    sudo usermod -s /bin/bash username
  3. Verify the change by checking your entry in /etc/passwd:

    grep -w 'username' /etc/passwd

You should see the new shell at the end of your entry.

0 Comments

no data
Be the first to share your comment!