How to Find Local / Public IP Address in Ubuntu 20.04

Last updated: July 27, 2020

This is a step by step beginner guide shows how to check local network IP and public IP in both IP4 and IPv6 via either graphical interface or Linux commands in Ubuntu 20.04.

1. Find IP address via System Settings:

For the default Gnome desktop, you can check the wireless network IP address via:

  • Open Settings and navigate to Wi-Fi in left pane.
  • Click on the gear icon after the connected wifi network.
  • In the pop-up it shows the detailed information including your IP address.

To check the wired network IP address, do:

  • Open Settings and navigate to Network in left pane.
  • Click on the gear icon under connected wired network.
  • In the pop-up it shows the detailed information including your IP address.

2. Check Local IP address via ifconfig command:

While wired network name is usually eth0, eth1, eno1, wireless network name is usually wlan0, wlan1, wlo1, …

For other desktops or Ubuntu server without an UI, you can run ifconfig command to find your IP.

ifconfig

If the command does not exit, run command to install it: sudo apt install net-tools

3. Check Local IP address via ip command:

There’s another command looks more straightforward. Simply run:

ip address

4. Check Your Public IP address:

You can search your public ip via Google or other web search engine. If you don’t have a web browser or you’re on Ubuntu server, following commands will tell the public IP.

ifconfig will tell the public IP if you are not behind a router.

Or you can run command in console:

curl https://ipinfo.io/ip

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee: https://ko-fi.com/ubuntuhandbook1

2 responses to How to Find Local / Public IP Address in Ubuntu 20.04

  1. curl command did it, thanks!

  2. Hello, I would like to know about the server IP or host IP. I’m using oracle VM and installed Ubuntu 20.04 new version and there I need to use openstack but for some reason I can’t install openstack, every time it gets error or not getting host ip or server ip. So if you can help me or show me the whole process from installing Ubuntu and openstack that will be great.