Changing my shell in Debian Linux

When I started a terminal on my Debian Linux I had sh-3.2:~$ instead of MyUsername:~$ as I used to have before. My ".bashrc" file didn't work anymore. In order to see which shell I'm running I had to show the output of the SHELL variable as defined in the in the PATH :

sh-3.2:~$ echo $SHELL

The respond is :

sh-3.2:~$ /bin/sh

As I want to use the bash shell I have to change my shell. But before that, I woulds like to list the shells that are installed on my system so I typed :

sh-3.2:~$ cat /etc/shells

I got :

  /bin/csh
  /bin/sh
  /usr/bin/es
  /usr/bin/ksh
  /bin/ksh
  /usr/bin/rc
  /usr/bin/tcsh
  /bin/tcsh
  /usr/bin/esh
  /bin/dash
  /bin/bash
  /bin/rbash

To change my shell from sh to bash I used the command chsh and typed the path of the bash shell :

sh-3.2:~$ chsh
Enter the new value, or press return for the default
    Login Shell [/bin/bash]: /bin/bash

I logged out then in, for my new shell to work.

Starting a terminal gave me :

MyUsername@Computer:~$

Discussion

Balaji DuttBalaji Dutt, 2009/04/15 11:59

Hi,

Had a similar problem and came across your article. In the end I discovered that when you create a user in Debian, you have to specify the shell at creation, i.e,

useradd -m -s /bin/bash <someuser>

Otherwise, it default to /bin/sh which gives that weird sh-3.2 prompt.

AnonymouseAnonymouse, 2009/07/08 19:33

To change the shell: modifying /etc/passwd is not enough; manually defining a variable $SHELL in “autoexec” files is not enough; chsh did the work!

Enter your comment
 
 
 

Recent changes RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki