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

An article to bring you the principle and application of LDO

[[404648]] 01LDO Definition LDO, or low drop out ...

What exactly is BRAS?

Students who are good at English may be a little ...

6G is getting further and further away from us

Many years later, facing the tsunami-like surging...

Introduction and solution of TCP sticky packet and half packet (Part 1)

In network transmission, sticky packets and half ...

What is a Bluetooth gateway and how to use it?

What is a Bluetooth Gateway? A Bluetooth gateway ...

How will the two major operators' competition to upgrade IPv6 affect me?

On May 21, at the 2018 Global Next Generation Int...

Five reasons to upgrade your Wi-Fi router

Wi-Fi dramatically impacts everything from the se...

Wireless Broadband Alliance: Wi-Fi 6/6E adoption will reach 83% by 2022

[[429983]] A key finding from the latest cross-in...