Change shell to bash for default?

Im trying to changing the shell to “bash”, i have for default
zsh i think.
when i open a terminal i get this kind of:

~ >>>

i try this:

 chsh -l
/bin/sh
/bin/bash
/bin/zsh
/usr/bin/zsh
/usr/bin/git-shell

Also this:

 sudo chsh -s /bin/sh 

And if i log out, and enter again i get this in the terminal:

sh-5.1$

…but if i then put “bash” as a command, i get this:

[myuser@Notfire ~]$ 

Why im not getting that at the first time? that is not how is suppose to be?

Hi,

if you are using Konsole, than you can change it in Settings → Edit Current Profile at Command:
If you using Yakuake you will find iit in Manage Profiles, select the Profile → Edit at Command.

Hope it helps…

2 Likes

Hi @9acca9,

I wonder whether you could execute the following terminal command:

sudo chsh yourusername  -s /bin/bash

Then, close the session and you could see the changes.

Regards,

1 Like

I think it is because it is not the same shell, so they do not work the same and do not share the same configuration, I guess?

Because you changed your shell to /bin/sh

If you then type “bash”, this shell is executed - and you get a different prompt.

You don’t need sudo for that, btw. (only when you want to change it for another user than yourself)

If you want to use bash, change the shell to bash instead of sh …

chsh -s /bin/bash

You don’t want to use /bin/sh as your default shell - use bash or zsh.

4 Likes

Same issue here…I’m trying to revert to the bash shell from zsh.
I get this reply: chsh: Shell not changed.

Thanks

If you are using konsole then you should change it there.
Edit current profile.
Command = /usr/bin/bash

PS.

For bash packages you probably want to have installed bash and bash-completion.
Whenever you are finished you can also remove all zsh* packages.

Becaus your user shell was already Bash. Now as explained above, Konsole has a specific setting for each Konsole profile you may create and you need to set it there. It doesn’t follow the user shell setting. The user shell will be the one used for example when using SSH with your user. You can see what it is set for in the file /etc/passwd for my user it will be /bin/bash (don’t mess with that file manually if you don’t understand what it is and how it works).

omano:x:1000:1001::/home/omano:/bin/bash
1 Like

Its kinda funky … but its preferable to them actually trying to change the system shell to zsh.

Which they tried by the way, but it broke things too obviously to let stand.

- Insert here some garbage about zsh being a perfect drop-in replacement for bash :roll_eyes: -

Which is why we have it implemented via the Konsole Profile.

And why it needs to be changed there.

And things like chsh have no effect.

Hi,
I solved the problem with two aliases:

alias tobash='sudo chsh yourusername -s /bin/bash && echo '\''Now log out.'\'' '

alias tozsh='sudo chsh yourusername -s /bin/zsh && echo '\''Now log out.'\'' '

Hope it help,

Regards,

I know it’s not really all that relevant to this thread, but why the change to zsh in the first place?

Mint and other distros have also done this and it doesn’t seem to have any benefit, at least that I can appreciate. I for one don’t like seeing “unprintable” characters in Terminal outputs posted here.

Graphical stuff doesn’t belong in a Terminal window, in my possibly old-fashioned opinion.

3 Likes

Nothing graphical about it. What looks graphical, is just a font, that isn’t even part of zsh.

It has some pretty cool stuff, that you can’t do in bash.

I restored a backup from 2 days ago, and then used Konsole Manager to set up the bash profile, and all is good…

Thanks

1 Like

I’ve yet to explore that. But I prefer this:

Screenshot_20240916_040417

Can zsh do this, over ssh connections with a bash client?

I find this so much easier to see which machine you are logged into, and as which user.

Sure. Though that’s nothing to do with ssh. Just your shell, on each host separately.

You can freely type PS1=whatever to change your prompt in bash. You are just using the Manjaro bash prompt default. The classic bash prompt has often been PS1=[\u@\h \W]\$ - So \u gets user, then hostname, and working directory. Exactly what you have, but it’s a little more complex with color and stuff.

But zsh doesn’t use PS1, it uses PROMPT[1-6] and more. And It’s even more advanced at handling different prompts contextually to boot.

1 Like