- Check if my machine is 64-bit capable on Linux (Ubuntu)?
- 5 Answers 5
- How To Check If A Linux System Is 32 bit Or 64 Bit
- Check If A Linux System Is 32 bit Or 64 Bit
- Method 1 — Using uname command
- Method 2 — Using arch command
- Method 3 — Using file command
- Method 4 — Using lscpu command
- Method 5 — Using dpkg command
- Method 6 — Using getconf utility
- Method 7 — Using lshw utility
- Method 8 — Using HOSTTYPE environment variable
- Method 9 — Using /proc/cpuinfo
- Method 10
- Help us to help you:
- 5 ways to check if your Linux OS is 64-bit or 32-bit
- How to check if your Linux system is 64-bit or 32-bit
- 1. Using the uname command
- 2. Using the getconf command
- 3. Using the file command
- 4. Using the dpkg command
- 5. Heading to system settings
Check if my machine is 64-bit capable on Linux (Ubuntu)?
Similar to this question, I have a 32-bit OS (Ubuntu), but I want to know if my machine is 64-bit capable. I checked out the question, but the answers are Windows-specific. I also checked this question, but I want to know if it is 64-bit capable, I know my OS is 32-bit.
Thanks, whoever I am
Surely this is a duplicate question and has been asked many times. grep ‘ lm ‘ /proc/cpuinfo — no output = 32 bit processor. lm = long mode == 64 bit capable and is considered the most relilable flag.
Just a note note of caution: even if your CPU is capable of running a 64-bit OS, it is not always advisable to do so. The Ubuntu site recommends 32-bit Ubuntu if you have less than 2GB of RAM. 64-bit code is always bigger, and any gain in CPU speed is swamped by the degradation if there is increased swapping activity.
5 Answers 5
and look at the Width attribute. If its 64bit , your hardware is capable.
Just to throw a revision of Frank Thomas’s answer into the ring. Enter this into your terminal and the answer will be pretty obvious.
lshw -class CPU | grep -i "width"
If you have an Intel processor, they provide their own site with tons of information of each processor, called the Intel ARK. Just search for your processor there, and it will have a section called Intel 64 , with either a yes or no box.
For AMD processors, here is a list of all their processors, and by pressing View Details you can see if it is 64-bit capable.
The way I usually do it is by googling the cpu. You can pull the CPU from the BIOS and a look for the specs from Intel, Newegg, etc.
One of the best ways of knowing this is, using the lscpu command
mir@Dell:~$ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian Address sizes: 45 bits physical, 48 bits virtual CPU(s): 2 On-line CPU(s) list: 0,1 Thread(s) per core: 1 Core(s) per socket: 2 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 78 Model name: Intel(R) Core(TM) i3-6006U CPU @ 2.00GHz Stepping: 3 CPU MHz: 1992.004 BogoMIPS: 3984.00 Hypervisor vendor: VMware Virtualization type: full L1d cache: 64 KiB L1i cache: 64 KiB L2 cache: 512 KiB L3 cache: 3 MiB NUMA node0 CPU(s): 0,1
Architecture: x86_64 -> This means you are currently running a 64-bit OS
CPU op-mode(s): 32-bit, 64-bit -> This means your CPU is capable of running both 32-bit and 64-bit OS
Architecture: X86, i686, i386 -> 32-bit OS Architecture: X64, amd64, X86_64 -> 64-bit OS
How To Check If A Linux System Is 32 bit Or 64 Bit
We already knew how to check if a Linux system is physical or virtual machine. Now, it is time to find out if the installed Linux OS is either 32 bit or 64 bit. If your Linux system has GUI, it is really easy. Just navigate to System Settings -> Details, and there you go, you will know the architecture. In CLI based Linux systems, it is bit different. This guide will explain how to check if a Linux system is 32 bit or 64 bit. It is not that difficult. Read on.
Most Linux OS versions have ditched 32 bit support. So, this article may not useful for everyone out there. If you still have a good old hardware that supports 32 bit OS, this article will definitely be helpful.
Check If A Linux System Is 32 bit Or 64 Bit
There might be many ways to find out the architecture of your system. These are only the methods I am aware of now. I will keep update this guide if I find any other ways to do this. Bookmark this page, and keep visiting.
Method 1 — Using uname command
My preferred way to find out a Linux system’s architecture is using uname command. The uname is part of GNU coreutils that displays certain system information, such as hostname, Kernel version, Kernel release, OS version, and system’s architecture etc.
To find if your Linux system is 32 bit or 64 bit, just run the following command from the Terminal:
Sample output:
As you see above, my Linux OS architecture is 64 bit. If you want to display all details, just use ‘-a’ flag.
Sample output:
Linux sk 4.16.11-1-ARCH #1 SMP PREEMPT Tue May 22 21:40:27 UTC 2018 x86_64 GNU/Linux
This command not just displays the architecture, but all other details, such as Kernel name, version, system name etc.
Method 2 — Using arch command
Yet another way to find out the system’s architecture is to use arch command. The arch command is same as ‘uname -m’ command which displays the machine hardware name.
Sample output from my machine:
Method 3 — Using file command
You can also check your Linux system’s architecture using file command.
Or, use the following command on systems that use systemd.
Sample output:
/lib/systemd/systemd: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=8d3cb750275dc2f474dc7f049fdffb3a649b1d49, stripped, with debug_info
Also, you can use the following command to check your system’s architecture:
Sample output:
/usr/bin/id: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=ca513ae4d630324b1eadcd78122490248a27b8b6, stripped
Method 4 — Using lscpu command
The lscpu command is part of the util-linux package that displays the information about the CPU architecture.
To find if your Linux system is 32 bit or 64 bit, just run:
Sample output would be:
Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 2 Core(s) per socket: 2 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 42 Model name: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz Stepping: 7 CPU MHz: 799.890 CPU max MHz: 2300.0000 CPU min MHz: 800.0000 BogoMIPS: 4591.21 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 3072K NUMA node0 CPU(s): 0-3 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave avx lahf_lm epb tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm arat pln pts
Method 5 — Using dpkg command
The dpkg is a package manager that can be used to to install, build, remove and manage Debian packages. We can tell if our system OS is either 32 bit or 64 bit as shown below.
Sample output:
[For 64 bit OS] amd64 [For 32 bit OS] i386
This method will work only on Debian and other APT based systems such as Ubuntu, Linux Mint.
Method 6 — Using getconf utility
We can find our system’s architecture using getconf utility. It displays your system’s configuration variables and their values.
To find if the installed OS is 32 or 64 bit, just run:
Method 7 — Using lshw utility
The lshw utility can also be used to discover whether your Linux is 32 bit or 64 bit. It will display detailed information on the hardware configuration of a Linux system.
To display whether your Linux OS is either 32 or 64 bit, just run:
Sample output:
*-cpu product: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz vendor: Intel Corp. physical id: 2 bus info: cpu@0 width: 64 bits capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp x86-64 constant_tsc rep_good nopl xtopology nonstop_tsc pni pclmulqdq monitor ssse3 cx16 sse4_1 sse4_2 popcnt xsave avx hypervisor lahf_lm
Or, you can be more specific:
$ sudo lshw -c cpu | grep width
Method 8 — Using HOSTTYPE environment variable
The another way to find out your system’s OS architecture is using HOSTTYPE environment variable like below.
Sample output:
[64 bit system] x86_64 [32 bit system] i386
Method 9 — Using /proc/cpuinfo
We can find our system’s OS architecture from /proc/cpuinfo file.
$ sudo grep flags /proc/cpuinfo
Sample output:
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc pni pclmulqdq monitor ssse3 cx16 sse4_1 sse4_2 popcnt xsave avx hypervisor lahf_lm
- lm flag means 64-bit (Long mode cpu)
- tm flag means 32-bit (Protected mode)
- rm flag means 16-bit CPU (Real Mode)
As you see in the output, I use 64 bit.
Method 10
Finally, you can also find your OS architecture type by looking into the installed packages and libraries on your system.
Sample output:
drwxr-xr-x 22 root root 4096 May 17 15:07 lib drwxr-xr-x 2 root root 4096 May 17 15:10 lib64
Suggested read:
And, that’s all for now. I hope this helps. If you find our guides useful, please share them on your social, professional networks and support OSTechNix.
Thanks for stopping by!
Help us to help you:
Have a Good day!!
5 ways to check if your Linux OS is 64-bit or 32-bit
If you’re a Linux newbie, you should know that there will be times — such as when installing packages — when you’ll be looking for a way to see if your operating system is 32-bit or 64-bit.
The information is not hard to find, but there is more than one way to access it. In this tutorial, I’ll discuss some of those ways. But before we start the discussion, it’s worth sharing that all the instructions and commands mentioned in this article have been tested on Ubuntu 20.04 LTS and Debian 10, and CentOS 8
How to check if your Linux system is 64-bit or 32-bit
1. Using the uname command
Uname is a command-line utility that prints system information. You can use the command with -i option to produce the required information:
If the aforementioned command produces i686 in output, then your OS is 32-bit. If the output is x86_64, then the OS is 64-bit. For example, my system is 64-bit:
2. Using the getconf command
The getconf command is basically used to query system configuration variables. To check whether your OS is 32-bit or 64-bit, run getconf in the following way:
If the output is 32, then your OS is 32-bit, and if the output is 64, then the OS is 64-bit.
3. Using the file command
The file command is usually used to determine the file type. However, you can also use this tool to determine whether the OS is 32-bit or 64-bit. Here’s how it’s done:
For systems using init, run the following command:
And for systems using systemd (like Ubuntu 16.04), run the following command:
The output of these commands should contain «32-bit» for 32-bit systems and «64-bit» for 64-bit OS.
For example, here’s the output in my case:
/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]=c394677bccc720a3bb4f4c42a48e008ff33e39b1, stripped
The highlighted text suggests my system is 32-bit.
4. Using the dpkg command
If you are using Debian or Debian-based system like Ubuntu, you can also use the dpkg package managing tool to check for 32-bit or 64-bit OS. Here’s the exact command:
The aforementioned command should display something like ‘i386’ in output if the OS is 32-bit, and something like ‘amd64’ if the OS is 64-bit. For example, the following screenshot shows the output in my case:
5. Heading to system settings
If you are on Ubuntu Desktop, you can also find the information by heading to System Settings. -> Details.