ubuntu修改IP地址

vim /etc/netplan/00-installer-config.yaml
network:
  ethernets:
    ens33:
      addresses:
      - 192.168.2.201/24
      nameservers:
        addresses:
        - 223.5.5.5
        search: []
      routes:
      - to: default
        via: 192.168.2.1
  version: 2
sudo netplan apply
sudo netplan help | apply | generate | get | info | ip | set | rebind | try

你可能感兴趣的:(ubuntu,linux,服务器)