LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-16-2006, 09:44 PM   #1
joeenet
LQ Newbie
 
Registered: Jan 2006
Posts: 17

Rep: Reputation: 0
Processor


Is there a way to know if im running a 32 bit processor or 64 bit processor?
 
Old 05-16-2006, 09:57 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
cat /proc/cpuinfo. The model name will tell you what you've got. For example:

model name : Intel(R) Pentium(R) 4 Mobile CPU 1.70GHz

or

model name : AMD Athlon(tm) 64 Processor 3200+


If you don't know whether a specific model is 64-bit, and can't tell from the listed model name, then visit the vendor's web site and look up the specifications for that model.
 
Old 05-17-2006, 12:15 AM   #3
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
Here's a neat little bash function that might help, pinched it from a Gentoo ebuild I was reading over the other day so I'm not 100% sure if uname -m returns the real machine arch or the arch the kernel was built for but it's gotta be a start.
Code:
guess_arch() {
	local x
	local host=$(echo "${CTARGET%%-*}" | sed -e 's/i.86/i386/' \
	                                         -e 's/sun4u/sparc64/' \
	                                         -e 's/arm.*/arm/' \
	                                         -e 's/sa110/arm/' \
	                                         -e 's/powerpc/ppc/')

	# Sort reverse so that we will get ppc64 before ppc, etc
	for x in $(ls -1 "${S}/include/arch/" | sort -r) ; do
		if [[ ${host} == "${x}" ]] ; then
			echo "${x}"
			return 0
		fi
	done

	return 1
}
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to know processor.... zameer_india Linux - Newbie 3 01-04-2005 01:10 AM
Installing Linux on a dual processor machine (only one processor detected) rocordial Linux - Hardware 1 11-27-2004 02:16 AM
4 processor listings in cpuinfo on dual processor system. atticboy1 Linux - Hardware 2 02-08-2004 06:35 PM
xinetd 100% utilization on one processor on a two processor system red hat 9 garnold Linux - General 0 02-02-2004 01:47 PM
Kernel Panic on Dual Processor Motherboard with only 1 Processor olar Linux - Software 1 10-13-2001 03:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration