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

重启.

相关文章

文章浏览阅读2.3k次,点赞4次,收藏22次。最近安装了CARLA预...
文章浏览阅读6.3k次,点赞5次,收藏15次。在清华镜像中下载U...
文章浏览阅读5k次。linux环境, python3.7.问题描述: 安装...
文章浏览阅读4.2k次,点赞4次,收藏17次。要安装这个 standa...
文章浏览阅读894次,点赞51次,收藏31次。在安卓使用vscode主...