Sometimes new Linux users are very confused when downloading software, because the download page often provides 32-bit and 64-bit software at the same time. So it is very important to know whether your operating system is 32-bit or 64-bit, because you need this information when doing many things. In this article, we will discuss five methods for detecting whether your Linux system is 32-bit or 64-bit.
Check whether your Linux is 32-bit or 64-bit
Note that these methods are tested on the Ubuntu 13.10 platform.
1. Run the 'uname-a' command.
The most common test method is to run the uname command.
For example, in my system, it displays the following information:
- $ uname -a
- Linux ubuntu 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:12:00 UTC 2013 i686 athlon i686 GNU/Linux
The highlighted i686 (or sometimes i386) indicates that the operating system is 32 bits, but if x86_64 is displayed, the operating system is 64 bits.
2. Run the 'uname-m' command.
The above command has too many connotations. You can use this parameter to direct your mind: 'uname-M '.
For example, in my system, it displays the following information:
- $ uname -m
- i686
This indicates that my Ubuntu Linux system is 32-bit. If the output shows x86_64, it indicates that the system is 64-bit.
3. Use the file command
Although this is purely a show-off technique, it is still a way to achieve the goal. To use this method, run the file command with/sbin/init as the parameter.
For example:
- $ file /sbin/init
- /sbin/init: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0xc0d86a25a7abb14cad4a65a1f7d03605bcbd41f6, stripped
The highlighted 32-bit indicates that this is a 32-bit operating system. If it is displayed as 64-bit, it indicates that the operating system is 64-bit.
4. Use the arch command
Another alternative method is to use the arch command, which is used to output the hardware name of the machine.
Here is an example:
- $ arch
- i686
Here you can see that the output is i686, which indicates that this is a 32-bit operating system. For a 64-bit operating system, the output should be x86_64.
5. Use the system settings
If you are using Ubuntu 12.04 or higher, you can easily view your system structure in ** All Settings-> Details.
In this way, you can see that the system type (32-bit) is clearly displayed here.
Do you know other methods to check whether the operating system is 32-bit or 64-bit? Reply and share with us below.
Via: http://mylinuxbook.com/5-ways-to-check-if-linux-is-32-bit-or-64-bit/
Translator: crowner Proofreader: Caroline