Date created: Monday, November 28, 2011 2:28:33 PM. Last modified: Thursday, June 20, 2024 9:20:29 AM

32bit or 64bit

'lscpu' command:

Example 64-bit x86 output:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             2
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 23
Stepping:              6
CPU MHz:               1995.232
BogoMIPS:              3990.09
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              6144K
NUMA node0 CPU(s):     0-7

Example 64bit ARM (Odroid-N2) output:

$ lscpu
Architecture:        aarch64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              6
On-line CPU(s) list: 0-5
Thread(s) per core:  1
Core(s) per socket:  3
Socket(s):           2
Vendor ID:           ARM
Model:               4
Model name:          Cortex-A53
Stepping:            r0p4
CPU max MHz:         1896.0000
CPU min MHz:         100.0000
BogoMIPS:            48.00
Flags:               fp asimd evtstrm aes pmull sha1 sha2 crc32

Example 32bit ARM (Rasp Pi 3B) output:

lscpu
Architecture:        armv7l
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per socket:  4
Socket(s):           1
Vendor ID:           ARM
Model:               4
Model name:          Cortex-A53
Stepping:            r0p4
CPU max MHz:         1400.0000
CPU min MHz:         600.0000
BogoMIPS:            38.40
Flags:               half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32

 

'file' command:

file /sbin/init
file /lib/systemd/system

Example 64bit x86 output:

$file /sbin/init
/sbin/init: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=36a7688cfae6a4c6acd522df1ef1eb9dcdbdc679, stripped

Example 32bit x86 output:

$file /sbin/init
/sbin/init: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped

Example 32bit ARM (Rasp Pi 3B) output:

$ file /lib/systemd/systemd
/lib/systemd/systemd: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=125fb1f7bd746a32b6d763ad9a91d30ddc03a96c, stripped

 

'readelf' command

readelf -h /sbin/init

Example 64bit x86 output:

$readelf -h /sbin/init
ELF Header:
  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF64
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           Advanced Micro Devices X86-64
  Version:                           0x1
  Entry point address:               0x4024a0
  Start of program headers:          64 (bytes into file)
  Start of section headers:          35200 (bytes into file)
  Flags:                             0x0
  Size of this header:               64 (bytes)
  Size of program headers:           56 (bytes)
  Number of program headers:         8
  Size of section headers:           64 (bytes)
  Number of section headers:         28
  Section header string table index: 27

Example 32bit x86 output:

ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              DYN (Shared object file)
  Machine:                           Intel 80386
  Version:                           0x1
  Entry point address:               0x4000
  Start of program headers:          52 (bytes into file)
  Start of section headers:          107084 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         8
  Size of section headers:           40 (bytes)
  Number of section headers:         28
  Section header string table index: 27

 

'uname' command

uname -a

Example 64bit x86 output:

$uname -a
Linux chive 3.2.0-6-amd64 #1 SMP Debian 3.2.102-1 x86_64 GNU/Linux

Example 32bit x86 output:

$uname -a
Linux bensley-n2 2.6.32-35-generic #78-Ubuntu SMP Tue Oct 11 15:27:15 UTC 2011 i686 GNU/Linux

Example 32bit x86 output:

$ uname -m
i686

 

'getconf' command

getconf LONG_BIT

Example 64 bit output:

$getconf LONG_BIT
64

Example 32 bit output:

32

 

Long Mode support

egrep -c ' lm ' /proc/cpuinfo

Current distro:

cat /etc/issue
cat /etc/redhat-release
lsb_release -a

 

'dpkg' command:

dpkg --print-architecture

Example 64bit x86 output:

$dpkg --print-architecture
amd64

Example 64-bit ARM (ODroid-N2) output:

$ dpkg --print-architecture
arm64

Example 32-bit ARM (Raspberry Pi 3B) output:

$ dpkg --print-architecture
armhf

 


Previous page: VLAN Interfaces
Next page: Autostarting Applications