Shell/Bash: netplan file ubuntu Example

By

Shell/Bash Example: This is the "netplan file ubuntu" Example. compiled from many sources on the internet by SimpleTutorials.org

netplan file ubuntu

# sudo su
# cp /etc/netplan/01-netcfg.yaml /etc/netplan/01-netcfg.yaml.bak

# nano /etc/netplan/01-netcfg.yaml

#configuration example
network:
    ethernets:
        ens33:
            dhcp4: true
            optional: true
        ens34:
            dhcp4: false
            addresses: [192.168.231.3/24]
            gateway4: 192.168.231.50
            nameservers:
               addresses: [192.168.231.50, 8.8.8.8]
        ens35:
            dhcp4: true
    version: 2

# netplan try
# netplan apply


* Summary: This "netplan file ubuntu" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!

Others