Ubuntu 20.04 网卡设置动态IP地址

vi /etc/netplan/01-netcfg.yaml
network:
  # renderer: NetworkManager
   ethernets:
    enp0s3:
     dhcp4: true


netplan apply


ifconfig