The purpose of this tutorial is to show to use the Ubuntu ip command to see information about the local IP address, default gateway, and DNS servers on Ubuntu 20.04 Focal Fossa Linux.
It’s possible on Ubuntu to get IP address from command line or from GUI. We will cover the step by step instructions for both methods below.
In this tutorial you will learn:
- How to find local IP address with Ubuntu ip command
- How to check for default gateway
- How to display DNS server IP address
- How to display MAC 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|
|Other||Privileged access to your Linux system as root or via the
|Conventions||# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
How to find my IP address on Ubuntu 20.04 step by step instructions
Ubuntu get ip address command line
- To check for your internal IP address execute the following command:
$ ip a
Locate the requested network interface and check for assigned IP address. Additionally, the above command also reveals the network interface hardware address a.k.a MAC address.
- To check for currently used DNS server IP address execute:
$ systemd-resolve --status | grep Current
- To display default gateway IP address run:
$ ip r
Check for internal network configuration from GUI
To check for the internal IP address, default gateway, MAC address and DNS server settings on Ubuntu 20.04 Focal Fossa desktop first open
Settings and click on
Network menu and hit the gear wheel of the desired network interface.
In this tutorial, we saw how to get network information from command line and GUI on Ubuntu 20.04 Focal Fossa Linux. Such information includes the IP address, MAC address, default gateway, and DNS server IP addresses that are configured for the system.