Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to check whether linux is 32-bit or 64-bit

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to check whether linux is 32-bit or 64-bit". In daily operation, I believe many people have doubts about how to check whether linux is 32-bit or 64-bit. Xiaobian consulted all kinds of data and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the question of "how to check whether linux is 32-bit or 64-bit". Next, please follow the editor to study!

Check whether linux is 32-bit or 64-bit: 1, execute the "getconf LONG_BIT" command, the output 32 is 32-bit, the output 64 is 64-bit; 2, execute the "uname-m" command, the output "x86x64" is 64-bit, and the output "i686" or "i386" is 32-bit.

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

Check whether linux is 32-bit or 64-bit

Method 1:getconf LONG_BIT to view

The following example is shown: 32-bit Linux system displays 32, 64-bit Linux system displays 64. The easiest and quickest way.

[root@DB-Server ~] # getconf LONG_BIT32

[root@gettestlnx01 ~] # getconf LONG_BIT64

Method 2:uname command to view

As shown in the following example, x86room64 represents a 64-bit system and i686 i386 represents a 32-bit system. I686 is only a subset of i386. Cpu support starts with Pentium 2. Previous models do not support it.

[root@DB-Server] # uname-aLinux DB-Server 2.6.18-194.el5 # 1 SMP Tue Mar 16 21:52:43 EDT 2010 i686 i686 i386 GNU/Linux [root@DB-Server] # uname-mi686

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

Method 3: arch command to view

[root@DB-Server ~] # archi686 [root@gettestlnx01 ~] # archx86_64

Method 4:file command to view

[root@DB-Server] # 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 [root@DB-Server] # [root@DB-Server] # [root@DB-Server] # 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 libs), for GNU/Linux 2.6.9, stripped

[root@gettestlnx01] # file / sbin/init/sbin/init: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped [root@gettestlnx01] # [root@gettestlnx01] # [root@gettestlnx01] # file / bin/ls/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped

At this point, the study on "how to check whether linux is 32-bit or 64-bit" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report