Easy Steps To Restart Network on Ubuntu 24/22/20

This guide intends to show you How To Restart Network on Ubuntu server from the CLI. You can use this guide for Ubuntu 20.04, Ubuntu 22.04, or Ubuntu 24.04.

Every computer is connected to some other computer through a network, whether internally or externally, to exchange some information. This network can be small, as some computers are connected in your home or office, or it can be large or complicated, as in large universities or the entire Internet.

The system/network administrator maintains a system’s network, which includes network configuration and troubleshooting. If a problem occurs with the network, then the easy treatment is to restart the network. To restart Networking on your Ubuntu server, follow the steps below on the Orcacore website.

Steps to Restart Network on Ubuntu

To complete this guide, you must log in to your server as a root or non-root user with sudo privileges. Then, proceed to the next steps to restart networking on Ubuntu using Linux Commands.

You can easily restart your Network by using the NetworkManager, systemd, and nmcli. Let’s see how to do that.

1. Restart Network with NetworkManager

NetworkManager is a program for providing detection and configuration for systems to automatically connect to networks.

To restart networking, you can easily run the following command:

sudo service network-manager restart

2. Restart Network with systemd

systemd is a Linux initialization system and service manager that includes features like on-demand starting of daemons, mount and automount point maintenance, snapshot support, and processes tracking using Linux control groups. systemd provides a logging daemon and other tools and utilities to help with common system administration tasks.

You can easily restart networking on your Ubutnu server by using the command below:

sudo systemctl restart NetworkManager.service

3. Restart Network with Nmcli Command

nmcli is a command-line tool for controlling NetworkManager and reporting network status.

To restart your Networking on Ubuntu, you need to turn off and turn back on the network:

# sudo nmcli networking off
# sudo nmcli networking on

Also, you can use other commands to restart your Network.

4. Restart Network with ifup and ifdown Commands

ifup activates a network interface, making it available to transmit and receive data.

The ifdown command disables a network interface, placing it in a state where it cannot transmit or receive data.

To use them on your Ubuntu server, you need to install them by using the command below:

sudo apt update && sudo apt install ifupdown -y

Then, you can use the following commands to turn off the network and turn it back on:

sudo ifdown -a && sudo ifup -a

Another way that you can use to restart your Network on Ubuntu is to use the IP command.

5. Restart Network with IP Command

The ip command is a Linux net tool for system and network administrators.

To restart your network, find the target network interface by using the command below:

ip link show
Restart Network on Ubuntu with ip command

Here the eth0 is our target. You can easily restart your Network interface on Ubuntu by using the commands below:

# sudo ip link set eth0 down
# sudo ip link set eth0 up

That’s it, you are done.

Conclusion

Restarting the network on Ubuntu is done to apply changes to network settings, refresh connections, fix connectivity issues, or reset network services after modifications like IP address changes or DNS updates. At this point, you have learned to restart the Network or Networking on your Ubuntu server from CLI.

Hope you enjoy it. Please follow us on Facebook, Instagram, and YouTube.

You may also like these articles:

Manage Networking with Netplan on Debian / Ubuntu

Disable NetworkManager on AlmaLinux 8

Monitor Linux Network Bandwidth Usage with nload Command

Share your love

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!