博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ifup / ifdown eth0 / eno1 reports unknown interface when it exists!
阅读量:4634 次
发布时间:2019-06-09

本文共 958 字,大约阅读时间需要 3 分钟。

 

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)

 

 

 

来源: 
 

转载于:https://www.cnblogs.com/jins-note/p/10153153.html

你可能感兴趣的文章
ASP.NET MVC 4 (十三) 基于表单的身份验证
查看>>
day3----编码-集合-深浅copy-文件操作-函数初识
查看>>
linux下find命令的使用和总结
查看>>
数据结构-线性表的顺序结构
查看>>
微信第三方平台开发 - 常见问题汇总
查看>>
[Poj2096]Collecting Bugs(入门期望dp)
查看>>
ATM交换机 和普通交换机区别
查看>>
Java基础(七)--Exception异常处理
查看>>
Gym 101845(2018 ACM-ICPC, Universidad Nacional de Colombia Programming Contest)
查看>>
Charles抓取https请求
查看>>
LAMP环境搭建
查看>>
C语言的变量的内存分配
查看>>
clientcontainerThrift Types
查看>>
链接全局变量再说BSS段的清理
查看>>
hdu 1728 逃离迷宫
查看>>
HTML5与CSS3权威指南之CSS3学习记录
查看>>
docker安装部署
查看>>
AVL树、splay树(伸展树)和红黑树比较
查看>>
多媒体音量条显示异常跳动
查看>>
运算符及题目(2017.1.8)
查看>>