« Back to Networking: Frequently Asked Questions

How to see the the network IP address of your system

How to see the network IP address of your system on Linux?

Run the ip command to see network details and use the 'address' subcommand to see specifically the IP addresses that are defined.

ip address

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

    Related articles

    Like to learn more? Here is a list of articles within the same category or having similar tags.

    Feedback

    Small picture of Michael Boelen

    This article has been written by our Linux security expert Michael Boelen. With focus on creating high-quality articles and relevant examples, he wants to improve the field of Linux security. No more web full of copy-pasted blog posts.

    Discovered outdated information or have a question? Share your thoughts. Thanks for your contribution!

    Mastodon icon