arch Command
Beginner System Information man(1)Print machine hardware architecture
👁 11 views
📅 Updated: Mar 15, 2026
SYNTAX
arch
What Does arch Do?
arch prints the machine hardware architecture, equivalent to uname -m. It outputs a string like x86_64, aarch64, armv7l, or i686 identifying the CPU architecture.
arch is a simple utility primarily used in scripts to determine which architecture-specific binaries or packages to install. It is less common than uname -m but serves the same purpose.
The most common architectures are x86_64 (64-bit Intel/AMD), aarch64 (64-bit ARM), and armv7l (32-bit ARM).
arch is a simple utility primarily used in scripts to determine which architecture-specific binaries or packages to install. It is less common than uname -m but serves the same purpose.
The most common architectures are x86_64 (64-bit Intel/AMD), aarch64 (64-bit ARM), and armv7l (32-bit ARM).
Options & Flags
| Option | Description | Example |
|---|---|---|
| (no options) | Print machine architecture | arch |
Practical Examples
#1 Show architecture
Displays the CPU architecture.
$ arch
Output:
x86_64
#2 Conditional download
Downloads architecture-specific binary.
$ [[ $(arch) == "x86_64" ]] && wget amd64.tar.gz || wget arm64.tar.gz#3 Compare with uname
Both commands return the same value.
$ echo "arch: $(arch), uname -m: $(uname -m)"
Output:
arch: x86_64, uname -m: x86_64
Tips & Best Practices
Same as uname -m: arch is equivalent to uname -m. Use whichever is available — uname is more universally installed.
Architecture names: x86_64 = 64-bit Intel/AMD (also called amd64). aarch64 = 64-bit ARM (also called arm64). i686 = 32-bit Intel.
Frequently Asked Questions
How do I check if my system is 64-bit?
Run arch or uname -m. x86_64 means 64-bit Intel/AMD, aarch64 means 64-bit ARM.
What is the difference between arch and uname -m?
They return the same value. uname -m is more commonly used and more widely available.
Related Commands
More System Information Commands
Master Linux with Professional eBooks
Curated IT eBooks covering Linux, DevOps, Cloud, and more
Browse Books →