
ifconfig -a

Ubuntu 18.04 버전부터는 /etc/netplan/*.yaml 파일을 수정하여야 한다.
가상머신에서 다음 명령을 입력하여 해당 파일을 vi 에디터로 편집한다.
sudo vi /etc/netplan/*.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:
    ethernets:
        enp0s3:
            addresses: []
            dhcp4: true
        enp0s8:
            addresses: [192.168.56.100/24]
            gateway4: 192.168.56.1
            nameservers:
                    addresses: [8.8.8.8,8.8.4.4]
            dhcp4: no
            dhcp6: no
    version: 2
sudo netplan apply