ubuntu 16.04 重命名网卡(ens33)
来源:互联网 发布:高端人群社交软件 编辑:程序博客网 时间:2024/06/05 23:10
Just after the Ubuntu 16.04 installation, I came to know that the network interface name got changed to ens33 from old school eth0. If you ever interested in changing interface names to old type ethX, here is the tutorial for you.
As you can see in the following command, my system is having a network adapter called ens33.
$ ip a1: lo: <loopback,up,lower_up> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever2: ens33: <broadcast,multicast,up,lower_up> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 00:0c:29:05:a3:e2 brd ff:ff:ff:ff:ff:ff inet 192.168.12.12/24 brd 192.168.12.255 scope global dynamic ens33 valid_lft 1683sec preferred_lft 1683sec inet6 fe80::20c:29ff:fe05:a3e2/64 scope link valid_lft forever preferred_lft forever
From the dmesg command, you can see that the device got renamed during the system boot.
$ dmesg | grep -i eth[ 3.050064] e1000 0000:02:01.0 eth0: (PCI:66MHz:32-bit) 00:0c:29:05:a3:e2[ 3.050074] e1000 0000:02:01.0 eth0: Intel(R) PRO/1000 Network Connection[ 3.057410] e1000 0000:02:01.0 ens33: renamed from eth0
To get an ethX back, edit the grub file.
$ sudo nano /etc/default/grub
Look for “GRUB_CMDLINE_LINUX” and add the following”net.ifnames=0 biosdevname=0“.
From:
GRUB_CMDLINE_LINUX=""
To:
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"
Generate a new grub file using the following command.
$ sudo grub-mkconfig -o /boot/grub/grub.cfgGenerating grub configuration file ...Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.Found linux image: /boot/vmlinuz-4.4.0-15-genericFound initrd image: /boot/initrd.img-4.4.0-15-genericFound memtest86+ image: /memtest86+.elfFound memtest86+ image: /memtest86+.bindone
Edit the interface file and change the network device name so that you will have a static ip address for ethX.
If your network card is DHCP enabled, you can skip the below step
$ sudo nano /etc/network/interfaces
From:
auto ens33iface ens33 inet static address 192.168.12.12 netmask 255.255.255.0 dns-nameservers 192.168.12.2 gateway 192.168.12.2
To:
auto eth0iface eth0 inet static address 192.168.12.12 netmask 255.255.255.0 dns-nameservers 192.168.12.2 gateway 192.168.12.2
Reboot your system.
$ sudo reboot
After the system reboot, just check whether you have an ethX back.
$ ip a1: lo: <loopback,up,lower_up> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever2: eth0: <broadcast,multicast,up,lower_up> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 00:0c:29:05:a3:e2 brd ff:ff:ff:ff:ff:ff inet 192.168.12.12/24 brd 192.168.12.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::20c:29ff:fe05:a3e2/64 scope link valid_lft forever preferred_lft forever
That’s All, drop your thoughts in the comments section.
- ubuntu 16.04 重命名网卡(ens33)
- Ubuntu 网卡接口重命名
- 修改网卡ens33为eth0
- Ubuntu 16.04 ifconfig输出ens33,不能联网问题的解决
- ens33网卡没有IP地址的解决方案
- Linux网卡重命名
- Ubuntu 16.04 配置网卡
- 大数据第一天:修改网卡名由ens33改成eth0
- rh436 - 网卡重命名/网卡绑定(rhel5.5)
- Linux 下网卡重命名
- Linux 下网卡重命名
- linux(centos) 网卡重命名
- ubuntu 桌面重命名
- ubuntu下的重命名
- Ubuntu移动、重命名文件
- ubuntu 文件重命名
- Ubuntu下重命名文件
- Ubuntu 重命名文件
- ffmpeg 命令行实现多路视频拼接播放
- pycharm 有些库(函数)没有代码提示
- SO_REUSEADDR 套接字选项应用实例
- mysql 隔离级别
- CCF NOI1034 钞票兑换
- ubuntu 16.04 重命名网卡(ens33)
- MFC按钮着色
- 栈与队列的基本操作
- lincRNA和microRNA
- 换零钱问题
- 斯坦福CS20SI:基于Tensorflow的深度学习研究课程笔记,Lecture note2:TensorFlow Ops
- boost库使用
- 直接播放amr格式文件的js工具:amrnb
- 4-7 统计某类完全平方数 (20分)