Yep — you can install Oh My Zsh without changing your user’s login shell.
How to do it
- Make sure zsh is installed
macOS already has it. On Linux:
sudo apt install zsh(or your distro’s package manager). - Run the installer but prevent shell changes/auto-launch
export CHSH=no RUNZSH=no KEEP_ZSHRC=yes sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"CHSH=no→ don’t change your default shellRUNZSH=no→ don’t auto-start zsh after installKEEP_ZSHRC=yes→ don’t overwrite an existing.zshrc(safe even if you don’t have one yet)
- Use it only when you want
- Start a zsh session manually:
zsh(orexec zshto replace the current shell). - Or set just one terminal profile / VS Code terminal to run
zshwhile leaving your system default as bash.
- Start a zsh session manually:
Verify your default shell didn’t change
- Quick check in a new terminal:
echo "$SHELL" - Linux:
getent passwd "$USER" - macOS:
dscl . -read /Users/$USER UserShell
Later, if you do want to switch
- Change login shell:
chsh -s /bin/zsh(Linux) orchsh -s /bin/zshon macOS (then log out/in). - Revert to bash:
chsh -s /bin/bash.
That’s it—Oh My Zsh will be installed and ready, but only active when you launch zsh.