Difference between revisions of "Configure static IP in ubuntu system"

From Notes_Wiki
m
m
 
Line 1: Line 1:
[[Main Page|Home]] > [[Ubuntu]] > [[Configure static IP in ubuntu system]]
[[Main Page|Home]] > [[Ubuntu]] > [[Ubuntu Server or Desktop administration|Server or Desktop administration]]  > [[Configure static IP in ubuntu system]]


To configure static IP in ubuntu edit /etc/network/interfaces as follows:
To configure static IP in ubuntu edit /etc/network/interfaces as follows:
Line 34: Line 34:




[[Main Page|Home]] > [[Ubuntu]] > [[Configure static IP in ubuntu system]]
[[Main Page|Home]] > [[Ubuntu]] > [[Ubuntu Server or Desktop administration|Server or Desktop administration]]  > [[Configure static IP in ubuntu system]]

Latest revision as of 05:37, 15 February 2023

Home > Ubuntu > Server or Desktop administration > Configure static IP in ubuntu system

To configure static IP in ubuntu edit /etc/network/interfaces as follows:

   auto eth0
   iface eth0 inet static
    address 192.168.3.3
    netmask 255.255.255.0
    gateway 192.168.3.1
    dns-search example.com
    dns-nameservers 192.168.3.45 192.168.8.10

Restart using:

   systemctl restart networking

as use of /etc/init.d/networking restart is deprecated

For DNS we can also create /etc/resolvconf/resolv.conf.d/tail file with desired "resolv.conf" static contents and do

   resolvconf -u

for settings to take effect.


Refer:




Home > Ubuntu > Server or Desktop administration > Configure static IP in ubuntu system