115

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?

Jonas
  • 28,660

3 Answers3

151

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

Dentrasi
  • 11,325
104

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.

Teddy
  • 7,218
67

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.

txwikinger
  • 2,697