How to Check if Linux (Ubuntu, Fedora Redhat, CentOS) is 32-bit or 64-bit

來源:互聯網
上載者:User

標籤:http   io   os   ar   for   sp   2014   on   cti   

The number of CPU instruction sets has kept growing, and likewise for the operating systems which are able to run and support on more than one CPU system architecture. For example, a Linux OS such as Ubuntu, Fedora, Redhat, Linux Mint, Debian, Arch Linux, openSUSE and CentOS can run on Intel or AMD CPU in either 32-bit or 64-bit flavor. In addition, some Linux also supports ARM CPU in both 32-bit and 64-bit versions.

So something it’s important to check and verify the edition and flavor of operating system been installed on the computer, before performing tasks such as installing new applications and kernel upgrade, so that the matching version could be installed to ensure proper compatibility.

If you want to know whether the Linux running on your machine is of 32-bit or 64-bit variant, and also the type of microprocessor instruction sets architecture of the machine, run the following command on the CLI:

uname -a

The result will be something similar to any of the following lines:

Linux server.mydigitallife.info 2.6.32-431.5.1.el6.x86_64 #1 SMP Wed Feb 07 07:07:07 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Or,

Linux Middlebin-Ubuntu 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 i686 athlon i386 GNU/Linux

Or,

Linux host 3.13.7-1-ARCH #1 PREEMPT Mon Mar 8 07:07:07 MDT 2012 armv5tel GNU/Linux

Uname is the command that is used in Linux to print the name, version and other details about the current machine and the operating system running on it. The version of Linux kernel be installed on the system can be deduced from the result above, for example:

i386 – 32-bit kernel
x86_64 – 64-bit kernel
armv5tel – ARMv5

The possible values including i386; i686; x86_64; ia64; alpha; amd64; arm; armeb; armel; hppa; m32r; m68k; mips; mipsel; powerpc; ppc64; s390; s390x; sh3; sh3eb; sh4; sh4eb; sparc and etc.

There may be multiple entries as uname returns values for many variables such as system kernel, operating System (or distribution), machine, processor, hardware platform and more. Normally all values should be the same, but some instruction sets architecture does provide backward compatibility, which means it supports more than one variant of operating systems. For example, one can install 32-bit or 64-bit operating system on a x64 CPU processor. Just select the one with highest comparability.

If you want specific information about your system, you can use different switch option to return just the information you want, instead of everything about your system.

Here’s the options that can apply to uname command:

-s, --kernel-name [print the kernel name]-n, --nodename [print the network node hostname]-r, --kernel-release [print the kernel release]-v, --kernel-version [print the kernel version]-m, --machine [print the machine hardware name]-p, --processor [print the processor type or "unknown"]-i, --hardware-platform [print the hardware platform or "unknown"]-o, --operating-system [print the operating system]

How to Check if Linux (Ubuntu, Fedora Redhat, CentOS) is 32-bit or 64-bit

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.