Evaggelos Balaskas - System Engineer

The sky above the port was the color of television, tuned to a dead channel

Blog
Posts
Wiki
About
Contact
rss.png twitter linkedin github gitlab profile for ebal on Stack Exchange

hackerspace »
  -  
« ebalaskas: The Computer Language Benchmarks...
Sep
10
2012
How to determine if you are running a 32bit or a 64bit distro
Posted by ebal at 08:00:37 in blog, planet_Sysadmin

This is one of the most idiotic questions i am reading all the time on the web (linux related).

So lets take the most frequent answer on this:


file /bin/ls

If the result is 32 then you are using a 32bit distro.
If the result is 64 then you are using a 64bit distro.

SO ?

I ‘ve already knew that cause i installed a 32bit linux on my machine !
It’s obvious !

When people asking this question at 99,9999% of the times, they want to know if their machine has 64bit capabilities.
And at that point you have to give them a hint, that they have to look on their CPU flags.

I’ve comment on a blog (ubuntu related) that this isnt the right way cause you can install a 32bit distro on a 64bit CPU and if you are using file linux command you cant understand if your CPU is 64bit !

They immediately removed my comment (wat?)

My comment had an extra tip :

If the below command has output


grep ^flags /proc/cpuinfo | grep ' lm '

or in one line:


grep -E '^flags.* lm .*'  /proc/cpuinfo

then your cpu has Long Mode (x86-64) capabilities.

The definition of flags are in cpufeature.h
and can be found online here:

cpufeature

One other way is to search online the model name of your cpu. The model name can be also located in /proc/cpuinfo

  • 2 comments
hackerspace »
  -  
« ebalaskas: The Computer Language Benchmarks...

Search

Admin area

  • Login

Categories

  • blog
  • wiki
  • pirsynd
  • midori
  • books
  • archlinux
  • movies
  • xfce
  • code
  • beer
  • planet_ellak
  • planet_Sysadmin
  • microblogging
  • UH572
  • KoboGlo
  • planet_fsfe

Archives

  • 2025
    • April
    • March
    • February
  • 2024
    • November
    • October
    • August
    • April
    • March
  • 2023
    • May
    • April
  • 2022
    • November
    • October
    • August
    • February
  • 2021
    • November
    • July
    • June
    • May
    • April
    • March
    • February
  • 2020
    • December
    • November
    • September
    • August
    • June
    • May
    • April
    • March
    • January
  • 2019
    • December
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2018
    • December
    • November
    • October
    • September
    • August
    • June
    • May
    • April
    • March
    • February
    • January
  • 2017
    • December
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2016
    • December
    • November
    • October
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2015
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • January
  • 2014
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2013
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2012
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2011
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2010
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2009
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
Ευάγγελος.Μπαλάσκας.gr

License GNU FDL 1.3 - CC BY-SA 3.0