2021年1月19日 星期二

Ubuntu 18.04 透過 netplan 設定網路卡 IP

cd /etc/netplan
vi 01-network-manager-all.yaml
# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    version: 2
    ethernets:
        eth0:
			dhcp4: yes
            nameservers:
              addresses: [8.8.8.8,8.8.4.4]

sudo netplan try

沒有留言:

張貼留言