Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

ubuntu server 20.04 ip configuration static

#go to file name can vary
sudo nano /etc/netplan/01-netcfg.yaml
# edit to
network:
  ethernets:
    enp0s3:
      dhcp4: false
      addresses: [192.168.50.195/24]
      gateway4: 192.168.50.254
      nameservers:
        addresses: [8.8.8.8]
#save
#apply with
sudo netplan apply
 
PREVIOUS NEXT
Tagged: #ubuntu #server #ip #configuration #static
ADD COMMENT
Topic
Name
4+1 =