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
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
URL:

Share this page by putting this URL in your comments to other websites like myspace, Facebook, Twitter friendster, Hi5, Groups, Boards, Forum or others. Just Copy and Paste this Code
Embed:

To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it
BBCODE::

BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums