On Mon, Sep 02, 2024 at 09:52:23PM +0200, Geert Stappers wrote:
> On Mon, Sep 02, 2024 at 12:27:52PM +0000, Andy Smith wrote:
> > $ ip -j link | jq '.[] | select(.address) | .ifname + ": " + .address'
> > "lo: 00:00:00:00:00:00"
>
> For what it is worth:
>
> $ ip --brief link
> lo UNKNOWN 00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
And if you're interested in only the interface name and MAC address, pipe
that result to awk, so...
ip -br l | awk '{print $1,$3}'
Cheers,
Tom
--
Many people are unenthusiastic about their work.
Attachment:
signature.asc
Description: PGP signature