Linux 修改网卡名称
2021/12/29 7:09:29
本文主要是介绍Linux 修改网卡名称,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
ifconfig ens36 down
ip link set ens36 name ens33
ifconfig ens33 up
如果没有ifconfig命令(CentOS)
yum install -y net-tools
查看所有网卡信息
ifconfig
查看网卡enp97s0f1的信息
ifconfig enp97s0f1
enp97s0f1 Link encap:Ethernet HWaddr b4:05:5d:4f:cc:c9
UP BROADCAST MULTICAST MTU:1500 Metric:1
修改网卡MAC
sudo ifconfig enp97s0f1 down
sudo ifconfig enp97s0f1 hw ether xx:xx:xx:xx:xx:xx
sudo ifconfig enp97s0f1 up
ifconfig enp97s0f1
enp97s0f1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
注意: 命令中的“hw”必须是小写,不能是大写“HW”
修改网卡名称
sudo ifconfig enp97s0f1 down
sudo ip link set enp97s0f1 name eth0
sudo ifconfig eth0 up
ifconfig
参考
修改Linux网卡名(非Udev且无需重启)
https://www.imooc.com/article/47661
linux网卡命名规则
https://blog.csdn.net/hzj_001/article/details/81587824
ubuntu16.04修改网卡名称enp2s0为eth0
https://blog.csdn.net/wenwenxiong/article/details/52937539
发布于 2021-02-19 22:23
这篇关于Linux 修改网卡名称的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-06-0600-macOS和Linux安装和管理多个Python版本
- 2024-03-30[译]漫画SELinux概念
- 2024-03-29linux 移动文件
- 2024-03-28linux .so file
- 2024-03-28Linux 磁盘管理
- 2024-03-28Linux学习笔记(十三)磁盘管理(一):磁盘分区
- 2024-03-26linux 创建 文件
- 2024-03-25使用SecureCRT对Linux vim进行颜色设置
- 2024-03-202019-2020-12 20199317 《Linux内核原理与分析》 第十二周作业
- 2024-03-20Linux运维的第二周总结