Search code examples
bashmacosapple-silicon

CLI command to determine if the Mac machine is running on Apple Silicon on Intel?


On a M1 Mac Mini,

If I do uname -i, I get:

uname: illegal option -- -
usage: uname [-amnprsv]

If I do uname -m, I get:

x86_64

If I do uname -a, I get:

Darwin bevrymemacmini.local 20.5.0 Darwin Kernel Version 20.5.0: Sat May  8 05:10:31 PDT 2021; root:xnu-7195.121.3~9/RELEASE_ARM64_T8101 x86_64

Only in uname -a do I get the information that it is running on Apple Silicon via the ARM64 part.

Is there a better way of determining which architecture I am running on Mac machines?


Solution

  • use this command

    “sysctl -a | grep machdep.cpu” to get get a detailed dump on the cpu.

    The command “sysctl -n machdep.cpu.brand_string” will just return the Intel model number and speed.

    ouput from my mac using intel

    machdep.cpu.xsave.extended_state: xxxxxxxxxxxxxxxx
    machdep.cpu.xsave.extended_state1: xxxxxxxxxxxxx
    machdep.cpu.thermal.ACNT_MCNT: 1
    machdep.cpu.thermal.core_power_limits: 1
    machdep.cpu.thermal.dynamic_acceleration: 1
    machdep.cpu.thermal.energy_policy: 1
    machdep.cpu.thermal.fine_grain_clock_mod: 1
    machdep.cpu.thermal.hardware_feedback: 0
    machdep.cpu.thermal.invariant_APIC_timer: 1
    machdep.cpu.thermal.package_thermal_intr: 1
    machdep.cpu.thermal.sensor: 1
    machdep.cpu.thermal.thresholds: 2
    machdep.cpu.mwait.extensions: 3
    machdep.cpu.mwait.linesize_max: 64
    machdep.cpu.mwait.linesize_min: 64
    machdep.cpu.mwait.sub_Cstates: 286396448
    machdep.cpu.cache.L2_associativity: 8
    machdep.cpu.cache.linesize: 64
    machdep.cpu.cache.size: 256
    machdep.cpu.arch_perf.events: 0
    machdep.cpu.arch_perf.events_number: 8
    machdep.cpu.arch_perf.fixed_number: 4
    machdep.cpu.arch_perf.fixed_width: 48
    machdep.cpu.arch_perf.number: 8
    machdep.cpu.arch_perf.version: 5
    machdep.cpu.arch_perf.width: 48
    machdep.cpu.address_bits.physical: 39
    machdep.cpu.address_bits.virtual: 48
    machdep.cpu.tsc_ccc.denominator: 2
    machdep.cpu.tsc_ccc.numerator: 104
    machdep.cpu.brand: 0
    machdep.cpu.brand_string: Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    machdep.cpu.core_count: 4
    machdep.cpu.cores_per_package: 8
    machdep.cpu.extfamily: 0
    machdep.cpu.extfeature_bits: xxxxxxxxxxxxxxxxxx
    machdep.cpu.extfeatures: SYSCALL XD 1GBPAGE EM64T LAHF LZCNT PREFETCHW RDTSCP TSCI
    machdep.cpu.extmodel: 7
    machdep.cpu.family: 6
    machdep.cpu.feature_bits: xxxxxxxxxxxxxxxxxxxxxx
    machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C
    machdep.cpu.leaf7_feature_bits: xxxxxxxxxxxxxxxxxxxxxx
    machdep.cpu.leaf7_feature_bits_edx: xxxxxxxxxxxxxxx
    machdep.cpu.leaf7_features: RDWRFSGS TSC_THREAD_OFFSET SGX BMI1 AVX2 FDPEO SMEP BMI2 ERMS INVPCID FPU_CSDS AVX512F AVX512DQ RDSEED ADX SMAP AVX512IFMA CLFSOPT IPT AVX512CD SHA AVX512BW AVX512VL AVX512VBMI UMIP PKU GFNI VAES VPCLMULQDQ AVX512VNNI AVX512BITALG AVX512VPOPCNTDQ RDPID SGXLC FSREPMOV MDCLEAR IBRS STIBP L1DF ACAPMSR SSBD
    machdep.cpu.logical_per_package: 16
    machdep.cpu.max_basic: 27
    machdep.cpu.max_ext: xxxxxxxxxxxx
    machdep.cpu.microcode_version: 166
    machdep.cpu.model: 126
    machdep.cpu.processor_flag: 7
    machdep.cpu.signature: xxxxxxxxx
    machdep.cpu.stepping: 5
    machdep.cpu.thread_count: 8
    machdep.cpu.vendor: GenuineIntel