0

As many of you know, macOS is switching to zsh from bash. Before converting, I would like to play with zsh a bit.

Is there a way to open a single Terminal window or tab as a zsh shell, without having to set zsh as my default shell?

Can I, say, set up a profile in Terminal preferences with a Startup Run command that'll make windows/tabs opened with that profile run with a zsh shell?

Update:
I got something like what I want by creating a profile in Terminal preferences, clicking the Shell tab, clicking Run command, adding the command exec /bin/zsh, and clicking Run inside shell.

This does open a Terminal window running zsh - inside of bash. I'm looking, however, for a window opened running zsh on its own...

Clarification:
I want the shell to run the normal zsh startup/shutdown files - without having to change my default shell yet.

  • 1
    I don't get your point exactly. Why is exec zsh not sufficient to "play" a little bit? exec replaces the current shell with zsh, it's not run inside bash. Maybe you want to use exec zsh -l to get a socalled login shell, which sources different files; see INVOCATION in man zsh. – mpy Oct 8 at 16:30
  • Yes, @mpy, I believe the "login shell" is what I am looking for. When I entered exec zsh -l, though, the window just crashed. Based on the man zsh page, I tried exec /bin/zsh -i("force shell to be interactive"), and the window opened. Now, I just need to test whether that runs the appropriate login and logout files (which is what I'm looking for)... – leanne Oct 9 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.