DNS nameserver

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DNS nameserver

2,561 Views
niklasmolin
Senior Contributor I

Hi.

I wonder how I set the DNS nameserver when using static IP.

I tried to include dns-nameservers in the interface file, but resolv.conf won't be updated.

If I use DHCP, then the resolv.conf will be updated.

Thanks,

Niklas

Labels (2)
0 Kudos
2 Replies

1,305 Views
Yuri
NXP Employee
NXP Employee

Have You tried the following ?

# echo nameserver 8.8.8.8 >> /etc/resolv.conf

or

# echo nameserver 8.8.8.8 > /etc/resolv.conf


It works under i.MX6 Ubuntu demo image. 

Best regards

Yuri

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,305 Views
niklasmolin
Senior Contributor I

Hi Yuri.

I'm trying to avoid to add external script to update the resolv.conf, since it should be done from the information in the interface file.

Best regards,

Niklas

0 Kudos