One of the reasons I took the plunge and bought an M1-based Mac is to test out its performance and suitability as a developer. An essential developer application on the Mac is Homebrew, the “missing package manager for macOS.” Although you cannot install Homebrew today to manage ARM-compiled packages, you can install Homebrew in the Rosetta environment and leverage the x86 packages.
Right click on your iTerm application icon and select Duplicate. Rename iTerm copy to something like iTerm x86 or iTerm Rosetta.
Now, right click on your new iTerm icon and click on Get Info and then check Open using Rosetta.
Open your iTerm Rosetta application and install Homebrew! Once installed you should be able to use
brew install in the iTerm Rosetta application and use those installed packages seamlessly between the two environments. You won’t, however, be able to use
brew install in your arm64 iTerm application (you’ll get
Error: Cannot install in Homebrew on ARM processor in Intel default prefix).
If you’re working in both x86 and ARM environments on your M1 Mac it is easy to lose track which iTerm you are in. We can use a little
zsh-foo to help us out. Add the following snippet to the end of your
# Requires iterm2
if [[ "$_ARCH" == "i386" ]]; then
echo -ne "\033]1337;SetColors=bg=0071C5\007"
We can do one better, however, by changing our iTerm Rosetta icon. Create your own icon, or, right-click the image below and select Copy Image. Then right-click your iTerm Rosetta application and select Get Info. In the upper-left click on the icon until you see a highlight around it and then paste the new icon image (Command-V).
Launch your iTerm Rosetta application and it’s much easier to distinguish between it and your “native” version.