码迷,mamicode.com
首页 > Web开发 > 详细

Linux_Networking_restart network on Ubuntu

时间:2017-08-03 22:09:20      阅读:236      评论:0      收藏:0      [点我收藏+]

标签:comm   command   rip   and   too   next   restart   service   most   

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

Linux_Networking_restart network on Ubuntu

标签:comm   command   rip   and   too   next   restart   service   most   

原文地址:http://www.cnblogs.com/tlfox2006/p/7281561.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!