Steps to restart network services in Linux ?

Sometimes, when you changed the network configuration or due to some network problems, you may need to restart the network services again on your Linux system to solve your problem. 

Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform Linux Network related queries.

In this context, we shall look into how to restart the networking services on in different Linux distributions (Ubuntu, Debian, LinuxMint and CentOS) by using the command line. 


How to know network Service Status in Linux ?

You can get the network services running status by using the following command.


For latest (Ubuntu/Debian/Mint):

To check the networking services are running on your system or not, by using the following 'systemctl' command you can view the networking service status on your Ubuntu/Debian/Mint system:

$ sudo systemctl status networking

Or

$ sudo systemctl status networking.service

You can also display the networking service status by using the service command which is given as follows:

$ sudo service networking status

Or

$ /etc/init.d/networking status

For CentOS 8 / Fedora:

If you are using CentOS 8 then you can check the network service status by using the following command:

# systemctl status network

If you received an error like 'network.service unit not found' then, you will run the following command to start the network manager:

# systemctl start NetworkManager

Now, start the network services and you can get network status by using the above-mentioned command.


How to Stop Network Services ?

You can stop your network services through the method which is mentioned below. But, if you have a remote connection with SSH, we are not recommended you to stop the service because it may create problems.


For Ubuntu/Debian/Mint:

You can use the 'stop' option with the above 'networking' command on Ubuntu, Debian, Kali, Mint distributions in order to stop network services.

$ sudo /etc/init.d/networking stop

Or

$ sudo systemctl stop networking.service

For CentOS 8/Fedora:

In CentOS 8, using the following command you can stop network services:

# systemctl stop network

Now, if you will check the network status you will see that network services are stopped on your system.


How to Start Network Service ?

If networking services are stopped on your system then, you start these services on the Linux system.


For Ubuntu/Debian/Mint:

You can also start the network services by using the service command. Use 'start' option to start the network service on your Ubuntu. Debian and LinuxMint distributions.

$ sudo service networking start

Or

$ sudo systemctl start networking.service

Or

$ $ sudo /etc/init.d/networking start


For CentOS 8/Fedora:

In CentOS 8, by using the following command you can start the network service on your system:

systemctl start network


How to Restart Network Service ?

You can also restart the network service by using the following command on Linux distributions:


For Ubuntu/Debian/Mint:

Type the following command to restart the network service on Ubuntu, Debian, and Linux Mint:

$ /etc/init.d/networking restart

Or

$ sudo systemctl restart networking.service

Or

$ sudo systemctl restart networking


For CentOS 8/Fedora:

Use the following command to restart the network service on CentOS 8:

# systemctl restart network

If you get the following error on the terminal then, you need to start the NetworkManager services on your system by using the following command:

# systemctl start NetworkManager

Now, again restart the network service. 


[Need urgent help to configure your Linux Server? We are available.]

This article will guide you on how to start, stop, and restart the #network service on different Linux distribution like Ubuntu, #Debian, Linux Mint, and CentOS 8. Moreover, you can troubleshoot the network #error through the #NetworkManager tool on #CentOS 8.

Please don't stop services if you have a remote ssh connection that may create a problem.

Restarting networking on a desktop machine will cause dbus and a bunch of #service to stop and never be started again, usually leading to the whole system being unusable.

To restart a Linux service:

1. Linux provides fine-grained control over system services through #systemd, using the systemctl command.

2. To verify whether a service is active or not, run this command: sudo systemctl status apache2.

3. To stop and restart the service in Linux, use the command: sudo systemctl restart SERVICE_NAME.

Related Posts