Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-28-2017, 06:24 AM   #1
LQ Newbie
Registered: Apr 2017
Posts: 2

Rep: Reputation: Disabled
DNS Resolver - linux commands

Hi there,

I am new to Linux today and need to have a very basic understanding for an internal job interview at my company.

I understand that the command /etc/resolv/conf is used to configure DNS resolver.

My question would be what Linux command line tool would you use to determine what IP address is being resolved against a specific network hostname and by what resolution server?

Old 04-28-2017, 06:38 AM   #2
Senior Member
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
This sounds like a college assignment... considering you didn't even get /etc/resolv.conf correct, have you even logged on to a linux box to check any of this? We aren't here to do your college work for you.

P.S. while deprecated, one of the facilities/tools that will answer your question, is the literal same facility you'd use in windows...

Last edited by r3sistance; 04-28-2017 at 06:39 AM.
Old 04-28-2017, 06:44 AM   #3
LQ Newbie
Registered: Apr 2017
Posts: 2

Original Poster
Rep: Reputation: Disabled
Given your "encouraging" reply I think my queries would be best placed elsewhere..
Old 04-28-2017, 09:04 AM   #4
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,876
Blog Entries: 13

Rep: Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929Reputation: 4929
Hi and best of luck with the interview.

I'm not sure that brief study about a topic which you a very basic understanding is necessarily the key which will make or break this particular opportunity.

If this opportunity requires you to be fluent in Linux, then it would seem that this opportunity is not suitable for you, or at the present time.

If this opportunity accepts that you understand the position, and is accepting of the fact that you only have a basic understanding of Linux, then all should be fine. To add to this, I can assure you that I have made the mistake of attempting to learn a topic quickly in advance of an interview is a very obvious, and not helpful for you, mistake. It becomes quite clear you know "of" a word, command, or term, however little else. Therefore I would suggest that obtaining quick responses about a topic in preparation for an interview is inadvisable.

If a future direction is that you feel you wish to increase your knowledge of Linux, then excellent choices are to use a virtual machine, run a live boot of Linux off of a USB or DVD drive, or install Linux on a machine and begin to use it.

Please also note that /etc/resolve/conf is not a command. It is not an executable file, however it is related to DNS.
Old 04-28-2017, 09:33 AM   #5
Registered: Jan 2017
Location: Manhattan, NYC NY
Distribution: Mac OS X, iOS, Solaris
Posts: 508

Rep: Reputation: 143Reputation: 143
If I understand your question right, you just want the program to lookup IP addresses from hostnames?

There are two, dig and nslookup (dig is newer and recommended):

| => dig

; <<>> DiG 9.8.3-P1 <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7713
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;			IN	A


;; Query time: 57 msec
;; WHEN: Fri Apr 28 09:31:59 2017
;; MSG SIZE  rcvd: 48

| => nslookup

Non-authoritative answer:


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] DNS resolver configuration in the enterprise ilesterg Linux - Enterprise 3 11-13-2016 03:05 AM
LXer: Default Local DNS Resolver Proposed for Fedora 23 Linux LXer Syndicated Linux News 0 06-03-2015 05:27 PM
i have a question over resolver and DNS jonhanna Linux - Newbie 6 01-26-2009 07:14 AM
DNS Resolver Cache shipon_97 Linux - Newbie 4 04-25-2006 10:06 AM
dns client resolver Fraudulent SUSE / openSUSE 2 05-17-2005 11:12 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:42 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration