Skip to content

Instantly share code, notes, and snippets.

Last active February 24, 2022 15:21
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Heterogeneous Homebrew: Apple Silicon & Intel Rosetta 2 side-by-side
# Install Homebrew at /opt/homebrew (for Apple Silicon)
arch -arm64e /bin/bash -c "$(curl -fsSL"
# Install Homebrew at /usr/local (for Intel Rosetta 2)
arch -x86_64 /bin/bash -c "$(curl -fsSL"
# Add these lines to ~/.zshrc
alias za="arch -arch arm64e /bin/zsh"
alias zi="arch -arch x86_64 /bin/zsh"
if [[ $(arch) == "arm64" ]]; then
PS1="%{$fg_bold[red]%}🐇%{$reset_color%} $PS1"
PS1="%{$fg_bold[red]%}🐢%{$reset_color%} $PS1"
# Usage
# - Run `za` to switch to Apple Silicon shell & Homebrew
# - Run `zi` to switch to Intel Rosetta 2 shell & Homewbrew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment