Home  >  Article  >  Operation and Maintenance  >  How to check if the system is 64-bit in Linux

How to check if the system is 64-bit in Linux

青灯夜游
青灯夜游Original
2022-03-24 14:05:195127browse

View method: 1. Execute the "getconf LONG_BIT" command, if "64" is output, it is 64-bit; 2. Execute the "uname -a" command, if "x86_64" information is output, it is 64-bit; 3 . Execute the "arch" command. If the "x86_64" information is output, it is 64-bit.

How to check if the system is 64-bit in Linux

#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

Linux Check whether the system is 64-bit

Method 1: getconf LONG_BIT Check

as follows Example shown: 64-bit Linux system displays 64. The simplest and fastest way.

[root@gettestlnx01 ~]# getconf LONG_BIT
64

How to check if the system is 64-bit in Linux

Method 2: uname command to view

As shown in the following example, x86_64 represents a 64-bit system, i686 i386 represents a 32-bit system system. i686 is just a subset of i386. The supported CPUs start from Pentium 2 (686). Previous models are not supported.

[root@gettestlnx01 ~]# uname -a
Linux gettestlnx01 3.8.13-16.2.1.el6uek.x86_64 #1 SMP Thu Nov 7 17:01:44 PST 2013 x86_64 x86_64 x86_64 GNU/Linux

How to check if the system is 64-bit in Linux

Method 3: View with arch command

[root@gettestlnx01 ~]# arch
x86_64

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of How to check if the system is 64-bit in Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:what is linux device fileNext article:what is linux device file