Ubuntu 18.04 changes the IP address

Ubuntu 18.04 changes the IP address

My memory is getting worse and worse, just recording it. I have done it before, but forgot it after a while. In addition, I use CentOS most often, but many friends prefer Ubuntu or Debian. Today I encountered a cloud host with Ubuntu 18.04 system that changed its IP. The normal change of /etc/network/interfaces did not work. I record it here to avoid the trouble of going to Bing every time.

Ubuntu 18.04 uses Netplan to configure IP addresses, so you need to modify the /etc/netplan/* file.

The above picture shows the modification of /etc/network/interfaces. After the completion of the restart, the new IP is not accessible. Use the ifconfig command to check that it is still the old IP. Next, modify the yaml file under /etc/netplan/. The file name may be different.

Correct the addresses and gateway in the file, save it after completion, and then use sudo netplan apply to apply the configuration.

<<:  RackNerd "Memorial Day" Sale: Los Angeles VPS from $14.99 per year

>>:  SmartHost: AMD Ryzen series 35% off, starting at $2.57/month, Los Angeles/New Jersey/Las Vegas data centers

Recommend

5G Thinking丨Please give 5G some tolerance and time

[[400629]] Recently, 5G has become a hot topic on...

Imitate Spring to implement a class management container

Overview The original intention of the project wa...

Ethernet IP: Unlocking the power of high-speed data transmission

Ethernet IP has revolutionized the world of netwo...

The main problems facing 5G networks

5G networks are the next generation of wireless t...

Fiber pre-entry: A new strategy to accelerate FTTH deployment

With the progress and development of human societ...

If WeChat declines, who will replace it? Big guesses about the Internet in 2018

Where will the major domestic Internet companies ...

SKT launches online-only plans for 5G and 4G customers

South Korean telecom operator SK Telecom recently...

Do you understand the benefits of 5G? Learn about the pros and cons

We talk about 5G every day, but do you know what ...