There are different ways for that, but do you need to get all the
interfaces? Or a specific one?
You could, for example try:
ls /sys/class/net
Or
ip -o link show | awk '{print $2, $9}'
Or just $2
As well as other ways, so it depends on what you need.
;)
On Apr 13, 2016 8:07 AM, "Jer" <[email protected]> wrote:
> On 16-04-13 07:59 AM, Marcelo Cavalcante wrote:
>
>>
>> That's the default behavior for systemd, so since Ubuntu moved to
>> systemd, that's an expected result.
>>
>> By default, systemd will now name interfaces following policy:
>>
>> 1) if that information from the firmware is applicable and available,
>> falling back to 2) if that information from the firmware is applicable and
>> available, falling back to 3) if applicable, falling back to 5) in all
>> other cases. 4) is not used by default, but is available if the user
>> chooses so.
>>
>> Off course, the distro could do a workaround, but they decided to keep
>> the default settings, like many other distros adopting systemd.
>>
>> Cheers,
>>
>>
> Thanks, I have not kept up on systemd. My issue is I need to have a script
> write out the /etc/network/interfaces file. Can someone tell me how I can
> reliably determine the network adapter name from the cli?
>
> Jeremy
> _______________________________________________
> mlug mailing list
> [email protected]
> https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca
>
_______________________________________________
mlug mailing list
[email protected]
https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca