F
F
fokin_nikolay19892019-01-17 09:22:09
linux
fokin_nikolay1989, 2019-01-17 09:22:09

How to display the mac address of an interface?

How to display the mac address of a network interface, knowing that its ip starts with 128.15. on your pc?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
J
jcmvbkbc, 2019-01-17
@fokin_nikolay1989

How to display the mac address of a network interface, knowing that its ip starts with 128.15. ?

ip addr | sed -n '/link/h;/inet 128\.15\./{g;p}'

S
Sergey Sashkin, 2019-01-17
@LexPex

ifconfig /all

A
antonioanisimov, 2019-01-17
@antonioanisimov

Display MAC addresses of all interfaces
To display the MAC address of a specific interface, you need to specify its name, for example:
ifconfig eth0 | grep ether

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question