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

Re: Identifying CPU and current OS



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.

$ 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

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

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting


Reply to: