Ubuntu NIC ens로 변경된 interface 이름 eth로 변경하기

Ubuntu NIC ens로 변경됨

Ubuntu NIC 이름이 ubuntu 16 버전 이상부터 NIC (network interface) 이름이 eth가 아닌 ens로 변경되어 나타난다.
그것도 0 이나 1로 시작하는게 아니라 뜸금 5부터 시작하는 경우가 대부분 이다.

이전처럼 eth0, eth1.. 순서로 사용을 하는것이 편하다면 interface 이름을 변경 하는것이 가능 하다.

$ sudo nano /etc/default/grub  파일을 열고 
GRUB_CMDLINE_LINUX="" 부분을 차자 아래와 같이 수정 한다.

GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"

그리고 아래의 명령어를 사용하여 grub 파일을 새로 만들어 준다.

$ sudo grub-mkconfig -o /boot/grub/grub.cfg Generating 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-generic Found initrd image: /boot/initrd.img-4.4.0-15-generic Found memtest86+ image: /memtest86+.elf Found memtest86+ image: /memtest86+.bin done

$ sudo nano /etc/network/interfaces 파일을 열고 수정을 한다.

auto eth0 
iface eth0 inet dhcp

auto eth1
iface eth1 inet dhcp

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!
%d bloggers like this: