Linux View system number of bits

Source: Internet
Author: User

Several ways to see how many bits Linux is

Method/Step
  1. Method One: getconf long_bit

    Enter the getconf long_bit command on the Linux terminal

    If it is a 32-bit machine, the result is 32

    Linux Code

    [Email protected] ~]# getconf long_bit

    32

    If it is a 64-bit machine, the result is 64

    Linux Code

    [Email protected] ~]# getconf long_bit

    64

  2. Method Two: Uname-a

    If it is a 64-bit machine, it will output x86_64

    Linux Code

    [Email protected] ~]$ uname-a

    Linux testweb01 2.6.18-308.4.1.el5 #1 SMP Tue Apr 17:08:00 EDT-x86_64 x86_64 x86_64 Gnu/linux

    As you can see, the output of x86_64 in the results of the uname-a execution indicates that the machine is 64-bit, otherwise the machine is 32-bit

    Linux Code

    [Email protected] ~]# uname-a

    Linux localhost.localdomain 2.6.18-164.el5 #1 SMP Tue 15:51:54 EDT i686 i686 i386 gnu/linux

  3. Method Three: File/sbin/init or File/bin/ls

    Example: 32-bit machine

    File/sbin/init

    Linux Code

    [Email protected] ~]# File/sbin/init

    /sbin/init:elf 32-bit LSB executable, Intel 80386, version 1 (SYSV), for Gnu/linux 2.6.9, dynamically linked (uses shared LIBS), for Gnu/linux 2.6.9, stripped

    File/bin/ls

    Linux Code

    [Email protected] ~]# File/bin/ls

    /bin/ls:elf 32-bit LSB executable, Intel 80386, version 1 (SYSV), for Gnu/linux 2.6.9, dynamically linked (uses shared Li BS), for Gnu/linux 2.6.9, stripped

    Example: 64-bit machine

    File/sbin/init

    Linux Code

    [Email protected] ~]$ File/sbin/init

    /sbin/init:elf 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for Gnu/linux 2.6.9, dynamically linked (uses shared LIBS), for Gnu/linux 2.6.9, stripped

    File/bin/ls

    Linux Code

    [Email protected] ~]$ File/bin/ls

    /bin/ls:elf 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for Gnu/linux 2.6.9, dynamically linked (uses shared Lib s), for Gnu/linux 2.6.9, stripped

    The 64-bit or 32-bit in the command result can be used to determine whether the machine is 64-bit or 32-bit.

    END

Linux View system number of bits

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.