What is the arch command in Linux?

Overview

The arch command in Linux is used to get the current computer architecture.

The different architectures that the arch command can detect are as follows:

  1. i386
  2. i486
  3. i586
  4. i686
  5. x86_64
  6. alpha
  7. sparc
  8. arm
  9. m68k
  10. mips
  11. ppc

Syntax

arch [OPTIONS]

The available options are as follows:

Option Description
--version Display the current version of the command
--help Display the description and the options of the command

Code

Example 1

The following code prints the current system architecture.

arch

Example 2

The following code prints the version of the arch command in use.

arch --version
New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources