Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Don't know how to read it for that. I also ran the command cat /proc/version and also don't know the result it shows below gives any clue or not.
Linux version 2.6.9-78.ELsmp (brewbuilder@hs20-bc2-3.build.redhat.com) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-10)) #1 SMP Wed Jul 9 15:39:47 EDT 2008
The command 'arch -k' also displays the architecture of your machine.
man arch tells us
Code:
arch is deprecated command since release util-linux 2.13. Use uname -m.
But so far as I know, arch still works.
Quote:
Originally Posted by kirukan
This will show whether the OS is 32 or 64
Code:
file /usr/bin/file
That's the answer I really don't like.
That tells you whether /usr/bin/file is a 32 bit or 64 bit executable. Assuming the command works and says 64 bit, you can be pretty sure the Linux kernel is 64 bit. But if the answer is 32 bit, it is still quite possible for the Linux kernel to be 64 bit.
Stick with the direct method (uname -m or similar).
That tells you whether /usr/bin/file is a 32 bit or 64 bit executable. Assuming the command works and says 64 bit, you can be pretty sure the Linux kernel is 64 bit. But if the answer is 32 bit, it is still quite possible for the Linux kernel to be 64 bit.
Stick with the direct method (uname -m or similar).
On my system where I WANT the answer: "32 bit" as my OS is 32 bit, uname -m tells me it is 64-bit, but the file command more-or-less correctly tells me "32-bit".
I'm still looking for something that returns a concise and correct "i386"...
(My machine is 64-bit capable, runs a 64-bit kernel, but has a 32-bit userspace. The reason for this is that I need this machine to compile 32-bit binaries for other systems that may not be 64-bit capable. The reason it runs a 64-bit kernel is that the kernel becomes terribly slow when you have a 32-bit kernel and have 16G ram).
Edit: Too quick in replying... T-Dub116 has the winning trick. (for me). :-)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.