Skip to content

Ubuntu - Networking

Ubuntu - Networking Configuration and Information

Section titled “Ubuntu - Networking Configuration and Information”

Ubuntu provides both graphical and command-line tools to view and manage network settings. Understanding your network configuration is essential for connectivity and troubleshooting.

Viewing Network Details (Graphical Interface)

Section titled “Viewing Network Details (Graphical Interface)”

Step 1: Open Settings. Click the system menu in the top-right corner (which often shows network, volume, and power icons) and select ‘Settings’ or ‘Wired Settings’/‘Wi-Fi Settings’.

Alternatively, click ‘Show Applications’ and search for ‘Settings’.

Step 2: Navigate to the Network section. In the Settings window, find and click on ‘Network’ (for wired connections) or ‘Wi-Fi’ in the sidebar.

Step 3: View Connection Details. For an active connection, click the gear icon (⚙️) next to it. This will open a dialog showing details like:

  • IP Address (IPv4 and IPv6)
  • MAC Address (Hardware Address)
  • Default Route (Gateway)
  • DNS Servers

From this dialog, you can also modify settings, such as switching from DHCP to a static IP address (Manual configuration) under the ‘IPv4’ or ‘IPv6’ tabs.

The command line offers powerful tools for network inspection.

The ip command is the modern tool for managing network interfaces.

To show all network interfaces and their IP addresses:

ip addr show

Or, for a specific interface (e.g., eth0 for wired, wlan0 for wireless):

ip addr show eth0

To show the routing table (including the default gateway):

ip route show

Using nmcli (NetworkManager Command Line Interface)

Section titled “Using nmcli (NetworkManager Command Line Interface)”

NetworkManager is commonly used in Ubuntu Desktop. nmcli is its command-line client.

To show overall network status and devices:

nmcli device status

To show detailed information about a specific device (e.g., eth0):

nmcli device show eth0

This output will include IP addresses, gateway, DNS servers, and more.

To see which DNS servers your system is configured to use, you can check the content of /etc/resolv.conf (though this file is often managed by NetworkManager or systemd-resolved and might be a symbolic link).

cat /etc/resolv.conf

A more reliable way with systemd-resolved is:

resolvectl status

The ping command is used to test connectivity to another host on the network or internet.

ping google.com

Press Ctrl+C to stop pinging. If you get replies, your network connection and DNS resolution are likely working.

These tools provide comprehensive ways to inspect and manage your Ubuntu system’s network settings.