网卡配置
网卡配置
Ubuntu
在 Ubuntu 中我们可以通过配置 /etc/netplan 来设置当前的网卡信息:
network:
  ethernets:
    eno1:
      addresses: [192.168.1.13/24]
      gateway4: 192.168.1.1
      dhcp4: true
      optional: true
      nameservers:
        addresses: [8.8.8.8, 8.8.4.4]
  version: 2
然后直接应用该配置:
$ netplan apply
