ubuntu server static ip address assignment

ubuntu server static ip address assignment

run the below script

sudo vi /etc/netplan/00-installer-config.yaml


#network:

#  ethernets:

#    enp0s3:

#     dhcp4: true

#  version: 2

  replace the above script by the below one by kipping the index

network:

  version: 2

  renderer: networkd

  ethernets:

    enp2s0f0:

      dhcp4: no

      addresses:

        - 172.22.27.134/24

      gateway4: 172.22.27.5

      nameservers:

          addresses: [172.22.186.7, 172.22.186.8]


after edit to save capital ZZ

then 

sudo netplan apply


source https://www.linuxtechi.com/assign-static-ip-address-ubuntu-20-04-lts/


important commands

insert    esc   i

save      esc ZZ   or :qw!

quite     :q!

Comments

Popular posts from this blog

To install .NET Framework 3.5

How to Format your USB drive with CMD

Local Server - 2 of 3 services running wamp server