List only ethernet Network Adapters on Debian/Fedora

Sometimes you want a quick way to verify all ethernet network adapters that are seen by the kernel at boot time. I find going directly to the pseudo filesystem is the fastest.

For example.

# ls /sys/class/net|egrep -v "^vir|^lo|^wl"
enp1s0

Similarly, you an modify the egrep accordingly if you want to view wifi and ethernet adapters and exclude any bridge or virtual adapters

# ls /sys/class/net|egrep -v "^v|^b|lo"
eno1
wlp3s0

This entry was posted in Linux, Networking and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *