2
tomasz@tomasz-lenovo-ideapad-Y530:~$ lscpu
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:               2000.000
BogoMIPS:              4000.12
Cache L1d:             32K
Cache L1i:             32K
Cache L2:              3072K

I can see that my architecture is 32-bit (i686). But CPU op-mode(s) are 32-bit and 64-bit. The question is: how come? How is it handled that a 32-bit processor performs 64-bit operations? I guess it's a lot slower than native 32-bit operations. Is it built-in processor functionality (to emulate being 64-bit) or is it software dependent? When does it make sense for a 32-bit processor to run 64-bit operations?

Braiam
  • 67,791
  • 32
  • 179
  • 269
ducin
  • 205
  • 1
  • 2
  • 7

3 Answers3

2

Use the lscpu command to check if your computer supports multiple CPU operation modes (usually either 32-bit or 64-bit mode).

From the terminal run:

lscpu | grep op-mode

Example output on a 64-bit processor:

user@computer1:~$ lscpu | grep op-mode
CPU op-mode(s): 32-bit, 64-bit

Example output on a 32-bit processor:

user@computer2$ lscpu | grep op-mode
CPU op-mode(s): 32-bit

Either Ubuntu 32-bit or Ubuntu 64-bit can be installed on the computer in the first example. Only Ubuntu 32-bit can be installed on the computer in the second example. Either Ubuntu 32-bit or Ubuntu 64-bit can be installed on the computer in the question.

A 32-bit application will run on either a 32-bit or a 64-bit operating system. A 64-bit OS will only run on a 64-bit processor. A 64-bit application will run on a 64-bit OS, and by doing some heavy lifting it may also be possible to run some 64-bit applications on a 32-bit OS. By "heavy lifting" I mean that you will need to install the 64-bit kernel1 and do other unpleasant things as well, depending on what 64-bit application(s) you are trying to install. Installing a 32-bit application in a 64-bit OS is a breeze by contrast.

enter image description here ⠀Summer breeze

1https://unix.stackexchange.com/questions/134391/64-bit-kernel-but-all-32-bit-elf-executable-running-processes-how-is-this/134394#134394

karel
  • 114,770
1

lscpu is telling you that your architecture is i686 (an Intel 32-bit CPU), and that your CPU supports both 32-bit and 64-bit operating modes. You won't be able to install x64 built applications since they're built specifically for x64 architectures.

Your particular CPU can handle either the i386 or i686 built packages. There are a number of ways to verify your architecture & OS preferences.

Try uname -m. It will show i686, that means your CPU is 32 bit support.

saiarcot895
  • 10,757
  • 2
  • 36
  • 39
nux
  • 38,017
  • 35
  • 118
  • 131
0

It means:

Architecture: i686              # <-- your kernel is 32 bit (you are using 32 bit Ubuntu)
CPU op-mode(s): 32-bit, 64-bit  # <-- your cpu can handle 32 or 64 bit instructions
αғsнιη
  • 35,660