I have changed my network configuration and want to restart to make changes effective. Or there are some problems with my network and I think restarting it will solve my problems. Here we will look at how to restart networking service in various network distributions like Ubuntu, Debian, Fedora, CentOS.

Get Status Of Network Service

We will get status of network with the following command.

Debian, Ubuntu, Kali

For deb based distributions we will use init.d system. We will provide status option to the networking script.

$ /etc/init.d/networking status

Get Status Of Network

As we cab see that networking service is active from given date. Its PID is 897 .

Fedora, CentOS

For distributions like CentOS, RedHat, Fedora we will use systemctl command. We will provide the options status and network which is the networking service.

$ systemctl status network

Get Status Of Network

Stop Network Service

We can stop network like below. Bu keep in mind for remote connection it can be create problems with ssh

Ubuntu, Debian, Kali

We will use stop option with networking command in order to stop network services in Ubuntu, Debian, Kali, Mint etc.

$ sudo /etc/init.d/networking stop

Stop Network Service

Fedora,CentOS

We will use systemctl again with stop option which will stop network services. We also require root privileges that will beget with sudo command.

$ sudo systemctl stop network

Start Network

We can start network like below.

Ubuntu, Debian, Kali

We will provide start option in order to start network services in deb based distributions.

$ sudo /etc/init.d/networking start

Fedora,CentOS

We will use start network option in order to start network services in rpm based distributions.

$ sudo systemctl start network

Restart Network

Now we can restart our network or network services.

Ubuntu, Debian, Kali

$ /etc/init.d/networking restart

Fedora,CentOS

$ systemctl restart network