how to determine network device names
Ralf Mardorf
kde.lists at yahoo.com
Sun Nov 7 18:26:47 UTC 2021
On Sun, 07 Nov 2021 13:04:09 -0500, hput wrote:
>How can I dredge up or create an ethernet device?
Isn't a device listed by /sys/class/net/?
On Sun, 7 Nov 2021 19:01:09 +0100, Ralf Mardorf wrote:
>[weremouse at moonstudio ~]$ basename $(ls -d /sys/class/net/enp?s0)
>enp3s0
>
>In a script e.g. like this:
>
>dhcpcd $(basename $(ls -d /sys/class/net/enp?s0))
>
>Something to keep in mind when using the output for scripts is, that
>it's possible to have more than just one "enp*" device.
More information about the ubuntu-users
mailing list