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.
Viewing Network Details (Command Line)
Section titled “Viewing Network Details (Command Line)”The command line offers powerful tools for network inspection.
Using ip command
Section titled “Using ip command”The ip command is the modern tool for managing network interfaces.
To show all network interfaces and their IP addresses:
ip addr showOr, for a specific interface (e.g., eth0 for wired, wlan0 for wireless):
ip addr show eth0To show the routing table (including the default gateway):
ip route showUsing 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 statusTo show detailed information about a specific device (e.g., eth0):
nmcli device show eth0This output will include IP addresses, gateway, DNS servers, and more.
Checking DNS Resolution
Section titled “Checking DNS Resolution”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.confA more reliable way with systemd-resolved is:
resolvectl statusTesting Network Connectivity
Section titled “Testing Network Connectivity”The ping command is used to test connectivity to another host on the network or internet.
ping google.comPress 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.