To Find the IP Address of a specific network interface on Linux, use the following command,
sudo ip addr show enp0s32: 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 10.0.2.15/24 brd 10.0.2.255 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 10.0.2.15 and an ipv6 address of fe80::a00:27ff:fe45:4e87
No comments:
Post a Comment