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
Software Requirements and Conventions Used
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
- 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. -
How to check my external IP address
- 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
- Once ready check your external IP address by entering the following command:
$ curl -w "\n" -s https://api.ipify.org