ifup / ifdown eth0 / eno1 reports unknown interface when it exists!
li {list-style-type:decimal;}.wiz-editor-body ol.wiz-list-level2 > li {list-style-type:lower-latin;}.wiz-editor-body ol.wiz-list-level3 > li {list-style-type:lower-roman;}.wiz-editor-body blockquote {padding: 0 12px;}.wiz-editor-body blockquote > :first-child {margin-top:0;}.wiz-editor-body blockquote > :last-child {margin-bottom:0;}.wiz-editor-body img {border:0;max-width:100%;height:auto !important;margin:2px 0;}.wiz-editor-body table {border-collapse:collapse;border:1px solid #bbbbbb;}.wiz-editor-body td,.wiz-editor-body th {padding:4px 8px;border-collapse:collapse;border:1px solid #bbbbbb;min-height:28px;word-break:break-word;box-sizing: border-box;}.wiz-hide {display:none !important;}
-->
try use :
sudo ifconfig eth0 up/down
reseaon:
sudo ifdown eno1 or sudo ifup eno1, will not work because eno1 is not explicitly defined inside /etc/network/interfaces file.
So ifup | ifdown | ifquery family of functions is pretty unaware of what is inside the system unless this is written inside /etc/network/interfaces, but they could be since they all depend internally on ip¹ command.
It is more secure to use the sudo ifconfig eno1 down or sudo ifconfig eno1 up.
Note: There are couple things sudo ifconfig eno1 down or sudo ifconfig eno1 up will not do comparing to sudo ifdown eno1 and sudo ifup eno1. ifup and ifdown will keep the state of interfaces inside /run/network/ifstate so ifstate command can tell you the state of the interface. And one another thing, if you ifup or ifdown the interface, the scripts inside /etc/network/if-*.d will run (if-down.d if-post-down.d if-pre-up.d if-up.d)
ifup / ifdown eth0 / eno1 reports unknown interface when it exists!的更多相关文章
- VM克隆之后启动eth0找不到eth0:unknown interface:no such device
问题出现:VMware 克隆之后,ifconfig命令执行找不到eth0,报错 eth0:unknown interface:no such device 是因为/etc/sysconf/networ ...
- centos MAC 地址与报错eth0 unknown interface no such device
eth0 unknown interface no such device 出现这个原因是由于虚拟机直接COPY过来,MAC地址发生了变化,但eth0 里仍然记录着旧的MAC地址. 解决方法: vim ...
- ifup/ifdown
这两个程序其实是script而已,它会直接到 /etc/ sysconfig/network-scripts目录下搜索对应的配置文件,例如ifup eth0,它会找出ifcfg-eth0这个文件的内容 ...
- linux命令学习之:ifup/ifdown
ifup命令网络配置 ifup命令用于激活指定的网络接口.ifdown命令用于禁用指定的网络接口. 实时地手动修改一些网络接口参数,可以利用ifconfig来实现,如果是要直接以配置文件,亦即是在 / ...
- ifup,ifdown命令详解
基础命令学习目录首页 原文链接:https://www.cnblogs.com/jing99/p/7881779.html ifup命令网络配置 ifup命令用于激活指定的网络接口.ifdown命令用 ...
- linux命令(14):ifup/ifdown/ip addr命令
开启网卡:ifup eth0 关闭网卡:ifdown eth0 查看网卡接入状态:ip addr[可查看哪块网卡up/down状态]
- ifup/ifdown ethX 和 ifconfig ehtX up/down的区别
相同点:[启用]和[禁止]网卡 ifup ethX 和 ifconfig ethX up 用来启用网卡设备 ifdown ethX 和 ifconfig ethX ...
- ifup&&ifdown --- 激活/关闭指定的网络接口。
ifup命令用于激活指定的网络接口. ifup eth0 #激活eth0 ifdown命令用于禁用指定的网络接口. ifdown eth0 #禁用eth0
- 执行ifconfig eth2 up命令报错eth2: unknown interface: No such device的解决思路
排查问题思路 一般出现这种状况都是网卡mac地址错误引起的!要么网卡配置文件中的mac地址不对,要么/etc/udev/rules.d/70-persistent-net.rules文件中的mac地址 ...
随机推荐
- layer_mobile的简单使用
layer mobile弹层组件是为移动设备(手机.平板等webkit内核浏览器/webview)量身定做的弹层UI. 由于是采用原生 JavaScript编写,所以并不依赖任何第三方库. layer ...
- 杭电OJ第11页2010-2019道题(C语言)
2010. 水仙花数 问题描述 Problem Description 春天是鲜花的季节,水仙花就是其中最迷人的代表,数学上有个水仙花数,他是这样定义的: "水仙花数"是指一个三位 ...
- Andrew Ng机器学习第三章——线性回归回顾
一些概念: 向量:向量在矩阵中表示为只有一列的矩阵 n维向量:N行1列的矩阵. 利用矩阵计算可以快速实现多种结果的计算. 如下图,给出四个房子大小的样本,有四个假设函数对房子价格进行预测.构造下面的矩 ...
- PKUWC 2018 铁牌记
Day –INF: 联赛后根据分数一部分人继续停课.由于本蒟蒻撞上了狗屎运,联赛分数还行,可参加NOIWC和PKUWC,故继续停课训练.期间补全了一堆知识点,并成功翘掉期末考.(然而该还的还是要还的, ...
- Machine learning 第8周编程作业 K-means and PCA
1.findClosestCentroids function idx = findClosestCentroids(X, centroids) %FINDCLOSESTCENTROIDS compu ...
- HBase定期备份
转载一份使用Export与Import定期备份的Python代码.每月15日做一次完整备份,每天进行一次增量备份. import time import datetime from datetime ...
- 【Tomcat】使用记录
同时绑定ipv4和ipv6 <Connector port="8080" protocol="HTTP/1.1" connectionTimeout=&q ...
- @JsonView注解的使用
看到一个新的注解以前没有用过,记录一下使用方法. 注意是:com.fasterxml.jackson.annotation.JsonView @JsonView可以过滤pojo的属性,使Control ...
- 搭建安卓开发环境 hello world andriod
万事开头能嘛.先要搭建开发环境,主要用到java,会java的同学福音啊. 一 相关下载 1.Jdk.(java的开发环境). http://www.oracle.com/technetwork/j ...
- tomcat启动(Ⅶ)请求处理--Processor.process(SocketWrapper<S> socketWrapper)
tomcat启动(六)Catalina分析-StandardServer.start() 上一篇分析到:Http11NioProcessor.process(SocketWrapper<S> ...