How to Fix ‘Failed to start Network Manager’ in Ubuntu

Booting an Ubuntu desktop or server only to see the red systemd alert [FAILED] Failed to start Network Manager—accompanied by the complete loss of Wi-Fi, Ethernet, and DNS resolution—isolates the machine from local and remote networks. On modern Ubuntu distributions, NetworkManager is the system daemon that detects network hardware, manages link-layer interfaces, negotiates DHCP leases, and configures DNS resolvers. When NetworkManager fails to initialize, it typically indicates syntax formatting errors in Netplan YAML configuration files, corrupted runtime state databases in /var/lib/NetworkManager/, conflicts with systemd-networkd, or missing wireless firmware modules. This troubleshooting guide provides detailed command-line instructions to diagnose systemd failure logs and restore networking in Ubuntu.

What Triggers “Failed to start Network Manager”?

Initialization crashes in the NetworkManager daemon stem from configuration errors and service deadlocks:

  • Netplan YAML Syntax Errors: Improper indentation, tabs instead of spaces, or invalid interface keys in /etc/netplan/*.yaml.
  • Corrupted NetworkManager State Files: Malformed lease files or corrupted network profiles stored in /var/lib/NetworkManager/NetworkManager.state.
  • Dual Network Daemon Conflicts: Both systemd-networkd and NetworkManager attempting to manage identical physical network adapters simultaneously.
  • Missing MAC Address or Device Clashing: Cloned virtual machine images possessing identical MAC addresses or references to non-existent PCI network devices.
  • Interrupted Package Upgrades: A broken network-manager package installation following a system update crash.

Method 1: Inspect Journalctl Logs for the Exact Failure Reason

Querying the systemd journal reveals the exact line number or hardware error causing NetworkManager to terminate.

  1. Open your terminal (or switch to a TTY console using Ctrl + Alt + F3 if GUI networking is disabled).
  2. Query the NetworkManager service unit journal:
    sudo journalctl -u NetworkManager.service -b -e
  3. Inspect the recent error lines (highlighted in red). Look for errors such as:
    • “failed to load state file: invalid key”
    • “configuration error: Netplan schema invalid”
    • “failed to read connection profile”

Method 2: Remove Corrupted NetworkManager State and Lease Files

A corrupted state file locks the daemon upon boot. Removing it forces NetworkManager to re-scan physical interfaces afresh.

  1. Stop the failing service:
    sudo systemctl stop NetworkManager
  2. Move the corrupted state file to a backup location:
    sudo mv /var/lib/NetworkManager/NetworkManager.state /var/lib/NetworkManager/NetworkManager.state.bak
  3. Clear stale DHCP lease caches:
    sudo rm -f /var/lib/NetworkManager/*.lease
  4. Restart NetworkManager:
    sudo systemctl start NetworkManager
  5. Verify the service status:
    sudo systemctl status NetworkManager

Method 3: Validate and Re-apply Netplan YAML Configurations

Ubuntu utilizes Netplan to orchestrate network renderers. Even a single misplaced space can cause NetworkManager to fail startup.

  1. Inspect the contents of your Netplan configuration directory:
    ls -la /etc/netplan/
  2. Open your primary configuration file (e.g. 01-network-manager-all.yaml or 50-cloud-init.yaml):
    sudo nano /etc/netplan/01-network-manager-all.yaml
  3. Ensure standard desktop syntax with renderer: NetworkManager:
    network:
      version: 2
      renderer: NetworkManager
    Important: Never use tab characters in YAML files; use exactly 2 spaces per indentation level.
  4. Save and exit (Ctrl + O, then Ctrl + X).
  5. Validate and apply Netplan configurations:
    sudo netplan generate
    sudo netplan apply

Method 4: Resolve systemd-networkd and NetworkManager Clashes

Running two active network managers leads to race conditions over network interface control.

  1. Check if systemd-networkd is active:
    systemctl is-active systemd-networkd
  2. On Ubuntu Desktop systems managed by NetworkManager, disable systemd-networkd:
    sudo systemctl stop systemd-networkd
    sudo systemctl disable systemd-networkd
  3. Restart NetworkManager:
    sudo systemctl restart NetworkManager

Ubuntu Network Manager Diagnostic Matrix

Journalctl Error Message Underlying Cause Direct Fix
failed to load state file Corrupted /var/lib/NetworkManager/NetworkManager.state Delete or rename state file and restart service
Invalid YAML at /etc/netplan/.. Syntax error or tab indentation in Netplan file Fix indentation using spaces; run sudo netplan apply
Unit is masked NetworkManager service was administratively masked Run sudo systemctl unmask NetworkManager
No Wi-Fi adapter found Missing proprietary Linux firmware driver Install linux-firmware and dkms modules for Wi-Fi chipset

Frequently Asked Questions

How can I connect to the Internet if NetworkManager is completely broken?

You can temporarily establish network connectivity using the standard ip and dhclient command-line utilities. For wired Ethernet, run:

sudo ip link set eth0 up
sudo dhclient eth0
Once connected, you can update packages and reinstall NetworkManager.

How do I completely reinstall NetworkManager on Ubuntu?

With an active Internet connection, execute:

sudo apt-get install --reinstall network-manager
This restores all default configuration templates and systemd service descriptors.

Get the best tech tips delivered straight to your inbox.

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