Changing ether to hwaddr

Issues related to configuring your network
Post Reply
charan.guddu
Posts: 3
Joined: 2019/04/27 07:43:03

Changing ether to hwaddr

Post by charan.guddu » 2019/04/27 08:03:58

Hi,
When I type ifconfig in CentOS 7 the output shows "ether" for the MAC address but I want it to show as "HWaddr" instead of "ether".
Kindly suggest me the way to modify the output of ifconfig command.

Regards,
Charan

tunk
Posts: 1205
Joined: 2017/02/22 15:08:17

Re: Changing ether to hwaddr

Post by tunk » 2019/04/27 12:32:14

ifconfig | sed 's\ether\HWaddr\g'

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Changing ether to hwaddr

Post by TrevorH » 2019/04/27 13:21:37

ifconfig has been deprecated for more than 10 years. Its replacement is the ip command, specifically ip link show or ip addr show.

Neither uses HWAddr.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

charan.guddu
Posts: 3
Joined: 2019/04/27 07:43:03

Re: Changing ether to hwaddr

Post by charan.guddu » 2019/04/28 05:44:40

Yes I agree, but ifconfig is hardcoded in our application and in CentOS 6 the output shows HWaddr, we want the same to be shown in CentOS 7 also

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Changing ether to hwaddr

Post by TrevorH » 2019/04/28 11:44:05

Then the solution is the one involving sed that was already posted.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply