1

How can I run a shell/bash/zsh script in Rosetta from Terminal without having the Terminal being opened in Rosetta?

0

1 Answer 1

8

The arch command is useful for that purpose

arch -arch_name binary args ...

See man arch for more details

Example without rosetta:

echo "arch" > build.sh
arch -arm64 /bin/bash ./build.sh 

Output:

arm64

Example with rosetta:

echo "arch" > build.sh
arch -x86_64 /bin/bash ./build.sh

Output:

i386

Not the answer you're looking for? Browse other questions tagged .