Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Mar 2010 11:36:14 -0500
From:      Martin McCormick <martin@dc.cis.okstate.edu>
To:        freebsd-questions@freebsd.org
Subject:   Re: Automatic Way to Tell if a FreeBSD system is 64 or 32-bit? 
Message-ID:  <201003171636.o2HGaEwn029337@dc.cis.okstate.edu>

next in thread | raw e-mail | index | archive | help
Chris Rees writes:
 sysctl hw.machine_arch

It and uname -m work beautifully. Thanks to all.

	One thing I discovered while trying this command out on
various systems is that if the system was originally built using
i386 code, it reports as i386 even though there is a 64-bit
platform struggling to get out.

	In my script, this is not a problem because the mfsboot
CDROM for 32-bit boxes chokes on a 64-bit platform and will not
boot. When on a 64-bit system, it boots like gang busters and
since it installs its own OS, there is no question at all.

	Thank you all.

Martin McCormick



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003171636.o2HGaEwn029337>