How to show the ip address on Ubuntu 16.04?

To get the IP address on Ubuntu 16.04, you can use the following steps:

Open the terminal by pressing Ctrl+Alt+T.
Type the command “ip addr show” and press Enter.
Look for lines starting with “inet” and followed by an IP address; typically “inet” lines have an IP address for each network interface on your machine.
Your IP address will be listed next to “inet” on the interface you are using to connect to the internet.

1
2
3
4
5
6
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
inet 192.168.0.121/24 brd 192.168.0.255 scope global eth1
valid_lft forever preferred_lft forever

Note: you can also use the “ifconfig” command to get the IP address of your network interface, but this command is deprecated and not installed by default in Ubuntu 16.04.