- Debian10 修改网卡ens33为eth0,而且修改网卡ip为静态ip
- 编辑文件引导文件
# vi /etc/default/grub 初始值 GRUB_CMDLINE_LINUX="" 修改为 GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"
- 重新生成一个开机文件引导文件,重启服务器
# grub-mkconfig -o /boot/grub/grub.cfg # reboot
- 修改网卡配置地址
# vi /etc/network/interfaces
a)如果是dhcp自动配置
原始值 auto ens33 iface ens33 inet dhcp 修改为 auto eth0 iface eth0 inet dhcp
b)如果是static手动配置
原始值 auto lo iface lo inet lookback auto ens33 iface ens33 inet static address 192.168.1.122 netmask 255.255.255.0 gateway 192.168.1.2 修改为 auto lo iface lo inet lookback auto eth0 iface eth0 inet static address 192.168.1.122 netmask 255.255.255.0 gateway 192.168.1.2
4.重启网卡
# systemctl restart networking
- 编辑文件引导文件
相关文章
暂无评论...