How to Restart Networking in Ubuntu

The Network Stack Reset Vector

When operating a bare-metal Ubuntu Linux server architecture, the network interface card (NIC) is governed by a complex stack of daemons: the physical hardware driver, the NetworkManager service, the DHCP client, and the DNS resolver. If this stack enters a corrupted state — due to a failed DHCP lease renewal, a botched VPN configuration, or a rogue firewall rule — the server will lose all network connectivity. SSH sessions will freeze, web servers will become unreachable, and DNS queries will time out. Simply unplugging the Ethernet cable is mathematically useless if the software stack itself is corrupted. You must instruct the core UNIX kernel to execute a hard restart of the entire networking daemon, forcing it to drop all active connections, release the current DHCP lease, re-negotiate a fresh IP assignment from the router, and rebuild the routing table from scratch.

How to Restart Networking in Ubuntu

The Linux architecture provides multiple execution pathways depending on the Ubuntu version and the active networking daemon (NetworkManager for desktop installations, systemd-networkd or netplan for server installations).

1. Open your terminal application or connect to the server via an alternative access method (e.g., physical console or IPMI/iDRAC).
2. Method 1: The NetworkManager Restart (The Desktop Vector):
* If your Ubuntu installation uses NetworkManager (standard on Ubuntu Desktop).
* Type exactly:
sudo systemctl restart NetworkManager
* Press Enter.
* The Mathematical Result: systemd executes a hard SIGTERM against the active NetworkManager process, drops all connections (your SSH session will briefly die if remote), and spawns a pristine new instance that re-negotiates the DHCP lease.
3. Method 2: The Netplan Apply (The Modern Server Vector):
* If your Ubuntu Server uses netplan (the default on Ubuntu Server 18.04+).
* Type exactly:
sudo netplan apply
* Press Enter. The kernel re-reads the YAML configuration files in /etc/netplan/ and applies the changes without a full daemon restart.
4. Method 3: The Interface Toggle (The Surgical Strike):
* If you only need to reset a single specific interface (e.g., eth0 or ens33) without disrupting other connections.
* Type the following two commands sequentially:
sudo ip link set ens33 down
sudo ip link set ens33 up
* The kernel violently de-energizes and then re-energizes the specific physical or virtual adapter, forcing a complete link re-negotiation.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.