set static IP from command line in Ubuntu


/ Published in: Other
Save to your folder(s)

from google search
change in /etc/network/interfaces
in this case static IP is 192.168.1.100
afterwards, restart network interfaces: sudo /etc/init.d/networking restart


Copy this code and paste it in your HTML
  1. # This file describes the network interfaces available on your system
  2. # and how to activate them. For more information, see interfaces(5).
  3.  
  4. # The loopback network interface
  5. auto lo
  6. iface lo inet loopback
  7.  
  8. # This is a list of hotpluggable network interfaces.
  9. # They will be activated automatically by the hotplug subsystem.
  10. mapping hotplug
  11. script grep
  12. map eth0
  13.  
  14. # The primary network interface
  15. iface eth0 inet static
  16. address 192.168.1.100
  17. netmask 255.255.255.0
  18. gateway 192.168.1.1

URL: http://www.sematopia.com/?p=50

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.