Find the IP Address of a Specific Network Interface on Linux

Shahriar Shovon

Supported OS

  • All


Share this post with your friends

To Find the IP Address of a specific network interface on Linux, use the following command, sudo ip addr show enp0s3 2: enp0s3: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 08:00:27:45:4e:87 brd ff:ff:ff:ff:ff:ff inet brd scope global dynamic enp0s3 valid_lft 85650sec preferred_lft 85650sec inet6 fe80::a00:27ff:fe45:4e87/64 scope link valid_lft forever preferred_lft forever Here enp0s3 is the network interface that I want to see the address of. The output shows that, enp0s3 has an ipv4 address of and an ipv6 address of fe80::a00:27ff:fe45:4e87