command :

cat /proc/net/dev | awk '{i++; if(i>2){print $1}}' | sed 's/^[\t]*//g' | sed 's/[:]*$//g'

Test output :

lo
eth0

explain :

(1) /proc/net/dev It's a way for users to read or change network adapters and statistics ;(2) awk '{i++; if(i>2){print $1}}' The command is to loop from the second line to get the first column of data ;(3) sed 's/^[\t]*//g' The command is to remove the space at the beginning of the line ;(4) sed 's/[:]*$//g' The command is to remove the ":" character .