ubuntu linux nic name change



* MAC 주소 확인
$ lshw -C network
$ ifconfig 


* 변경 설정


/etc/netplan/50-cloud-init.yaml 파일 변경

cd /etc/netplan

- 백업
sudo cp 50-cloud-init.yaml 50-cloud-init.yaml.bak


- 수정
enp39s0 -> eth0 으로 변경

//-------------------------------------
network:
    version: 2
    ethernets:
        eth0:
            dhcp4: true
            match:
                macaddress: <YOUR MAC ID HERE>
            set-name: eth0

//-------------------------------------
- 테스트
sudo netplan try

- 설정 적용
sudo netplan apply


//-------------------------------------
https://askubuntu.com/questions/1317036/how-to-rename-a-network-interface-in-20-04

반응형
Posted by codens


반응형