linux重新启动网络_如何在Linux上启动,停止,重新启动网络?

  • Post author:
  • Post category:linux


linux重新启动网络

linux重新启动网络

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.

我已经更改了网络配置,并希望重新启动以使更改生效。 或者我的网络存在一些问题,我认为重新启动它可以解决我的问题。 在这里,我们将研究如何在各种网络发行版(如Ubuntu,Debian,Fedora,CentOS)中重新启动网络服务。

获取网络服务状态

(

Get Status Of Network Service

)

We will get status of network with the following command.

我们将使用以下命令获取网络状态。

Debian,Ubuntu,Kali

(

Debian, Ubuntu, Kali

)

For

deb

based distributions we will use

init.d

system. We will provide

status

option to the

networking

script.

对于基于

deb

的发行版,我们将使用

init.d

系统。 我们将为

networking

脚本提供

status

选项。

$ /etc/init.d/networking status
Get Status Of Network
Get Status Of Network
获取网络状态

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

正如我们看到的那样,网络服务从给定日期开始处于活动状态。 其PID为897。

CedOS的Fedora

(

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.

对于CentOS,RedHat,Fedora等发行版,我们将使用

systemctl

命令。 我们将提供选件

status



network

,这是网络服务。

$ system