How to judge whether the current computer uses the apple M1 chip in the terminal?

Viewed 828

How to judge whether the current computer uses the M1 chip in the terminal?

And then I plan to execute different compilation scripts for different chips

1 Answers

You can get the CPU information in terminal with

sysctl -n machdep.cpu.brand_string

Edit: The output is Apple processor or Apple M1 / Apple M1 Pro on an Apple Silicon machine.

Related