Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

ubuntu server set static ip

/* Manual Configuration */
#open the /etc/network/interfaces file
` vim /etc/network/interfaces`
#add
iface enp0s3 inet static
	address `your ip 10.0.1.20/24`
    gateway '10.0.1.1`
    dns-nameservers 8.8.8.8
 #restart the server to apply changes
 `sudo systemctl restart`
 
 #verify
 `ip a`
 `ping google.com`
 
PREVIOUS NEXT
Tagged: #ubuntu #server #set #static #ip
ADD COMMENT
Topic
Name
7+5 =