« Back to Networking: Frequently Asked Questions

How to see the the network IP address of your system

To see information about your IP address, use the ip command with the address subcommand. Use the shortened version ip a for quick access.

Output of ip

The ip command can show IP addresses, but will also include information like your MAC address, subnet, MTU, and status.

# ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether ab:cd:de:12:34:56 brd ff:ff:ff:ff:ff:ff
    altname enp0s18
    inet 192.168.1.100/24 brd 192.168.2.255 scope global ens18
       valid_lft forever preferred_lft forever
    inet6 fe80::be24:11ff:abde:1234/64 scope link 
       valid_lft forever preferred_lft forever

In this case the interface name is ens18 and the IP address is 192.168.1.100.

Learn more about ip

This article uses the ip command to achieve its tasks. For this popular tool there is a cheat sheet available!

» Mastering the tool: ip

ip cheat sheet

Other questions related to Networking

Feedback

Is the described answer not working or incorrect, got another tip or question? Share your thoughts!