Ubuntu重启网卡的三种方法

Linux重启网卡的三种方法:

一、network

利用root帐户

# service network restart或者/etc/init.d/networking restart

二、ifdown/ifup

# ifdown eth0
# ifup eth0

三、ifconfig

# ifconfig eth0 down
# ifconfig eth0 up

Ubuntu14.04修改配置,重启网卡没有生效,出现如下问题:

service  networking restart //重启网络服务
stop: Job failed while stopping
start: Job is already running: networking

tail -f /var/log/upstart/networking.log //查看错误日志
Stopping or restarting the networking job is notsupported.
Use ifdown & ifup to reconfigure desired interface.

从以上日志内容可以看出,传统的service重启和停止网络已经不再支持了,需要通过使用ifdown &ifup来实现相应的操作。

重启指定网卡

ifdown eth0 && ifup eth0

给TA打赏
共{{data.count}}人
人已打赏
服务运维

Ubuntu18.04更新源为阿里云导致无法更新软件的问题

2023-4-8 21:40:48

服务运维

如何在Ubuntu 20.04上安装Plex Media Server

2023-6-1 11:13:24

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索