Skip to content

Instantly share code, notes, and snippets.

@cellularmitosis
Last active April 11, 2025 21:06
Show Gist options
  • Save cellularmitosis/a0e2a8a120ee50ba0734f9c39df53488 to your computer and use it in GitHub Desktop.
Save cellularmitosis/a0e2a8a120ee50ba0734f9c39df53488 to your computer and use it in GitHub Desktop.
Running an x86_64 Terminal.app on arm64 Macs

Blog 2025/4/10

<- previous | index | next ->

Running an x86_64 Terminal.app on arm64 Macs

Developers sometimes need to use Rosetta to run x86-64 binaries, or even a whole shell.

Previously, this was very easy to set up:

  • Right-click Terminal.app, Duplicate, name it "x64 Terminal.app"
  • Right-click "x64 Terminal.app", Get Info, tick the "Open using Rosetta" box

Unforunately, Apple seems to have removed the ability to duplicate Terminal.app in macOS 13.

The work-around I'm using is a tweaked version of this post from rsethc.

After creating a new Application using Automator, use this as the shell script action:

osascript -e 'tell app "Terminal"
    do script "arch -x86_64 su - $USER"
end tell'

The key difference is using su - $USER, which wipes any previous environment. In my case, I needed to wipe the arm64 homebrew $PATH entries, etc. Unfortunately, this also means you need to type in your password for each "x64 Terminal.app" session you launch.

The Automator setup should look like this:

and it should appear in your /Applications like this:

You can then put this in your .bashrc to select the appropriate homebrew installation:

if test "$(uname -m)" = "arm64" -a -e /opt/homebrew/bin/brew ; then
    eval $(/opt/homebrew/bin/brew shellenv)
elif test "$(uname -m)" = "x86_64" -a -e /usr/local/homebrew/bin/brew ; then
    eval $(/usr/local/homebrew/bin/brew shellenv)
fi

To install an x86_64 copy of homebrew, just use the normal install method from with "x64 Terminal.app".

You can install Rosetta via softwareupdate --install-rosetta --agree-to-license.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment