LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-28-2017, 05:24 AM   #1
ineptlinuxuser
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?

Thanks!
 
Old 04-28-2017, 05:38 AM   #2
r3sistance
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 05:39 AM.
 
Old 04-28-2017, 05:44 AM   #3
ineptlinuxuser
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, 08:04 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
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, 08:33 AM   #5
Laserbeak
Member
 
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):

Code:
| => dig www.google.com

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

;; QUESTION SECTION:
;www.google.com.			IN	A

;; ANSWER SECTION:
www.google.com.		142	IN	A	172.217.11.4

;; Query time: 57 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Fri Apr 28 09:31:59 2017
;; MSG SIZE  rcvd: 48

| => nslookup www.google.com
Server:		192.168.1.1
Address:	192.168.1.1#53

Non-authoritative answer:
Name:	www.google.com
Address: 172.217.11.4
 
  


Reply



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 02:05 AM
LXer: Default Local DNS Resolver Proposed for Fedora 23 Linux LXer Syndicated Linux News 0 06-03-2015 04:27 PM
i have a question over resolver and DNS jonhanna Linux - Newbie 6 01-26-2009 06:14 AM
DNS Resolver Cache shipon_97 Linux - Newbie 4 04-25-2006 09:06 AM
dns client resolver Fraudulent SUSE / openSUSE 2 05-17-2005 10:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:20 PM.

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