Menu
User

DropVPS Team

Writer: Cooper Reagan

How to restart network service in linux

How to restart network service in linux

Publication Date

06/28/2025

Category

Articles

Reading Time

2 Min

Table of Contents

Restarting the network service is essential when making changes to IP, DNS, or interface configurations. The command differs based on the Linux distribution and the network manager used.

For Systemd-Based Systems (Ubuntu 18.04+, Debian 10+, CentOS 7+)

Restart the NetworkManager service:

sudo systemctl restart NetworkManager

Or restart the generic networking service:

sudo systemctl restart networking

Check the service status:

sudo systemctl status NetworkManager

For Older Ubuntu/Debian (Without systemd)

Use the service command:

sudo service networking restart

Or bring interfaces up/down manually:

sudo ifdown eth0 && sudo ifup eth0

Note: replace eth0 with your actual interface name (ip a to list).

For RHEL/CentOS without NetworkManager

Use the network service:

sudo systemctl restart network

If it fails, make sure you’re not using NetworkManager at the same time. You can disable it:

sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager

Then enable and start network:

sudo systemctl enable network
sudo systemctl start network

For Netplan (Ubuntu 20.04+)

If you’re using Netplan (common on newer Ubuntu versions), apply changes like this:

sudo netplan apply

If network goes down and doesn’t recover, reboot:

sudo reboot

Reloading DNS Only (Optional)

If you’re only updating DNS, restart systemd-resolved:

sudo systemctl restart systemd-resolved

You can also flush the DNS cache:

sudo resolvectl flush-caches
Linux VPS
U
Loading...

Related Posts