加载中......

ubuntu22.04修改IP地址

  1. 打开配置文件
    vim /etc/netplan/00-installer-config.yaml
    
  2. 修改配置文件
    # This is the network config written by 'subiquity'
    network:
      version: 2
      ethernets:
    	ens18:
    	  dhcp4: false
    	  addresses: [192.168.200.135/24]
    	  routes:
    		- to: default
    		  via: 192.168.200.1
    	  nameservers:
    		  addresses: [114.114.114.114, 223.5.5.5]
    
  3. 应用配置
    netplan apply
    
posted @ 2024-07-06 15:22  MarchXD  阅读(39)  评论(0编辑  收藏  举报