How to check my IP address on Ubuntu 20.04 Focal Fossa Linux

The objective of this tutorial is to learn how to identify internal and external IP address on Ubuntu 20.04 Focal Fossa Linux.

In this tutorial you will learn:

  • How to check local internal IP address
  • How to check external IP address

How to check IP address on Ubuntu 20.04 Focal Fossa Linux

How to check internal IP address on Ubuntu 20.04 Focal Fossa Linux using ip command

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Installed Ubuntu 20.04 or upgraded Ubuntu 20.04 Focal Fossa
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

How to check my IP address on Ubuntu 20.04 step by step instructions

How to check my internal IP address

  1. The first and easiest method on how to check the internal IP address is by using the ip command. To do so simply open terminal window execute the following command:
    $ ip a
    

    Search the above ip command output and look for your network interface name and assigned IP address.

  2. From the Settings navigate to Network and click the appropriate gear wheel icon of your network connection to reveal your internal IP address

    From the systems Settings navigate to Network tab and click the appropriate gear wheel icon of your network connection to reveal your internal IP address.



How to check my external IP address

  1. To check your external IP address first make sure that the curl command is installed. To do open the terminal window and execute the following:
    $ sudo apt install curl
    
  2. Once ready check your external IP address by entering the following command:
    $ curl -w "\n" -s https://api.ipify.org