Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do i find a MAC address of UNIX machine

Status
Not open for further replies.

kaushik222

Technical User
Oct 23, 2003
26
0
0
US
How do i find a MAC address of UNIX machine
 
ifconfig -a



[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
If on the unix machine, depending of *nix flavor, you can try this:
Code:
ndstat
or this:
Code:
ifconfig -a | grep ether
If on a different box, provided you're on the same subnet, ping the unix machine and then execute arp -a

Hope This Help
PH.
 
"ifconfig -a " gives me 3 rows of some information , but this info doesn't have "ether". So i don't know which one is the MAC address in that
 
kaushik222, thanks for sharing.
Can you please say others how you solve your problem, i.e. which command for which unix.
 
Can you post the 3 lines produced by ifconfig -a ?
And the result of uname -a ?
 
I am sorry, i don't think i will be allowed to do so. Coz that is important informataion.
 
Anyway, the MAC address should be like this:
01:23:45:67:89:ab
i.e. 6 hex numbers separated by colons.

Hope This Help
PH.
 
I found the following info on the web :

What is my system's MAC address?
Every ethernet card that has been manufactured has its own unique identification number called its MAC (Media Access Control) address (sometimes referred to as a hardware address). The address itself is most often expressed as a set of six pairs of hexidecimal digits separated by a colon, like this:

00:60:08:A8:83:B3

The command to show the MAC address differs from OS to OS:

AIX: the MAC address can be viewed using the netstat -ia command.

HP-UX: the MAC address can be viewed using the lanscan command under the heading Station Address.

IRIX: will display the hardware address with the command nvram eaddr. It should be noted that you can also display this address and its decimal counterpart using the sysinfo -vv command.

Linux: To see the hardware address on a Linux machine you can use the ifconfig command. The value will be next to the HWaddr heading.

Solaris: arp -a | grep hostname will show you the system's MAC address.

Tru64 UNIX: netstat -ia will show you the station's MAC address.



Jean Pierre.
 
Adding to the above list:

SCO OpenServer 5.x
'ifconfig net0' will show mac in the 'ether' row. If you have more than one NIC installed, you may want to use 'ifconfig -a'
 
ifconfig -a gives MAC address only if you are root. For regular users it gives only IP etc....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top