HomeLinuxDebainDebian / Ubuntu Linux...

Debian / Ubuntu Linux restart network interface

In this article, we will see How to restart Network Interface in Debian and Ubuntu. We can restart the networking service in Linux using various command. Use the following commands as per your Linux distribution to restart the networking service. You must run the command as root user either using sudo or su commands. The ifup command bring a network interface up. The ifdown command take a network interface down.

Use the following command to find out if you are using systemd networkd service, or networking or NetworkManager as service name with the systemd:

systemctl list-unit-files --type=service --state=enabled
systemctl list-unit-files --type=service --state=enabled | grep network

Here is what I see on Debian Linux version 12 (systemd-networkd.service is the active service name):

systemd-network-generator.service enabled enabled
systemd-networkd-wait-online.service enabled disabled
systemd-networkd.service enabled enabled

Hence, the command to restart depends upon your version of Debian Linux. The latest version of Debian or Ubuntu Linux distro with systemd networkd service can use the following command:

sudo systemctl restart systemd-networkd.service
sudo systemctl status systemd-networkd.service

Debian/Ubuntu Linux with networking services, run:

sudo systemctl restart networking
sudo systemctl status networking

The latest version of Ubuntu or Debian service name changed to NetworkManager. Hence, use the systemctl command as follows:

sudo systemctl restart NetworkManager
sudo systemctl status NetworkManager

On older (pre systemd) restart network interface, enter:

sudo /etc/init.d/networking restart

- A word from our sponsors -

spot_img

Most Popular

More from Author

How To Install aaPanel on Ubuntu Ubuntu 22.04.5 LTS

Managing a server can be a daunting task, especially for those...

How To Install Fail2Ban on Ubuntu 24.04.2 LTS

Introduction Any service that is exposed to the Internet is at risk...

How to Install Webmin on Debian 12

Introduction Are you searching for a step-by-step guide to install Webmin on...

How To Install ISPConfig Control Panel on Ubuntu 22.04

The main task of a Linux system administrator revolves around monitoring...

- A word from our sponsors -

spot_img

Read Now

How To Install aaPanel on Ubuntu Ubuntu 22.04.5 LTS

Managing a server can be a daunting task, especially for those who are not well-versed in command-line interfaces. Fortunately, control panels like aaPanel simplify this process significantly. This article provides a comprehensive guide on how to install aaPanel on Ubuntu 24.04 LTS, ensuring you have a powerful...

How To Install Fail2Ban on Ubuntu 24.04.2 LTS

Introduction Any service that is exposed to the Internet is at risk of malware attacks. For example, if you are running a service on a publicly available network, attackers can use brute-force attempts to sign in to your account. Fail2ban is a tool that helps protect your Linux machine...

How to Install Webmin on Debian 12

Introduction Are you searching for a step-by-step guide to install Webmin on Debian 12? This simple tutorial is for you! Webmin is a free, open-source web-based control panel that simplifies Linux server management right from your browser. Its intuitive dashboard lets you handle various configurations, including user accounts, disk...

How To Install ISPConfig Control Panel on Ubuntu 22.04

The main task of a Linux system administrator revolves around monitoring the Linux system hardware and software, performing installations and upgrades while maintaining all the essential services and applications. In many scenarios, these activities are executed via the command line. This is mainly because the command line(server...

Installing Let’s Encrypt Free SSL Certificate on iRedMail

In our previous guides, we saw how one can install and configure iRedMail Server. The default installation of iRedMail generates and install a self-signed SSL certificate for Mails services – POP3/IMAP/SMTP over TLS and for HTTPS access to webmail services. When using a self-signed certificate, you’ll often get...

APT sources.list entries for every Debian release

/etc/apt/sources.list entries for every Debian release since Wheezy, including archived releases Debian uses APT as package installation and update manager. This also applies to a distribution (release) upgrade. Usually not much changes in the APT configuration, except the code name. But sometimes, the /etc/apt/sources.list file needs some adjustments...

Install iRedMail on Debian 12

What is iRedMail? iRedMail is a shell script that automatically installs and configures all necessary mail server components on your Linux/BSD server, thus eliminating manual installation and configuration. With iRedMail, you can easily create unlimited mailboxes and unlimited mail domains in a web-based admin panel. Mailboxes can be...

VirtualBox : Advanced Features and Practical Use

When using a traditional you need to install the operating system on a physical machine for evaluating software that cannot be installed on your current operating system. Oracle VirtualBox is what you need in this case, instead of reinstalling software on your physical machine. VirtualBox is designed...

Configuring a Static IP address on your Ubuntu (24.04, 24.10+) Server

To configure a static IP address on Ubuntu Server 24.10, follow these simple steps. Step 1 : Update and Install net-tools First, update your server and install the net-tools package, which includes essential networking utilities like ifconfig. sudo apt update sudo apt install net-tools Step 2 : Check Ethernet Interfaces Use the ifconfig...

Parrot virtualbox install and erorrs kernel

Option 1: Blacklist Many distros use a module blacklist to disallow module loading. Normally this can be done by adding these lines to your distro's modules.conf or similar. You might try reading man modules.conf or googling for directions for your specific distribution. blacklist kvm_intel blacklist kvm Option 2: Unload An alternative is...