[Linux] Ubuntu Netplan Network Configuration

Source: Internet
Author: User

Ubuntu Netplan Network Configuration

Today, the Ubuntu 18LTS Ifupdown has been replaced by Netplan (5) on the This system when you configure the network.
Jot down the Netplan configuration.

    • Vim/etc/network/interfaces modified the network configuration found Ubuntu 18LTS Ifupdown have been replaced by Netplan (5) on the This system.
# ifupdown has been replaced by netplan(5) on this system.  See# /etc/netplan for current configuration.# To re-enable ifupdown on this system, you can run:#    sudo apt install ifupdown
    • Directly configure the Netplan bar
vim /etc/netplan/50-cloud-init.yaml 配置如下:network:    ethernets:        enp4s0:            addresses: [192.168.0.20/24]  //IP址            gateway4: 192.168.0.1  // 网关            nameservers:             addresses: [114.114.114.114, 192.168.0.1] //DNS            dhcp4: no            optional: no    version: 2
    • Enable effective
sudo netplan apply

[Linux] Ubuntu Netplan Network Configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.