Hi Friends here we will check how to identify the Linux kernel architecture, i.e. it is 32 bit or 64 bit version.
We will show you several different ways of checking whether your system is 32-bit or 64-bit.
The first two methods involves the “uname” command, which prints system
information to the screen. If you want more information than just
whether your system is 32-bit or 64-bit, type the following command and
press Enter.
To use the “uname” command to only find out whether your system is 32-bit or 64-bit, type the following command and press Enter.
The simplest way is to run "getconf LONG_BIT" which will output 64 or 32 depending on whether it is 32 or 64 bits.
For more flag related info please check, What do the flags in /proc/cpuinfo mean?
We will show you several different ways of checking whether your system is 32-bit or 64-bit.
Uname
uname –aThe following information is printed to the screen in the following order: kernel name, network node hostname, kernel release, kernel version, machine hardware name, processor type, hardware platform, operating system.
To use the “uname” command to only find out whether your system is 32-bit or 64-bit, type the following command and press Enter.
uname –mThis displays only the machine hardware name and indicates, as above, whether your system is 32-bit (“i686” or “i386”) or 64-bit (“x86_64”).
Arch
The “arch” command is similar to the “uname -m” command and prints to
the screen whether your system is 32-bit (“i686”) or 64-bit (“x86_64”).
Type the following command and press Enter.
arch
Getconf
To determine if the hardware is capable of running a 64-bit kernel
x86_64 GNU/Linux indicates that you've a 64bit Linux kernel running. If you use see i386/i486/i586/i686 it is a 32 bit kernel.
Look for the following in the output of command "grep flags /proc/cpuinfo"
grep flags /proc/cpuinfo
lmflag means Long mode cpu - 64 bit CPUtmflag means Protected mode - 32-bit CPUrmflag means Real Mode - 16 bit CPU

Comments
Post a Comment