What is the the command line that will give me full DNS IP address?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What is the the command line that will give me full DNS IP address?
Hello,
I am kinda new but learning fairly quickly in linux. I am a windows user and I am very familiar with the ipconfig /all command and it shows IP and DNS ip and such. When i use the ifconfig -a it shows the info i need but it does not show the DNS IP addresses like Windows does. So what is the command line in Linux for me to see all relevant information needed?
not sure of a command off-hand but it is defined in /etc/resolv.conf (on some distros, at least -- RHEL, CentOS, Fedora, ...) and you can 'cat' it to see what nameservers are defined.
See the man page for hostname, specifically "hostname -f" should show you the FQDN. This should be a little more portable than looking at /etc/resolv.conf, in case you run into machines that NIS+.
Just try with it. It is giving ip address for the machine. It is working fine for me.
Here main command is "ifconfig -a" after that is just to grep the desired output.
Just try with it. It is giving ip address for the machine. It is working fine for me.
Here main command is "ifconfig -a" after that is just to grep the desired output.
@
Satish Kumar Gupta
Hyderabad, India
Please see post 11 in this thread. He wants the IP address of the ISP's DNS Server that is their NAMESERVER
Distribution: Red Hat, Scientific Linux, CentOS, and Ubuntu
Posts: 27
Rep:
/etc/resolv.conf
Note that if you are using DHCP to obtain a temporary IP address and DNS server addresses, the contents of /etc/resolv.conf can change when you renew the lease on your IP address, change networks, or log on to a VPN.
This behavior can be controlled by tweaking the DHCP config file (/etc/dhcp3/dhclient.conf on my box).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.