LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-15-2012, 10:07 AM   #1
N4n0lix
LQ Newbie
 
Registered: Dec 2012
Location: Germany
Distribution: Debian Squeeze
Posts: 2

Rep: Reputation: Disabled
$MACHTYPE differs from uname -m


Hello,

I'm quite new to Linux (3 months on my laptop from now) and still exploring how it works and so on. I've got Debian 6.0.6(squeeze) with kernel 2.6.32-5-686. Now i came up to something strange:
Code:
uname -m
i686
the result is as excpected from kernel version 2.6.32-5-686
but now
Code:
echo $MACHTYPE
i486-pc-linux-gnu
Can someone explain to me why uname prints out i686 and $MACHTYPE i486?

N4n0lix
 
Old 12-15-2012, 11:34 AM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,614

Rep: Reputation: 440Reputation: 440Reputation: 440Reputation: 440Reputation: 440
Quote:
Can someone explain to me why uname prints out i686 and $MACHTYPE i486?
The uname -m function reads from the machine and reports what the machine thinks/knows of itself --check the machine:

Code:
~# dmidecode | grep Family
Signature: Type 0, Family 6, Model 42, Stepping 7
Whereas, to the contrary, every Operating System always seeks maximum backward and forward compatibility, and it usually declares itself to the backward portability: declaring to be compatible to the older earlier architecture rather than the latest; thus, in declaring its environment, it fixes the VARIABLE $MACHTYPE according to its (Operating System's) preferences 4x86 without negating the fact that it is also compatible to the newer architecture 6x86 which generally the user needs not worry. The operating system simply proclaims itself to be compatible to an older architecture; it is a declaration about itself (the OS), not about the current condition of the machine.

Therefore when "echo VARIABLE" is issued it reads from the environment according to the dictates of the operating system (not according to the dictates of the machine) --check the testimony of the operating system:

Code:
~# declare | grep MACH
MACHTYPE=i486-slackware-linux-gnu
As you see, consistently, the MACHTYPE echoed always bears the distro (debian or slackware) as the sworn witness to that statement, to inform us that it is from the tongue of the OS, not from the machine record.

Hope that helps.

Good luck.
 
1 members found this post helpful.
Old 12-15-2012, 11:45 AM   #3
N4n0lix
LQ Newbie
 
Registered: Dec 2012
Location: Germany
Distribution: Debian Squeeze
Posts: 2

Original Poster
Rep: Reputation: Disabled
That clarified it for me, thanks!

N4n0lix
 
  


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
[SOLVED] Why the clock speed differs satimis Linux - Hardware 24 12-16-2012 11:21 AM
ls with and without absolute pathname differs? password636 Linux - General 1 08-02-2012 05:29 AM
How come file size differs between ls and df? felixrabe Linux - General 6 01-06-2008 07:26 PM
$MACHTYPE doesn't match Peter Shepard Linux - General 0 12-16-2006 09:49 AM
File size differs procfs General 3 06-06-2006 10:14 AM


All times are GMT -5. The time now is 10:43 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration