Locating Network Configuration Information from the Command Line

45 minutes
  • 4 Learning Objectives

About this Hands-on Lab

Being able to find and understand network configuration information is fundamental to using Linux on a network. In this hands-on lab, we will determine the network configuration for the eth0 interface of the lab host.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Determine the IP Address
  1. Run the following command:
    sudo ip addr show
  2. Note the IPv4 and IPv6 addresses in the output.
Determine the MAC Address
  1. Run the following command:
    sudo ip addr show
  2. Note the MAC address in the output.
Determine the Gateway
  1. Show the routing table.
    sudo ip route show
  2. Note the gateway in the output.
Determine the DNS Server
  1. Show the DNS nameserver:
    cat /etc/resolv.conf | grep nameserver
  2. Note the DNS server in the output.

Additional Resources

You have been provided a public IP for a Linux Academy lab server. You need to determine the following:

  • IP address
  • MAC address
  • Gateway
  • DNS server

Note: Please wait an additional 2-3 minutes before connecting to the server via ssh.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?