5

On my computer, uname -m prints x86_64 as output. What is the list of possible values that this command could output? I intend to use this command from a dynamic runtime to check the CPU architecture.

1

1 Answer 1

5

I’m not aware of a definitive list of possible values; however there is a list of values for all Debian architectures, which gives good coverage of the possible values on Linux: aarch64, alpha, arc, arm, i?86, ia64, m68k, mips, mips64, parisc, ppc, ppc64, ppc64le, ppcle, riscv64, s390, s390x, sh, sparc, sparc64, x86_64 (there are other possible values, but they’re not supported by Debian; I’m ignoring the Hurd here). Another source of information is the $UNAME_MACHINE matches in config.guess; this isn’t limited to Linux.

Note that uname -m reflects the current process’ personality, and the running kernel’s architecture; not necessarily the CPU architecture. See Meaning of hardware platform in uname command ouput for details.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.