You type in bash
. If you want this to be a permanent change the default shell to /bin/bash
by editing /etc/passwd
.
Here's some snippets from my /etc/passwd
:
avahi:x:84:84:Avahi daemon:/:/bin/false
xenoterracide:x:1000:100::/home/xenoterracide:/bin/zsh
postgres:x:88:88::/var/lib/postgres:/bin/zsh
bob:x:1001:1001::/home/bob:/bin/bash
usbmux:x:140:140:usbmux user:/:/sbin/nologin
The very last field contains the shell, Modifying the field after the last :
to a valid or invalid shell will work. /bin/false
and /sbin/nologin
both mean the user doesn't have a real login shell, although if pam is not set up right this doesn't mean they can't login (I reported a bug on this in Arch Linux, because you can login graphically without having a login shell). /bin/bash
and /bin/zsh
are both valid shells, see /etc/shells
for a list of valid shells on your systems. Here's my /etc/shells
if you're interested.
/bin/sh
/bin/bash
/bin/ksh
/bin/zsh
/bin/dash
Yes you can use chsh
or usermod
to do the same things, please remember these are just structured text files, and TIMTOWTDI.
$
came up rather thanusername@computername:~$
doesn't mean it wasn't bash. The exact formatting of the prompt is set by the PS1 variable, which can be set up or customized differently for different users. – frabjous Aug 30 '10 at 02:58echo $SHELL
to find out what your current shell is. – xenoterracide Aug 30 '10 at 12:41/bin/sh
often doesn't mean much that's usually a symlink to something else. I'd typels -l /bin/sh
to see what it's a symlink to. In some cases being a symlink to something changes its behavior, I don't think bash is that way. – xenoterracide Aug 30 '10 at 16:22/bin/sh
is a symlink to/bin/dash
. – mouche Aug 31 '10 at 01:59bash
as/bin/sh
disables many bash features (it goes into POSIX compliance mode). – Chris Down Sep 24 '11 at 18:04bash
does behave differently in some ways when it sees it's been invoked assh
. It acts as though--norc
was passed and it enters POSIX mode. – Eliah Kagan Apr 24 '15 at 14:52