Set static IP and DNS configuration on ubuntu18.04.06

1.root permission;

2. Open 00-installer-config.yaml
and find the default network configuration file in the netplan directory. The file suffix is ​​.yaml.

vi /etc/netplan/00-installer-config.yaml

3. Modify the content as follows:

# This is the network config written by 'subiquity'
network:
  version: 2
  ethernets:

         ens36:
                 addresses: [192.168.0.223/24]
                 gateway4: 192.168.0.1
                 dhcp4: no
                 nameservers:
                         addresses: [192.168.0.1]

4. Save and exit, press: ESC -->:wq, and execute the restart network command netplan apply.

netplan apply

Guess you like

Origin blog.csdn.net/weixin_38090079/article/details/131708193
Recommended