首页 > 编程知识 正文

ubuntuenseth0,ubuntu没有eth0设备

时间:2023-05-03 07:52:07 阅读:39769 作者:3021

更改ubuntu的eth0,eth1的顺序

15笑看风云网络知识

昨天用tar的方法把我的电脑恢复到了刚安装好的状态。 由于通过另一台电脑的备份进行了恢复,所以网络接口无论如何eth0都被上一台电脑的网卡占用,请进行修改,删除上一张网卡。

实际上修改很简单。 修改/etc/udev/rules.d/70 -持久性- net.rules文件即可。

70 -持续- net.rules主要包括以下内容:

# thisfilewasautomaticallygeneratedbythe/lib/udev/write _ net _ rules

# program,runbythepersistent-net-generator.rulesrulesfile。

#

# You can modify it,aslongasyoukeepeachruleonasingle

# line,andchangeonlythevalueofthename=key。

# PCI device0x 10 EC :/sys/devices/PCI 0000336000/00003360033601 c.0/000033601:00.0 (r 8169 ) ) )

SUBSYSTEM=='net ',ACTION=='add ',DRIVERS==? *,attr { address }==' 00:4 c 33603733600133604 c ',ATTR{dev_id}=='0x0',ATTR{type}=='1

# PCI device0x 80863360/sys/devices/PCI 0000336000/000033600033601 c.1/00000336014:00.0 (iwl 3945 () ) )

SUBSYSTEM=='net ',ACTION=='add ',DRIVERS==? *,attr { address }==' 00:1 f :3 c : be : a 1:3 e ',ATTR{dev_id}=='0x0',ATTR{type}=='1简单请查看ATTR{address}==之后的mac地址。 如果您是需要mac地址的网卡的mac,则可以将其删除或注销,并将注销后使用的网卡的NAME更改为NAME='eth0'。

之后,如果重新启动原来的eth1等,则变为eth0。

et_highlighter51

发表评论:

昵称

电子邮件地址(可选) ) ) )。

个人主页(选择填写) ) ) ) ) ) )。

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。