How to fix bash or auto run /bin/bash on SSH login

You just need to change your shell. As that user, run:

$ chsh -s /bin/bash

Then sign out and back in.

After doing this the prompt doesn't look like you want, you'll need to start tweaking your environment's PS1 variable.


You need to change your shell. Run the command

chsh -s /bin/bash

then sign in again.

However, not all users have the right to change their own shell. If you use sudo remember to add your username to the chsh command as

sudo chsh <username> -s /bin/bash

otherwise you will change the shell for root inadvertently.


One possible reason is that the default shell of myusername is not bash.

You can check the shell of your current user with:

  • echo ${SHELL}
  • echo $0

To change the user shell permanently see man chsh , e.g.:

chsh -s /bin/bash

Tags:

Bash

Ssh