get_default_interface¶
- getmac.get_default_interface()[source]¶
Get the name of the default network interface on the system.
This is essentially a convenience wrapper around
get_by_method()with thedefault_ifacemethod type. The code is literallyreturn getmac.getmac.get_by_method("default_iface").- Return type:
- Returns:
The name of the default network interface, or
Noneif it could not be found or every candidate method failed.- Raises:
RuntimeError – if no method can be used to find the default interface.