How to Restart the Network Manager in Ubuntu

If your Ubuntu server suddenly drops its internet connection, or if you have just manually edited a critical DNS configuration file (like /etc/resolv.conf or your Netplan settings), those changes will not take effect immediately. The Linux operating system will continue using the old network configurations until the core networking service is forced to reload.

Instead of completely rebooting the entire server—which forces all your websites and databases to go offline unnecessarily—you can gracefully restart the Network Manager service directly from the terminal. This applies the new settings in less than a second.

How to Restart NetworkManager Using systemctl

Modern versions of Ubuntu (16.04 and newer) utilize systemd as the core init system. This means you will use the systemctl command to control all background services, including the networking daemon.

  1. Open your terminal or SSH into your Ubuntu server.
  2. Type the following command and press Enter:
sudo systemctl restart NetworkManager

Because you are modifying a core system service, you must use sudo (superuser do). The terminal will ask you to type your administrator password. When you type your password, the characters will remain invisible on the screen—this is a normal Linux security feature. Press Enter when finished.

The terminal will pause for about one second and then return a blank prompt. It will not output a “Success” message. A blank prompt in Linux generally indicates that the command executed flawlessly.

How to Verify the Network Manager Status

If your network is still not behaving correctly after the restart, you need to check if the Network Manager actually successfully rebooted, or if it crashed due to a syntax error in your configuration files.

To check the exact health and status of the service, run:

sudo systemctl status NetworkManager

The terminal will output a large block of text. You are looking for a line near the top that says Active: active (running) in green text. If the text says “failed” or “dead” in red text, it means your configuration file contains an error, and the network manager refused to start.

(Note: The status command will keep your terminal locked in a text-viewer mode. Press the q key on your keyboard to quit the viewer and return to your normal command prompt).

An Alternative Method: The ‘nmcli’ Tool

If you prefer using the dedicated Network Manager Command Line Interface (nmcli) rather than relying on the broader systemctl tool, you can achieve the exact same result by turning the entire networking stack off and back on again.

sudo nmcli networking off

Followed immediately by:

sudo nmcli networking on

Warning: If you are managing your Ubuntu server remotely via an SSH connection, do NOT use the nmcli networking off command. The moment you press Enter, the server will drop its internet connection, your SSH session will instantly disconnect, and you will not be able to send the “on” command to bring it back online. Always use systemctl restart for remote servers.

Get the best tech tips delivered straight to your inbox.

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