- In /etc/network/interfaces# The loopback network interfaceauto loiface lo inet loopback# The primary network interfaceauto eth0iface eth0 inet staticaddress "insert the IP you want to set"netmask "insert subnet mask"gateway "insert gateway"dns-domain yourdomain.comdns-search yourdomain.comdns-nameservers "insert your nameservers IP address separated by spaces"
- Please make sure there are no "" in /etc/network/interfaces file.
- Restart networking by running following command:
sudo /etc/init.d/networking restart - Please leave a comment or g +1 or share on f or share on t below if this post helped you. This will keep me motivating.
Set static IP on Ubuntu
Subscribe to:
Posts (Atom)