Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I have a Ubuntu Server VPS and I want to use /bin/bash/ as my shell. How can I change my shell? I have root access but I don't work as root. So dash is my default shell now.

I have read How do I make Bash my default shell on Ubuntu? and chsh seams to be the preferred way to go. But when I type chsh /bin/bash I get this message: chsh: unknown user /bin/bash

And if I just type /bin/bash the Bash shell seams to work fine. How to change it?

share|improve this question

marked as duplicate by Heptite, Garrett, random Mar 8 '14 at 13:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 53 down vote accepted

To change a shell, use the bare chsh command. This will prompt you for the new shell. You do not have to run anything as root.

share|improve this answer
Ah, that was even better! – Jonas Mar 12 '10 at 20:19
don't forget to log out and log back in to see the change. – hangtwenty Jul 3 '13 at 12:23
Doesn't work as normal user: $ chsh You may not change the shell for 'user'. – Henning May 1 '14 at 20:00
Works for me. Sounds like your system has been deliberately locked down. – Michael Cole Feb 25 at 21:22
I use ssh, but chsh asks me for password which I don't know. Any way to work around this? – Qwerty Apr 28 at 13:25

When running as root, you can use chsh to change other users shells. The syntax you want to use it this. You can change your own shell without root rights.

chsh -s /bin/bash username

share|improve this answer
Thanks a lot! That works fine! – Jonas Mar 12 '10 at 15:22
-1 chsh does not need to be run as root to change your own shell. Changing others' shells requires root. – Broam Mar 12 '10 at 17:25
+1! Thanks a lot! – user568021 Mar 30 at 11:00

You can change your default shell for your user by using the usermod command.

sudo usermod -s <shell> <username>

replace with the name of the shell you want to use (i.e. /bin/bash) and with the username for which you want to change it.

This will set the default shell for the username selected in the /etc/passwd file.

share|improve this answer
Use usermod if you see "chsh You may not change the shell for..." – Xeoncross Jun 27 at 23:22

Not the answer you're looking for? Browse other questions tagged .