方案二 $ networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 2 enp96s0f0 ether no-carrier configuring 3 enp96s0f1 ether routable configured
3 links listed.
# 看到 enp96s0f0 无法配置,那么就在配置文件里帮它配置上 $ vi /etc/netplan/01-netcfg.yaml
# This file describes the network interfaces available on your system # For more information, see netplan(5). network: version: 2 renderer: networkd ethernets: enp96s0f0: # device name optional: true # 加上这行 enp96s0f1: addresses: [ 192.168.1.100/24 ] gateway4: 192.168.1.1 nameservers: addresses: - "192.168.1.1"