[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Identifying CPU and current OS



On 9/28/25 7:37 AM, Andy Smith wrote:
Hi,

On Sun, Sep 28, 2025 at 01:12:27PM +0100, alain williams wrote:
On Sun, Sep 28, 2025 at 07:00:11AM -0500, Richard Owlett wrote:
How do I find if the installed OS is 32 or 64 bit?

$ file /bin/true

No doubt good enough for the OP who is not going to be part way through
a multiarch crossgrade, but the above does only tell you if /bin/true is
a 32-bit binary or not, rather than anything about the rest of the OS.

My use case was to determine if a certain machine was capable of running the same 64 bit OS as my current machine with the goal of determining if a very weird website symptom was caused by something on my side.
   *NOTE BENE* The motivating problem was apparently on their end.
               Now, 24 hours later, site acts as it always had.



$ file /bin/true
/bin/true: ELF 32-bit LSB pie executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=34b7090f95e38d12cf00b77a9afb8e51822fd92d, for GNU/Linux 3.2.0, stripped
$ dpkg --print-foreign-architectures
amd64
$ dpkg --print-architecture
i386
$ uname -m
x86_64

I think the above addresses possible future issues.
I need to read the appropriate man pages.
Thanks.


It's a perhaps philosophical question: Is the "installed OS" 32-bit even
if the kernel is 64-bit?

My underlying question was explicitly the character of the installed processor.


Thanks,
Andy



Reply to: