ubuntu22.04修改IP地址

MarchXD發表於2024-07-06
  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
    

相關文章