Computer Tips - Linux: View network interfaces that are up (on my Linux box)

Date: 2008jun19 Update: 2026oct30 OS: Linux Language: mixed Q. Linux: View network interfaces that are up (on my Linux box) A. Run the `ifconfig` command with no options:
ifconfig
Example output:
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet (redacted) netmask 255.255.255.0 broadcast (redacted) ether (redacted) txqueuelen 1000 (Ethernet) RX packets 18464497 bytes 13103435506 (12.2 GiB) RX errors 0 dropped 54584 overruns 0 frame 0 TX packets 10962719 bytes 24888773302 (23.1 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 4334 bytes 463900 (453.0 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 4334 bytes 463900 (453.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wg0: flags=209<UP,POINTOPOINT,RUNNING,NOARP> mtu 1420 inet (redacted) netmask 255.255.255.0 destination (redacted) unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 12 dropped 0 overruns 0 carrier 0 collisions 0 wlp3s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether (redacted) txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
For more info: http://en.wikipedia.org/wiki/Ifconfig On Windows the ipconfig (notice the seconds letter is P) command does nearly the same thing. If your distro is using Network Manager you can do:
nmcli device
Example output: See also: http://www.davekb.com/search.php?target=wireshark http://www.davekb.com/search.php?target=lsof http://www.davekb.com/search.php?target=netstat