Made changes to the network config and need to apply them without rebooting. Or the internet dropped after an update and you want to reset the network without touching the system. Or an SSH connection broke and you need to figure out why. There are several ways to restart the network in Ubuntu, and each fits a different situation.
Important Before You Run Anything
Restarting the network over SSH drops the current connection. If you are connected to a server remotely — two options:
Option 1. Apply changes to a specific interface only (not the whole stack) so the connection is not interrupted — covered below in the ip section.
Option 2. Wrap the command in a delay using at or sleep — gives time to reconnect before the change applies:
echo "sudo systemctl restart networking" | at now + 1 minute
systemctl: Primary Method for Modern Ubuntu
Ubuntu 20.04, 22.04, and 24.04 use systemd. Restart the networking service:
sudo systemctl restart networking
Stop and start separately:
sudo systemctl stop networking
sudo systemctl start networking
Check status after restart:
sudo systemctl status networking
If output shows active (running) — network is working. If failed — check logs:
journalctl -u networking --since "5 minutes ago"
NetworkManager: For Desktops and GUI Servers
On most desktop Ubuntu installations the network is managed by NetworkManager, not networking.service. Restart NetworkManager:
sudo systemctl restart NetworkManager
Alternative via nmcli — turn network stack off and on:
sudo nmcli networking off
sudo nmcli networking on
After nmcli networking off the network icon disappears from the panel and returns within a second. This is a soft approach — connections are recreated without fully restarting the daemon.
Restart a specific connection by name:
nmcli connection show
sudo nmcli connection down "Wired connection 1"
sudo nmcli connection up "Wired connection 1"
Netplan: Ubuntu 18.04 and Newer
Ubuntu 18.04+ uses Netplan. If configs live in /etc/netplan/ — apply changes without restarting services:
sudo netplan apply
Check the configuration for errors before applying:
sudo netplan try
netplan try applies the config for 120 seconds — if you do not confirm by pressing Enter, everything rolls back automatically. Useful when not sure the config is correct.
ip link: Restart a Specific Interface
The most surgical method — bring only the needed interface down and up without touching others. Useful over SSH: you can restart an interface that is not used for the current connection.
List interfaces:
ip link show
Bring interface down:
sudo ip link set enp3s0 down
Bring it back up:
sudo ip link set enp3s0 up
If IP did not come up automatically — request via DHCP:
sudo dhclient enp3s0
ifup / ifdown: Old Method via /etc/network/interfaces
On systems where network is configured through /etc/network/interfaces (Ubuntu 16.04 and older servers):
Bring all interfaces down:
sudo ifdown -a
Bring all interfaces up:
sudo ifup -a
Specific interface only:
sudo ifdown eth0
sudo ifup eth0
On modern Ubuntu 22.04 and 24.04 the /etc/network/interfaces file is usually empty — management has moved to Netplan. If ifup reports no configuration found — that is expected.
If Network Did Not Come Up After Restart
Check current interfaces and their state:
ip addr show
Verify the routing table:
ip route
Check DNS resolver:
systemd-resolve --status | grep "DNS Servers"
Ping the gateway:
ping -c 4 $(ip route | grep default | awk '{print $3}')
Check NetworkManager logs:
journalctl -u NetworkManager --since "10 minutes ago"
Which Method to Choose
| Situation | Command |
|---|---|
| Desktop Ubuntu, NetworkManager | sudo systemctl restart NetworkManager |
| Server, config in /etc/netplan/ | sudo netplan apply |
| Server, config in /etc/network/interfaces | sudo systemctl restart networking |
| Restart one interface only | ip link set enp3s0 down && ip link set enp3s0 up |
| Soft reset via nmcli | nmcli networking off && nmcli networking on |
| Apply and auto-rollback if broken | sudo netplan try |