Displaying interface IP information
Displaying interface information is a common task on a Linux workstation. This is especially true if your host adapter is set to be automatically configured, for instance using Dynamic Host Configuration Protocol (DHCP) or IPv6 autoconfiguration.
As we discussed, there are two sets of commands to do this. The ip
command allows us to display or configure your host's network parameters on new operating systems. On old versions, you will find that the ifconfig
command is used.
The ip
command will allow us to display or update IP addresses, routing information, and other networking information. For instance, to display current IP address information, use the following command:
ip address
The ip
command supports command completion, so ip addr
or even ip a
will give you the same results:
robv@ubuntu:~$ ip ad 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link...