When I type uname -a, it gives the following output.
Linux mars 2.6.9-67.0.15.ELsmp #1 SMP Tue Apr 22 13:50:33 EDT 2008 i686 i686 i386 GNU/Linux
How can I know from this that the given OS is 32 bit or 64 bit?
When I type uname -a, it gives the following output.
Linux mars 2.6.9-67.0.15.ELsmp #1 SMP Tue Apr 22 13:50:33 EDT 2008 i686 i686 i386 GNU/Linux
How can I know from this that the given OS is 32 bit or 64 bit?
If you were running a 64 bit platform you would see x86_64 or something very similar in the output from uname -a
To get your specific machine hardware name run
uname -m
You can also call
getconf LONG_BIT
which returns either 32 or 64
Did you try uname -m ?
It seems like the uname -m actually gives
Otherwise, not for the Linux kernel, but for the CPU, you type:
cat /proc/cpuinfo
or:
grep flags /proc/cpuinfo
Under "flags" parameter, you will see various values. Among them, one is named "tm(transparent mode)" or "rm(real mode)" or "lm(long mode)"
Note: you can have a 64-bit CPU with a 32-bit kernel installed"
That system is 32bit. iX86 in uname means it is a 32bit arch, if it was 64 bit it would return
Linux mars 2.6.9-67.0.15.ELsmp #1 SMP Tue Apr 22 13:50:33 EDT 2008 x86_64 i686 x86_64 x86_64 GNU/Linux
If you have a 64 bits OS, instead of i686, you have x86_64
or ia64
in the output of uname -a
In you do not have any of these 2 strings, you have a 32 bits OS (note that this does not mean that your CPU is not 64 bits)