Five methods to check whether your Linux is 32-bit or 64-bit

Source: Internet
Author: User

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:

 
 
  1. $ uname -a 
  2. 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:

 
 
  1. $ uname -m 
  2. 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:

 
 
  1. $ file /sbin/init 
  2. /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:

 
 
  1. $ arch 
  2. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.