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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
04-28-2017, 05:24 AM
|
#1
|
LQ Newbie
Registered: Apr 2017
Posts: 2
Rep: 
|
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!
|
|
|
04-28-2017, 05:38 AM
|
#2
|
Senior Member
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375
|
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.
|
|
|
04-28-2017, 05:44 AM
|
#3
|
LQ Newbie
Registered: Apr 2017
Posts: 2
Original Poster
Rep: 
|
Given your "encouraging" reply I think my queries would be best placed elsewhere..
|
|
|
04-28-2017, 08:04 AM
|
#4
|
Moderator
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,961
|
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.
|
|
|
04-28-2017, 08:33 AM
|
#5
|
Member
Registered: Jan 2017
Location: Manhattan, NYC NY
Distribution: Mac OS X, iOS, Solaris
Posts: 508
Rep: 
|
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
|
|
|
All times are GMT -5. The time now is 09:20 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|