Answers for "netplan file ubuntu"

2

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
Posted by: Guest on March-05-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language