virtualbox ubuntu 18.04网络设置

1. virtualbox 设置

设置->网络->网卡1:

设置->网络->网卡2:

2.ubuntu 设置动态ip

可以了解下 lshw,netplan,ipconfig

ipconfig -a 查看所有网卡,
lshw -c network -short

H/W path    Device      Class       Description
===============================================
/0/100/3    enp0s3      network     82540EM Gigabit Ethernet Controller
/0/100/8    enp0s8      network     82540EM Gigabit Ethernet Controller

sudo /vim/etc/netplan/50-cloud-init.yaml

network:
    ethernets:
        enp0s3:
            addresses: []
            dhcp4: true
            optional: true
        enp0s8:
            addresses: []
            dhcp4: true
            optional: true

    version: 2

重启.

转载于:https://blog.51cto.com/searchcoding/2137349

你可能感兴趣的:(virtualbox ubuntu 18.04网络设置)