ubuntu22.04 固定ip配置

cat /etc/netplan/01-network-manager-all.yaml

# Let NetworkManager manage all devices on this system
network:
  ethernets:
    enp0s8:
      addresses: [10.0.20.47/24]
      dhcp4: false
      optional: true
      gateway4: 10.0.20.1
      nameservers: 
        addresses: [8.8.8.8,114.114.114.114]
  version: 2
  renderer: NetworkManager

你可能感兴趣的:(others,linux)