Linux_Networking_restart network on Ubuntu

The following commands will assist you with network restart procedure on Ubuntu 16.04 Xenial Xerus Linux. We will start with the most recommended commands and move down to more obscure or obsolete commands in case the above commands will fail from some reason. Let‘s begin with system and service manager by using systemctl command to restart network service:

$ sudo  systemctl restart NetworkManager.service

Next command service will restart a relevant networking System V init script:

$ sudo service network-manager restart

The following command nmcli is a command-line tool for controlling NetworkManager which will restart the Network Manager directly:

$ sudo nmcli networking off
$ sudo nmcli networking on

The old fashion way using System V init scripts directly is still available on Ubuntu 16.04 Xenial Xerus Linux:

$ sudo /etc/init.d/networking restart
OR
$ sudo /etc/init.d/network-manager restart

In the last example we will restart the netowrk interface directly using ifup and ifdown commands. Note the -a option instructs ifup and ifdown commands to restart all available network interfaces marked "auto":

$ sudo ifdown -a
$ sudo ifup -a
时间: 2024-08-08 19:02:03

Linux_Networking_restart network on Ubuntu的相关文章

CentOS Ubuntu网络配置

CentOS网络配置 开启网络功能#vi /etc/sysconfig/network重要参数:        NETWORKING=yes            要不要有网络        NETWORKING_IPV6=no        是否支持 IPv6        HOSTNAME=主机名 网卡的配置文件 相关的网络配置文件和目录:    /etc/sysconfig/network-scripts/        存放网卡的配置文件的目录    以/etc/sysconfig/ne

ubuntu WiFi: operation not possible due to RF-kill《转载》

Some people have been experiencing WiFi problems with Ubuntu 10.10 since an update that happend just before Christmas 2010. The problem seems to be a bug in a kernel module, which prevents the rfkill's soft and hard block from syncing correctly. In p

Jetson TX1 install py-faster-rcnn

Install py-faster-rcnn following the official version https://github.com/rbgirshick/py-faster-rcnn Build the Cython modules cd $FRCN_ROOT/lib make Errors: Traceback (most recent call last): File "setup.py", line 58, in <module> CUDA = loca

linux下网络配置 命令

一.IP的配置: 不直接修改文件方式: 设置网卡eth0的IP地址和子网掩码: sudo ifconfig eth0 192.168.2.1 netmask 255.255.255.0 将IP地址改为:192.168.2.1,子网掩码改为:255.255.255.0 设置网关: sudo route add default gw 192.168.2.254 手动修改文件方式: 第一(二)块网卡的配置文件: /etc/sysconfig/network-scripts/ifcfg-eth0 (不同

ubuntu14.04设置静态ip

转自:http://www.cnblogs.com/vincedotnet/p/4013099.html 1. 找到文件并作如下修改: sudo vim /etc/network/interfaces 修改如下部分: auto eth0iface eth0 inet staticaddress 192.168.0.117gateway 192.168.0.1 #这个地址你要确认下 网关是不是这个地址netmask 255.255.255.0network 192.168.0.0broadcast

ubuntu-network网卡设置

最近ubuntu一直没办法访问某个固定的ip,192.168.8.200,根本就ping不上,但是其他的却可以,如192.168.209.然后同时帮忙解决了问题,具体如下 查看网卡信息 [email protected]7817:~$ ifconfig eth0 Link encap:Ethernet HWaddr 44:8a:5b:d3:5e:a5 inet addr:192.168.8.201 Bcast:192.168.11.255 Mask:255.255.252.0 inet6 add

Linux tgtadm: Setup iSCSI Target ( SAN )

Linux target framework (tgt) aims to simplify various SCSI target driver (iSCSI, Fibre Channel, SRP, etc) creation and maintenance. The key goals are the clean integration into the scsi-mid layer and implementing a great portion of tgt in user space.

Linux操作总结

1 vi编辑器 2 文件操作 2.1 删除文件 2.2 查看文件 2.3 创建文件夹 2.4 查看文件权限 2.5 复制文件 2.6 移动 3 查看cpu信息 4 查询进程命令 5 查看日志 6 压缩与解压缩     1 vi编辑器 操作描述 退出命令,输入: 按esc进入命令模式 退出命令 q 退出不保存 q! 保存退出 wq 输入 a 从光标所在位置后面输入字符 I 从光标所在位置前面输入字符 删除 dd 删除行 X 删除选中的字符 换行 O 在光标所在行下面新增一行并进入输入模式 O 在光

Linux下永久修改主机名

红帽系列的Linux发行版主机名存放位置是/etc/sysconfig/network,Ubuntu Linux主机名存放位置是/etc/hostname,所以只要修改主机名存放文件便可以永久的修改计算机名 以CentOS为例,可以使用hostname命令查看当前的主机名,通过vim /etc/sysconfig/network打开network文件 更改HOSTNAME的值即可,修改完成保存退出 重新启动系统修改即可生效