Linux what cpu architecture

How to find the processor / chip architecture on Linux

uname -m gives you back i686 or x86_64 depending on 32-bit or 64-bit Intel CPU, but I don’t have access to machines on non-Intel architectures.

x86_64 or amd64 would be 64-bit. i386, i486, i586, and i686 are 32-bit. Keep in mind however that those values are merely a reflection of the target the kernel was compiled for and not necessarily what the CPU is capable of.

6 Answers 6

To display kernel architecture: uname -p

To display extended CPU details: cat /proc/cpuinfo

uname (with any options) will only show the kernel architecture, not the physical CPU architecture. In other words, it will show which CPU the kernel was compiled for. But that could show i386 even when running on a x86_64 CPU.

which returns output like this:

Architecture: i686 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 2 On-line CPU(s) list: 0,1 Thread(s) per core: 1 Core(s) per socket: 2 Socket(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 23 Stepping: 6 CPU MHz: 2670.000 BogoMIPS: 5320.13 L1d cache: 32K L1i cache: 32K L2 cache: 3072K 

To only get the architecture:

I’m surprised no one suggested uname -m . On my laptop, this gives armv7l , while uname -a gives me a monstrous two lines of text.

A concise command producing information about the current machine is hostnamectl . Example output:

Static hostname: xxxx Icon name: computer-laptop Chassis: laptop Boot ID: b3a1f952c514411c8c4xxxxxxxxxxxx Operating System: Ubuntu 14.04.3 LTS Kernel: Linux 3.19.0-43-generic Architecture: x86_64 

It gives you the most basic information about your machine. Other commands like uname , lsb_release , or lscpu return more specific information.

Источник

How to Find Out CPU Architecture (32 bit or 64 bit) in Linux

Some times it is very important to know whether the Server’s CPU Architecture is of 32-bit or 64-bit because 64-bit applications can not run on 32-bit system, whereas 32-bit application can easily be run on 64-bit system.

One can determine Linux System CPU architecture using the file /proc/cpuinfo , example is shown below :

[[email protected] ~]# cat /proc/cpuinfo | grep -i flags flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc up rep_good pni monitor ssse3 lahf_lm

In the above output, we could either see lm , tm or rm , these flags indicates about CPU architecture.

So as per above output, Server’s CPU is of 64 bit.

Apart from /proc/cpuinfo, we can also check the CPU architecture using lscpu command, in the output look for CPU op-modes(s). We can also use lshw command to view CPU architecture, execute following command and in the output look for width parameter,

Читайте также:  Блютуз на линукс как включить

Find CPU architecture using dmidecode command

Run the beneath dmidecode command and in the output look for “Characteristics:” parameter which will show whether CPU architecture is 64-bit or 32-bit

Determine whether a given Linux is 32 bit or 64 bit?

We can find the whether installed Linux system on which we are working is 32-bit or 64-bit using commands like lscpu, ‘uname -m‘ and getconf

Output will be something like below and look for Architecture, as per output below 64-bit Linux is installed on the system,

Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 37
Stepping: 5
CPU MHz: 933.000
BogoMIPS: 4787.82
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 3072K
NUMA node0 CPU(s): 0-3

x86_64 –> 64-bit kernel
i686 –> 32-bit kernel

Above Command will display whether Kernel Version is 32 bit or 64 bit

with help of getconf command we can also find whether the installed Linux is of 32-bit or 64-bit

Источник

CPU Architectures¶

These books provide programming details about architecture-specific implementation.

  • ARC architecture
    • Linux kernel for ARC processors
    • Feature status on arc architecture
    • ARM Linux 2.6 and upper
    • Booting ARM Linux
    • Cluster-wide Power-up/power-down race avoidance algorithm
    • Interface for registering and calling firmware-specific operations for ARM
    • Interrupts
    • Kernel mode NEON
    • Kernel-provided User Helpers
    • Kernel Memory Layout on ARM Linux
    • Memory alignment
    • ARM TCM (Tightly-Coupled Memory) handling in Linux
    • Kernel initialisation parameters on ARM Linux
    • Software emulation of deprecated SWP instruction (CONFIG_SWP_EMULATE)
    • The Unified Extensible Firmware Interface (UEFI)
    • vlocks for Bare-Metal Mutual Exclusion
    • Porting
    • Feature status on arm architecture
    • SoC-specific documents
    • ACPI Tables
    • Activity Monitors Unit (AMU) extension in AArch64 Linux
    • ACPI on Arm systems
    • Asymmetric 32-bit SoCs
    • Booting AArch64 Linux
    • ARM64 CPU Feature Registers
    • ARM64 ELF hwcaps
    • HugeTLBpage on ARM64
    • crashkernel memory reservation on arm64
    • Legacy instructions
    • Memory Layout on AArch64 Linux
    • Memory Tagging Extension (MTE) in AArch64 Linux
    • Perf
    • Pointer authentication in AArch64 Linux
    • Kernel page table dump
    • Silicon Errata and Software Workarounds
    • Scalable Matrix Extension support for AArch64 Linux
    • Scalable Vector Extension support for AArch64 Linux
    • AArch64 TAGGED ADDRESS ABI
    • Tagged virtual addresses in AArch64 Linux
    • Feature status on arm64 architecture
    • Linux kernel release for the IA-64 Platform
    • Memory Attribute Aliasing on IA-64
    • EFI Real Time Clock driver
    • IPF Machine Check (MC) error inject tool
    • Light-weight System Calls for IA-64
    • IRQ affinity on IA64 platforms
    • An ad-hoc collection of notes on IA64 MCA and INIT processing
    • Serial Devices
    • Feature status on ia64 architecture
    • 1. Introduction to LoongArch
    • 2. Booting Linux/LoongArch
    • 3. IRQ chip model (hierarchy) of LoongArch
    • 4. Feature status on loongarch architecture
    • Command Line Options for Linux/m68k
    • Amiga Buddha and Catweasel IDE Driver
    • Feature status on m68k architecture
    • 1. BMIPS DeviceTree Booting
    • 2. Ingenic JZ47xx SoCs Timer/Counter Unit hardware
    • 3. Feature status on mips architecture
    • 1. Linux on the Nios II architecture
    • 2. Feature status on nios2 architecture
    • OpenRISC Linux
    • TODO
    • Feature status on openrisc architecture
    • PA-RISC Debugging
    • Register Usage for Linux/PA-RISC
    • Feature status on parisc architecture
    • NUMA resource associativity
    • DeviceTree Booting
    • The PowerPC boot wrapper
    • CPU Families
    • CPU Features
    • Coherent Accelerator Interface (CXL)
    • Coherent Accelerator (CXL) Flash
    • DAWR issues on POWER9
    • DEXCR (Dynamic Execution Control Register)
    • DSCR (Data Stream Control Register)
    • PCI Bus EEH Error Recovery
    • POWERPC ELF HWCAPs
    • ELF Note PowerPC Namespace
    • Firmware-Assisted Dump
    • HVCS IBM «Hypervisor Virtual Console Server» Installation Guide
    • IMC (In-Memory Collection Counters)
    • CPU to ISA Version Mapping
    • KASLR for Freescale BookE32
    • Linux 2.6.x on MPC52xx family
    • Hypercall Op-codes (hcalls)
    • PCI Express I/O Virtualization Resource on Powerenv
    • PMU Event Based Branches
    • Ptrace
    • Freescale QUICC Engine Firmware Uploading
    • Power Architecture 64-bit Linux system call ABI
    • Transactional Memory support
    • Protected Execution Facility
    • Virtual Accelerator Switchboard (VAS) userspace API
    • VCPU Dispatch Statistics
    • Feature status on powerpc architecture
    • ACPI on RISC-V
    • Boot image header in RISC-V Linux
    • Virtual Memory Layout on RISC-V Linux
    • RISC-V Hardware Probing Interface
    • arch/riscv maintenance guidelines for developers
    • RISC-V Linux User ABI
    • Vector Extension Support for RISC-V Linux
    • Feature status on riscv architecture
    • Linux for S/390 and zSeries
    • IBM 3270 Display System support
    • S/390 driver model interfaces
    • Linux API for read access to z/VM Monitor Records
    • IBM s390 QDIO Ethernet Driver
    • S390 Debug Feature
    • Adjunct Processor (AP) facility
    • VFIO AP Locks Overview
    • vfio-ccw: the basic infrastructure
    • The s390 SCSI dump tool (zfcpdump)
    • S/390 common I/O-Layer
    • S/390 PCI
    • ibm 3270 changelog
    • ibm 3270 config3270.sh
    • Feature status on s390 architecture
    • DeviceTree Booting
    • Adding a new board to LinuxSH
    • Notes on register bank usage in the kernel
    • Feature status on sh architecture
    • Memory Management
    • Machine Specific Interfaces
    • Busses
    • Steps for sending ‘break’ on sunhv console
    • Application Data Integrity (ADI)
    • Oracle Data Analytics Accelerator (DAX)
    • Feature status on sparc architecture
    • 1. The Linux/x86 Boot Protocol
    • 2. DeviceTree Booting
    • 3. x86 Feature Flags
    • 4. x86 Topology
    • 5. Kernel level exception handling
    • 6. Kernel Stacks
    • 7. Kernel Entries
    • 8. Early Printk
    • 9. ORC unwinder
    • 10. Zero Page
    • 11. The TLB
    • 12. MTRR (Memory Type Range Register) control
    • 13. PAT (Page Attribute Table)
    • 14. Hardware-Feedback Interface for scheduling on Intel Hardware
    • 15. x86 IOMMU Support
    • 16. Intel(R) TXT Overview
    • 17. AMD Memory Encryption
    • 18. AMD HSMP interface
    • 19. Intel Trust Domain Extensions (TDX)
    • 20. Page Table Isolation (PTI)
    • 21. Microarchitectural Data Sampling (MDS) mitigation
    • 22. The Linux Microcode Loader
    • 23. User Interface for Resource Control feature
    • 24. TSX Async Abort (TAA) mitigation
    • 25. Bus lock detection and handling
    • 26. USB Legacy support
    • 27. i386 Support
    • 28. x86_64 Support
    • 29. In-Field Scan
    • 30. Shared Virtual Addressing (SVA) with ENQCMD
    • 31. Software Guard eXtensions (SGX)
    • 32. Feature status on x86 architecture
    • 33. x86-specific ELF Auxiliary Vectors
    • 34. Using XSTATE features in user space applications
    • Atomic Operation Control (ATOMCTL) Register
    • Passing boot parameters to the kernel
    • MMUv3 initialization sequence
    • Feature status on xtensa architecture

    Источник

    How to Get CPU Architecture in Linux System [64/32 Bit]

    As a system administrator and IT professional, it is very important to know whether the system’s CPU architecture is 32 bit or 64 bit.

    When it comes to third-party applications you need to be aware of your system architecture because 64-bit applications can not be run in a 32-bit system. Whereas we can easily run 32-bit applications in a 64-bit system.

    This guide shows how to check CPU architecture on a Linux machine.

    1. Using lscpu command

    Lscpu is a handy command to get CPU architecture information in Linux.

    Access your terminal and type the following command:

    This command lists the cpu information in your terminal as:clear

    Using lscpu command to get cpu information

    The Architecture field shows what type of CPU you have. Here x86_64 denotes 64 bit.

    The CPU operation mode is 32-bit and 64-bit. That means your CPU supports both 32 and 64-bit instructions.

    Note: Most common processor architectures used are : 64-bit (x86-64, IA64, and AMD64) and 32-bit (x86). i686 is part x86 family which is 32 bit.

    2. Using uname command

    Uname provides your Linux system information and kernel version. Run the following command to get CPU information using uname command.

    In this example Linux system is running in 64 bit CPU.

    3. Using lshw Command

    Lshw is a simple command to list hardware information of your Linux system. You can get Linux CPU information by running the following command:

    You will get output in your terminal as:

    Using lshw command to get cpu information

    You can further filter using grep command, type:

    sudo lshw -c cpu | grep width or sudo lshw -c cpu | grep bits

    4. Get from /proc/cpuinfo

    In Linux, /proc/cpuinfo stores CPU information in a plain text file. In your Linux terminal run the following grep command.

    sudo grep -o -w 'lm' /proc/cpuinfo | sort -u

    You will get following output in your terminal:

    The lm flag denotes long mode CPU which is 64 bit. For more CPU information you can execute the following command:

    Conclusion

    In this guide, you have learned how to find if you are using a 32/64 bit CPU in your Linux machine using different command-line utilities.

    If this resource helped you, let us know your care by a Thanks Tweet. Tweet a thanks

    Like

    About The Author

    Bobbin Zachariah

    Bobbin Zachariah

    Bobbin is a seasoned IT professional with over two decades of experience. He has excelled in roles such as a computer science instructor, Linux system engineer, and senior analyst. Currently, he thrives in DevOps environments, focusing on optimizing efficiency and delivery in AWS Cloud infrastructure. Bobbin holds certifications in RHEL, CCNA, and MCP, along with a Master’s degree in computer science. In his free time, he enjoys playing cricket, blogging, and immersing himself in the world of music.

    Источник

Оцените статью
Adblock
detector