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 addressTo 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.