Ubuntu18.04 Modify IP address « Zhaorong Tribe

Ubuntu18.04 Modify IP address

Time: May 13, 2023 Column: VPS Tutorial Author: Zhao Rong Click: 1530 times

 Proprietary computer room/advanced anti DDoS server/advanced anti DDoS VPS/American advanced anti DDoS/Los Angeles VPS/Los Angeles advanced anti DDoS server

My memory is getting worse and worse. It's a pure record. I've done it before and forgot it for a while. In addition, CentOS is my most commonly used one, but many friends prefer it ubuntu Or debian, meet one today ubuntu18.04 Change the IP address of the system's virtual machine. It is not good to change/etc/network/interfaces normally. It is recorded 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.

 ubuntu18-1

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

 ubuntu18

Modify the addresses and gateways in the file, save them after completion, and then sudo netplan apply the configuration.

 Advanced Defense VPS/Los Angeles Advanced Defense/Advanced Defense Server/20 year old computer room

Statement: Blogs are only for sharing information and are not recommendations. Websites do not participate in transactions and are not intermediaries. The content only represents personal views and is not authoritative. Readers should consider it and take their own risks! Every penny and every commodity is still the eternal truth. Juvenile readers (including physical and psychological) should visit this website with their guardians! This article is written by( Zhao Rong )Original compilation, reprint, please keep the link: Ubuntu18.04 Modify IP address The code is not easy, please do not copy or paste!
About using: This website mainly shares server and VPS information, and does not provide any product sales or purchase. All visitors please purchase and use products within the scope of national laws and regulations. QQ group discussion: 683851361
About safety: Any IDC has the possibility of going bankrupt and running away. The host line is even more uncontrollable. Monthly payment and backup are your best choices. Please keep good and regular backup habits

 hostyun  locvps

Advertise