You can list the available network interfaces on your system by viewing the contents of the /sys/class/net directory:
root@ubuntu-linux:~# ls /sys/class/net
eth0 lo wlan0
I have three network interfaces on my system:
-
eth0: The Ethernet interface
-
lo: The loopback interface
-
wlan0: The Wi-Fi interface
Notice that, depending on your computer's hardware, you may get different names for your network interfaces.
The ip command
You can also use the ip link show command to view the available network interfaces on your system:
root@ubuntu-linux:~# ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether f0:de:f1:d3:e1:e1 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu...