M1 Mac — How to switch the Terminal between x86_64 and arm64

switching efficiently between x86_64 and arm64 using created alias
$env /usr/bin/arch -<architecture> /bin/zsh --login
  • To see your current architecture, type:
see current architecture the Terminal is using
  • To switch to x86_64, type:
$env /usr/bin/arch -x86_64 /bin/zsh —-login

Creating alias in .zshrc:

I don’t want to remember the whole command and type it all the time (obviously it’s not efficient). The simplest solution is to create an alias to it in the .zshrc

adding alias to .zshrc


If you only want to use the Terminal app with Rosetta 2 for the x86_64 architecture, you can simple right click on the Terminal app in the Applications>Utilities, go the ‘Get Info’ and tick on “Open using Rosetta”



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store