Skip to content

Instantly share code, notes, and snippets.

@todgru
Last active February 6, 2023 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todgru/c1f8246ed3535cddfad68eeb306210d5 to your computer and use it in GitHub Desktop.
Save todgru/c1f8246ed3535cddfad68eeb306210d5 to your computer and use it in GitHub Desktop.
shell determine architecture osx mac

source: stack exchange

% arch
arm64

% uname -m
arm64

% uname -a
Darwin my-mbp.lan 22.3.0 Darwin Kernel Version 22.3.0: Thu Jan  5 20:48:54 PST 2023; root:xnu-8792.81.2~2/RELEASE_ARM64_T6000 arm64

Man page notes:

uname – display information about the system

The uname command writes the name of the operating system implementation to standard output. When options are specified, strings representing one or more system characteristics are written to standard output.

-a Behave as though the options -m, -n, -r, -s, and -v were specified.

-m Write the type of the current hardware platform to standard output. (make(1) uses it to set the MACHINE variable.)

arch – print architecture type or run selected architecture of a universal binary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment