Categories: Ubuntu

How to reload /etc/network/interfaces in Ubuntu 22.04?

Many times, while working with any system on a network, multiple network issues can arise where a user is required to reload the network/interface. In Linux-based systems such as Ubuntu usually, terminal commands are used to perform operations. So, if while working on the terminal you want to reload the network/interface to resolve the network-related issues in your system, then this article will help you with that.

Follow this article’s guide to reload etc/network/interfaces in Ubuntu 22.04.

Reload /etc/network/interfaces in Ubuntu 22.04

To reload /etc/network/interfaces in Ubuntu, there are three ways:

Method 1: By Using Network Manager

In Ubuntu, network manager is the default network configuration tool and with the help of it, you can configure network interfaces on the system. So, reloading the network manager on the Ubuntu system will automatically reload the etc/network/interfaces.

There are different command to reload Network Manager on Ubuntu system, which are discussed below

Command 1

Since, network manager service runs in the background on Debian, so restarting the service through the below-given command will eventually reload the etc/network/interfaces on the system:

sudo systemctl restart NetworkManager.service

Command 2

You can also apply the following command to reload the etc/network/interfaces on Debian.

sudo systemctl restart NetworkManager

Command 3

The Debian user can apply the following command too to reload etc/network/interfaces using Network Manager.

sudo systemctl reload NetworkManager

Command 4

Instead of systemctl, you can use the service command to reload the network interfaces on Ubuntu.

sudo service NetworkManager reload

After running any of the above network-manager commands, your Ubuntu system’s network/interfaces will reload/restart within a few seconds.

Method 2: By Using nmcli

The other method is by using the nmcli command, which is a command line tool to control network managers. It can also be used to view the network status through the terminal by running the below-written command:

To reload the network interfaces, you must turn off the networking by using the below-mentioned nmcli command:

nmcli networking off

And after a few seconds turn the networking on by using the below-mentioned command to successfully reload the network interfaces.

nmcli networking on

Method 3: By Using systemd-networkd

In Ubuntu, another service which is present and manages the network is systemd-networkd. This service works mostly for configuring network devices in Ubuntu but it can also be used to reload /etc/network/interfaces by following the below-mentioned syntax:

sudo systemctl restart systemd-networkd.service

Conclusion

To reload /etc/network/interfaces in Ubuntu, there are three ways: one is by using network-Manager, the second is by using the “nmcli” command and the third is by using systemd-networkd. The commands and details for each of these methods are discussed in the above guidelines.

Ubuntu Server Admin

Recent Posts

Predict, compare, and reduce costs with our S3 cost calculator

Previously I have written about how useful public cloud storage can be when starting a…

5 days ago

One Thread to Poll Them All: How a Single Pipe Made WaterDrop 50% Faster

This is Part 2 of the "Karafka to Async Journey" series. Part 1 covered WaterDrop's…

5 days ago

A year of documentation-driven development

For many software teams, documentation is written after features are built and design decisions have…

6 days ago

Announcing FIPS 140-3 for Ubuntu Core22

With the release of the FIPS 140-3 certified cryptographic modules for Ubuntu 22.04 LTS, Canonical…

7 days ago

The foundations of software: open source libraries and their maintainers

Open source libraries are repositories of code that developers can use and, depending on the…

1 week ago

From inspiration to impact: design students from Regent’s University London explore open design for their dissertation projects

Last year, we had the opportunity to speak at Regent’s UX Conference (Regent’s University London’s…

2 weeks ago