How do I know if my linux kernel is running in 32bit or 64bit?
--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Hypnotic Puzzle2
--
Chapters
00:00 How Do I Know If My Linux Kernel Is Running In 32bit Or 64bit?
00:18 Accepted Answer Score 15
00:49 Answer 2 Score 12
01:07 Answer 3 Score 0
01:38 Answer 4 Score 9
01:53 Thank you
--
Full question
https://superuser.com/questions/29943/ho...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#linux #64bit #cpu #32bit #kernel
#avk47
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Hypnotic Puzzle2
--
Chapters
00:00 How Do I Know If My Linux Kernel Is Running In 32bit Or 64bit?
00:18 Accepted Answer Score 15
00:49 Answer 2 Score 12
01:07 Answer 3 Score 0
01:38 Answer 4 Score 9
01:53 Thank you
--
Full question
https://superuser.com/questions/29943/ho...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#linux #64bit #cpu #32bit #kernel
#avk47
ACCEPTED ANSWER
Score 15
uname -a
will tell you the kernel - the end bit tells you the architecture.
Two examples:
My mac:
Darwin Mac.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
My Dreamhost hosting:
Linux ecco 2.6.24.5-serf-xeon-c6.1-grsec #1 SMP Tue Oct 7 06:18:04 PDT 2008 x86_64 GNU/Linux
i386 = 32 bit
x86_64 = 64 bit
ANSWER 2
Score 12
uname -m
will give you the architecture you kernel is compiled for. If it prints i686
then your kernel is 32 bit, if x86_64
then it's 64 bit, assuming you have an Intel/AMD chip.
ANSWER 3
Score 9
I think the most precise way is
getconf LONG_BIT
here it exactly shows 64
found on this tip
getconf
is from package libc-bin (on ubuntu)
ANSWER 4
Score 0
If you want to see only the platform that you are running on, you can use
uname -i
The full list of supported options for uname
is
$ uname --help
Usage: uname [OPTION]...
Print certain system information. With no OPTION, same as -s.
-a, --all print all information, in the following order,
except omit -p and -i if unknown:
-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
--help display this help and exit
--version output version information and exit