ubuntu18.04 set a static IP

 

ubuntu18 and ubuntu14,16 set up different static ip local method, many people do not read when updating documents tend to set a static ip address is not successful, the following are specific setting method

Be sure to confirm before making their own versions of operating systems, each version of the method is sometimes completely different set

 

sudo vim /etc/netplan/*.yaml

yaml file a different name, here at a regular match

Before modifying the configuration file so the default is to obtain ip address dhcp

Modified content below, save and exit

sudo netplan apply

Execution is completed terminal will be dropped, because ip address has been replaced

This time domain is not accessible, you need to configure DNS

As Figure: manually specify the DNS

carry out!

 

Guess you like

Origin www.cnblogs.com/fjzhang/p/11240458.html