Linux - How to get IP and MAC address of ethernet adapter in Linux

Linux - How to get IP and MAC address of ethernet adapter in Linux

 
Question : How to get MAC address of ethernet adapter in Linux?
Answer : ifconfig command can be used to obtain MAC address of ethernet adapter in Linux. Search for "HWaddr" value for MAC address for specific ethernet adapter from output of "ifconfig -a". Alternative, "ifconfig <interface>" command can be used to display for specific ethernet adpater.
Example :
root@server # ifconfig <ethX> | grep HWaddr <-- To get MAC add for specific ethernet
root@server # ifconfig -a | grep HWaddr <-- To get MAC add for all ethernet


Question : How to get IP address of ethernet adapter in Linux?
Answer : ifconfig command can be used to obtain IP address and subnet value of network interface in Linux.
Example :
root@server # ifconfig -a <-- To get IP add and subnet of all interface
root@server # ifconfig <ethX> <-- To get IP add and subnet of specific interface
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
How to manage Linux password expiry with the chage command
Viewed 493 times since Tue, Sep 11, 2018
Linux - How to monitor memory usage
Viewed 440 times since Fri, Jun 8, 2018
Linux Kernel /etc/sysctl.conf Security Hardening
Viewed 1768 times since Fri, Aug 3, 2018
Lsyncd: live file syncronization across multiple Linux servers
Viewed 1125 times since Wed, Oct 31, 2018
Szybkie sprawdzenie zewnętrznego adresu IP i hosta
Viewed 830 times since Thu, May 24, 2018
RHEL: iSCSI target/initiator configuration on RHEL6
Viewed 1008 times since Sat, Jun 2, 2018
linux unix aix banner /etc/issue
Viewed 510 times since Fri, Aug 3, 2018
10 Linux rsync Examples to Exclude Files/Directories
Viewed 481 times since Wed, Oct 31, 2018
RHEL: Crash kernel dumps configuration and analysis on RHEL 6
Viewed 1199 times since Sat, Jun 2, 2018
RHCS: Configure an active/backup pacemaker cluster
Viewed 898 times since Sun, Jun 3, 2018