You can get the Ethernet link speed on macOS through the Terminal using the following command:
system_profiler SLEthernetDataType | grep "Link Speed"
This command uses the system_profiler
utility to retrieve information about the Ethernet interface, and then filters the output for the line that contains the “Link Speed”. The result should show the current link speed of the Ethernet interface in Mbps.
Alternatively, you can use the ifconfig
utility to get information about the network interfaces, including the link speed. The command would be:
ifconfig en0 | grep "media: "
Here, “en0” is the name of the Ethernet interface. You can replace it with the appropriate name of your interface if it’s different. The output should show the current link speed, such as:
media: autoselect (1000baseT <full-duplex>)