Forums »
  Linux Forums And Topics Discussions For Wallpaper Websites Running On Linux Servers »
    How To Setup Change Edit DNS Nameservers Linux Command Shell

How To Setup Change Edit DNS Nameservers Linux Command Shell

Description: How To Setup Change Edit DNS Nameservers Linux Command Shell
Tags: how ,to ,setup ,change ,edit ,dns ,nameservers ,linux ,command ,shell
Posted On Sat Jul 07, 2007 By hostman In Linux Forums And Topics Discussions For Wallpaper Websites Running On Linux Servers Forums
the file to chanage or edit your nameservers in debian is this one:

cat /etc/resolv.conf

for example if i wanted to change my nameservers for my server to be these two:
206.12.23.13
206.12.24.13

i would send this command:
nano /etc/resolv.conf


now i would make change the contents to look something like this:

search
nameserver 206.12.23.13
nameserver 206.12.24.13


now save the file and restart your network

/etc/init.d/networking restart


if you need to change hostname, you can follow this link:

Next: Set Hostname
just Wed Jul 27, 2011
To save a file in nano you use CTRL X. Make sure you use 'sudo nano /etc/resolv.conf' So you can save the file with out the permission denied error message.
taulant Tue Oct 20, 2009
is really necessary to restart the network?
nikhil Tue Jul 14, 2009
hey buddy nice post.....but you can also refer this link to do it graphically techviolation /how-to-change-dns-server-settings/
Kiran Thu Jul 09, 2009
to save file ":wq". generally i use this command :wq in vi editor not sure if it works in nano editor too. but you should give a try.

kiran
Champ Thu Mar 19, 2009
how to save the file?
FuzzyGhost Mon Jun 18, 2012
- at - Just - CTRL+X exits NANO, not saves. That would be CTRL+O.

I'm wanting to know how to perform this operation permanently. The moment you restart/shutdown, you will have to edit resolv.conf again.
n!kon Sun Dec 02, 2012
Assuming you're using a static IP address, edit /etc/network/interfaces to include the DNS server information.

For example, eth0 would read like this (using openDNS):

iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 208.67.222.222 208.67.220.220

save the file, then either restart the interface (ifdown eth0 && ifup eth0) or the computer.


Information
Title: How To Setup Change Edit DNS Nameservers Linux Command Shell
Info: This Post Has Been Viewed 0 Times Since
Date: Sat Jul 07, 2007
Author hostman Received 6 Replies #2953
Related Content
Related Pages
Related Sites
Add Your Website
Share
wallpaperama | Wallpapers | Forums | Terms Of Service

copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Tue Jun 18, 2013 (-8 GMT)
Powered by: Webune Forums V5