3

Im trying to setup iterm2 to use bash (as well as zsh).

When I open iterm2 it defaults to zsh.

I am happy with zsh but I would like to add a "bash" iterm2 profile to allow me to open a new tab in bash if so desired.

Is this possible? Please advise - many thanks

danday74
  • 52,471
  • 49
  • 232
  • 283

4 Answers4

8

If your default system is zsh, your Terminal should start with it. To configure iTerm2 with bash you have to open Preferences and change the COMMAND on General tab on your default profile. You have to enter /bin/bash or whatever shell you want.

Sheradil
  • 96
  • 1
2

This info appears to be stale. As of iTerm2 build 3.4.19 (2023-0515) there isn't a "command" area on the "general" tab. I believe that you can switch shells by creating a new profile, but I'm not sure how.

JD O'Grady
  • 21
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 16 '23 at 00:02
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/34393257) – Moritz Ringler May 20 '23 at 08:42
1

As of 2023, the preferences menu has changed. The solution is now:

  • Open Preferences
  • Go to the Profiles tab
  • Go to the General sub-tab
  • Under Command, select "Command" in the drop-down and enter "/bin/bash" (without quotes of course) into the text field.

Restart your iTerm and it will be in a bash shell.

1

To change the default shell to bash (not exactly what the OP is asking for, but what brought me to this question), using chsh -s /bin/bash worked for me.