I use zsh but would like to use bash in tty

I use zsh but would like to use a normal bash as soon as I switch to tty. Because of I use starship-prompt it is not readable. There must be something I need to add to my .zshrc.

Is it that easy to just put chsh /bin/bash into the .zshrc
Or am I thinking completely wrong?

Surely @Kresimir can help me out.

2 Likes

Keep it simple. Use Bash as your user’s default shell (don’t chsh) and just launch your terminal emulator with Zsh. Most terminal emulators have the option to launch a shell of your choice. The added benefit is that you’ll also have Bash if you connect through SSH.

That’s how I do it.

4 Likes

In TTY, run

bash

To automate running bash, maybe this helps in the config (didn’t test, sorry):

if [ "$XDG_SESSION_TYPE" = "tty" ] ; then
    bash
fi

Also command tty can be used to check if running in TTY.

2 Likes

That is unnecessary complicated and you then have two shells running.

Ok that is very simple. I have not thought in this direction.
I will change my shell back to bin/shell and set it to zsh in konsole. You are totally right, sometimes it makes more sense to think simple :wink:

1 Like

Agreed, your suggestion is probably better.
I’m just using bash… :wink:

2 Likes

@Kresimir
Everything changed as intended.
Thank you again very much for this food for thought to think simple :handshake: :brain:

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.