3

After moving to Apple Silicon, somehow the Terminal still returns i386 for arch. (Terminal.app info's 'Open using Rosetta' is unchecked). It looks like some setting is preserved from the backup.

One way to work around it is to launch a new shell with the following:

env /usr/bin/arch -arm64 /bin/bash --login

How can I make arm64 the default?

3
  • How do you check what arch Terminal is - isn't what you are testing the program you are running in Terminal - which ones are i386 (Also isn't Intel x86_64 - i386 is 32 bit Intel which is very odd to see on Apple Silicon) We need to know more about your setup.
    – mmmmmm
    Commented Apr 5, 2023 at 8:34
  • 1
    Which shell binary are you running in Terminal? Is this binary universal or just compiled for Intel?
    – nohillside
    Commented Apr 5, 2023 at 8:43
  • 1
    Does this answer your question? Why does `arch` output `i386`?
    – Allan
    Commented Apr 5, 2023 at 14:08

2 Answers 2

1

It looks like the default login shell was /usr/local/bin/bash.

$ echo $SHELL
/usr/local/bin/bash
✔ ~ 
$ arch
i386

The list of available shells can be checked using:

$ cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/usr/local/bin/bash
/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh

Changed the Login shell to /bin/bash:

$ chsh -s /bin/bash
Changing shell for xxxxx.
Password for xxxxx: 
✔

Switching to /bin/bash as above and relaunching Terminal solved the problem

$ arch
arm64
✔

It is also possible to set the Login shell on the Preferences of the Terminal.app, choosing Shells open with: Command and adding here the desired shell.

3
0

I had precisely the same problem. The wrong default arch (i386) instead of the native (arm64) was causing my brew migration to native arm64 on an M1 MBP to fail with many messages like:

Error: Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)!
To rerun under ARM use:
    arch -arm64 brew install ...
To install under x86_64, install homebrew into /usr/local.
Installing pcre has failed!

So, I just changed my shell to /bin/bash, and then finished my homebrew migration. Once I installed the homebrew arm64 version of bash, I updated my shell to /opt/homebrew/bin/bash.

Problem solved.

You must log in to answer this question.

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