Ashari Abidin's Developer Docs

Ubuntu Network Configuration

Network Troubleshooting Guide Linux

CLI diagnostic & recovery
12 structured steps — from status check to system reboot
Troubleshooting quick reference
#StepMain command
1Check network statusnmcli device status
2Restart NetworkManagersudo systemctl restart NetworkManager
3Verify service is activesystemctl status NetworkManager
4Rescan Wi-Finmcli device wifi rescan
5List available Wi-Finmcli device wifi list
6Reconnect to Wi-Finmcli device wifi connect "SSID" password "PASS"
7Restart LAN interfacesudo ip link set enp3s0 down/up
8Renew DHCP leasesudo dhclient -r && sudo dhclient
9Disable airplane modesudo rfkill unblock all
10Check adapter detectionlspci | grep -i network
11Check network error logsjournalctl -u NetworkManager -n 50
12Reboot systemsudo reboot
1

Check network status

nmcli device status
Displays list of network devices and their status (connected/disconnected/unavailable).
2

Restart NetworkManager

sudo systemctl restart NetworkManager
Restarts NetworkManager service to resolve temporary conflicts.
3

Verify service is active

systemctl status NetworkManager
Ensures the service is running normally (active/running).
4

Rescan Wi-Fi

nmcli device wifi rescan
Performs a fresh Wi-Fi scan (takes a few seconds).
5

List available Wi-Fi

nmcli device wifi list
Shows detected SSIDs along with signal strength.
6

Reconnect to Wi-Fi

nmcli device wifi connect "YOUR_SSID" password "YOUR_PASSWORD"
Replace YOUR_SSID and YOUR_PASSWORD with your actual network credentials.
7

Restart LAN interface

sudo ip link set enp3s0 down
sudo ip link set enp3s0 up
Replace enp3s0 with your interface name (check using ip link).
8

Renew DHCP lease

sudo dhclient -r
sudo dhclient
Renews IP address from DHCP server (release and request new IP).
9

Disable airplane mode

rfkill list
sudo rfkill unblock all
Ensures airplane mode is off and all radios (Wi-Fi/Bluetooth) are active.
10

Check adapter detection

lspci | grep -i network
lsusb
Verifies the network device is detected by the system (PCI for internal, USB for dongles).
11

Check network error logs

journalctl -u NetworkManager -n 50 --no-pager
Shows the latest 50 lines of NetworkManager logs (errors/warnings).
12

Reboot if still failing

sudo reboot
Final step if all previous methods fail to restore connectivity.
Linux Network Troubleshooting Guide | Red Edition
Back