The objective of this guide is to retrieve a local IP address, gateway and DNS server on Ubuntu 20.04 Focal Fossa Linux using both the graphical user interface and the terminal command line.

In this tutorial you will learn:
  • How to find local IP address
  • How to check for default gateway
  • How to display DNS server IP address
  • How to display MAC address
How to find my IP address, default gateway and DNS server on Ubuntu 20.04 Focal Fossa Linux from command line
How to find my IP address, default gateway, MAC address and DNS server on Ubuntu 20.04 Focal Fossa Linux from command line

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 find my IP address on Ubuntu 20.04 step by step instructions

Check for internal network configuration from command line


SUBSCRIBE TO NEWSLETTER
Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


  1. 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.
  2. To check for currently used DNS server IP address execute:
    $ systemd-resolve --status | grep Current
    
  3. To display default gateway IP address run:
    $ ip r
    

Check for internal network configuration from command line

How to find my IP address, default gateway and DNS server on Ubuntu 20.04 Focal Fossa desktop
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.
FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in:



Comments and Discussions