marcus-g
6/23/2017 - 7:13 PM

List only the names of all network interfaces, while omitting the loopback 'lo' interface.

List only the names of all network interfaces, while omitting the loopback 'lo' interface.

# list the names of all network interfaces
ifconfig -a | sed 's/[ \t].*//;/^$/d'

# list all network interfaces' names omitting 'lo'
ifconfig -a | sed 's/[ \t].*//;/^\(lo\|\)$/d'