


The commands below explicitly ignore this, but could be adapted quite easily to grab this information instead. If your system is configured to support IPv6 you'll see both the "dotted quad" as well as the IPv6 IP addresses in the ifconfig output.įor example: inet6 addr: fe80::226:c7ff:fe85:a720/64 Scope:Link For example if it's a wired NIC card, then it's likely eth0.Īlso these examples are returning the IPv4 address. Adjust this bit in the examples for your particular situation. The examples below assume that the network interface is a wireless card named wlan0.
