On Unix and Linux systems, you can use the arch
command to
display the application architecture of the host system. Systems can be
broadly classified by their architectures, which define what executables
will run on which machines. A distinction can be made between kernel
architecture and application architecture (or, commonly, just
"architecture"). Machines that run different kernels due to underlying
hardware differences may be able to run the same application program.
On current Linux systems, arch prints things such as "i386", "i486",
"i586", "alpha", "sparc", "arm", "m68k", "mips", "ppc" and is equivalent
to the uname -m
command.
Due to extensive historical use of this command without any options,
all SunOS 5.x SPARC based systems will return "sun4" as their application
architecture. Sun discourages the use of this command and recommends the
use of the uname
command instead.
The Solaris version accepts a -k
option, which will display
the kernel architecture, such as sun4m, sun4c, etc. This defines which
specific SunOS kernel will run on the machine and has implications only
for programs that depend on the kernel explicitly.
Examples:
RedHat Linux 9 system with a 2.4.20-28.9 kernel
$ arch
i686
Sun Ultra 5 running Solaris 5.7
$ arch
sun4
$ arch -k
sun4u