Ubuntu 22.04 设置静态IP

ubuntu 22.04 setting static ip

Posted by BlueFat on Thursday, March 23, 2023
cat /etc/netplan/00-installer-config.yaml 
# This is the network config written by 'subiquity'
network:
  ethernets:
    ens160:
      dhcp4: false
      addresses: 
        - 192.168.77.3/24
    ens192:
      dhcp4: false
      addresses: 
        - 119.38.120.107/27
      nameservers:
        addresses: 
          - 223.5.5.5
      routes:
        - to: default
          via: 119.38.120.1
  version: 2
netplan apply