Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

On solaris, is there a command to get the Ethernet Card MAC Address without being root

Tags:

solaris

sunos

On Solaris, is there a command that I can run to get the MAC address of an ethernet card without running "/sbin/ifconfig -a" as root. Running /sbin/ifconfig -a as a non root user leaves out the MAC address - go figure!

Thanks,

Paul

like image 908
ppower66 Avatar asked Apr 21 '10 02:04

ppower66


People also ask

What command can be used to identify the MAC address of an Ethernet adapter?

In the Command Prompt window, type ipconfig /all and press Enter. Under the Ethernet Adapter Local Area Connection section, look for the "Physical Address". This is your MAC Address.

How do I find my Ethernet MAC address Linux?

Linux. Open a terminal and use the ifconfig command. The MAC address will be listed next to HWaddr.


2 Answers

/usr/bin/netstat -pn |grep SP

like image 84
srikanth Avatar answered Sep 23 '22 21:09

srikanth


Try an "arp -a", and look for your own hostname. (This works for me on the Solaris 9 machine I tried it on, but your mileage may vary.)

like image 22
David Gelhar Avatar answered Sep 23 '22 21:09

David Gelhar