Saturday, September 23, 2017

How set a Static IP on Ubuntu

1. Switch to root
     $sudo su
    password for root:

   #sudo nano /etc/network/interfaces

   from the nano editor you can see

   

     modify to

          auto lo eth0
          iface eth0 inet static
          address 10.10.10.10
          netmask 255.0.0.0
          gateway 10.10.10.11

   press Ctrl+X to save the setting. Yes to conform. 
   for DNS config 
       
              #sudo nano /etc/resolv.conf
                   nameserver (dns)
                   nameserver (alternate dns)

      save the setting. finnaly

    #sudo /etc/init.d/networking restart


           

No comments:

Post a Comment