6

When I run $ arch on my 10.9 2012 MacBook Pro, I get the output

i386

The manpage for arch says that

the arch command is 2-way universal, 32-bit only

However, $ file "$(which arch)" gives

/usr/bin/arch: Mach-O universal binary with 2 architectures
/usr/bin/arch (for architecture x86_64):        Mach-O 64-bit executable x86_64
/usr/bin/arch (for architecture i386):  Mach-O executable i386

OTOH, python2.7 is running as a 64-bit executable:

$ /usr/bin/python2.7 -c 'import sys; print "%x" % sys.maxint'
7fffffffffffffff

Also, the kernel is apparently 64-bit:

$ file /mach_kernel 
/mach_kernel: Mach-O 64-bit executable x86_64

uname agrees:

$ uname -m
x86_64

..or does it?

$ uname -p
i386
5

Here you go:

uname -p print the machine processor architecture name.

uname -m print the machine hardware name.

The arch command with no arguments, displays the machine's architecture type.

Ultimately I suspect this is the answer you want: https://stackoverflow.com/questions/12763296/os-x-arch-command-incorrect

For further confusion, run:

$arch
i386
$machine  
i486
$uname -m
x86_64
$uname -p
i386
  • Okay, so arch runs as 32- or 64-bit, but only reports whether the architecture is PPC or Intel[-derived], and reports Intel using the i386 label rather than intel. I guess that's what "2-way universal, 32-bit only" means. – intuited Aug 2 '14 at 5:13

You must log in to answer this question.

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