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 mobile network is accelerating and may be commercially available in 2019

As the demand for mobile networks continues to ex...

What does a 5G network look like? A simple article to understand

[[311978]] Whether it is 2G, 3G, 4G or 5G, the mo...

5G means data center platforms must evolve

The foundation for seamless 5G implementation 5G ...

What is Intelligent Edge Computing?

You’ve heard of edge computing. You may have even...

A brief introduction to spatial transformer networks

The first model I got to implement as part of my ...

Under the epidemic, IDC companies have no right to complain

At present, with the effective and orderly implem...

IoT and 5G are changing the world

By 2025, there will be 5 billion cellular-connect...