How to find out in linux if my mahine is 64bit or 32bit ?
To check the software, any one of the following commands will do:
- uname -a
- uname -m (more specific to the data you need)
- arch (equivalent to 2)
- file /sbin/init
- getconf LONG_BIT
To check the hardware, one of the following can do the trick:
-
cat /proc/cpuinfothe output is longwhat we seek is the flags part, in which we seek for the lm flag.lm=long mode(long mode - https://en.wikipedia.org/wiki/Long_mode)
-
sudo dmidecode -t processorthe output is not too short;search for the characteristics; you should see "64-bit capable"btw, you can also use dmidecode to get the "Version" and search the specifications on the internet
pay attention:
over the years, I ran into some reports and claims on the net that neither of the commands to find out about the hardware were accurate (in some hardware cases), and that therefore,
if you want to be 100% sure that the hardware is capable of running a 64 bit linux software, you need to run a boot cd/dvd with a 64bit linux.
personally, i haven't encountered a case in which the dmidecode command failed me.
No comments:
Post a Comment