View previous topic :: View next topic |
Author |
Message |
Woody Guru
Joined: 30 Nov 2002 Posts: 592 Location: Milwaukee
|
Posted: Fri May 23, 2003 6:56 pm Post subject: dns lookup command |
|
|
Hi, I used to use nslookup for resolving hosts from the shell, but I know
its been replaced by something else. In fact, I just discovered it the other
day, but I've forgotten the command. Can someone remind me? ta. |
|
Back to top |
|
|
compu-tom Guru
Joined: 09 Jan 2003 Posts: 415 Location: Berlin, Germany
|
Posted: Fri May 23, 2003 6:57 pm Post subject: |
|
|
It is |
|
Back to top |
|
|
Naan Yaar Bodhisattva
Joined: 27 Jun 2002 Posts: 1549
|
Posted: Fri May 23, 2003 7:19 pm Post subject: |
|
|
dig(1) and host(1). |
|
Back to top |
|
|
Woody Guru
Joined: 30 Nov 2002 Posts: 592 Location: Milwaukee
|
Posted: Fri May 23, 2003 7:57 pm Post subject: |
|
|
I don't have either dig or host installed. I know there was something else.
Well, I'll just install one of these. |
|
Back to top |
|
|
compu-tom Guru
Joined: 09 Jan 2003 Posts: 415 Location: Berlin, Germany
|
Posted: Fri May 23, 2003 7:58 pm Post subject: |
|
|
They are both in net-dns/bind-tools. |
|
Back to top |
|
|
Regor Guru
Joined: 06 Aug 2002 Posts: 545 Location: 39° 2' 48" N, 120° 59' 2" W
|
Posted: Sat May 24, 2003 10:43 am Post subject: |
|
|
Totally off topic:
Nice avatar. "This machine kills fascists" would be a good sticker on the side of a linux box too _________________ Sometimes the appropriate response to reality is to go insane.
-Philip K. Dick, Valis |
|
Back to top |
|
|
nuke n00b
Joined: 14 Sep 2003 Posts: 30
|
Posted: Wed Sep 24, 2003 4:24 am Post subject: |
|
|
It would be really good if the above package turned up when I did
emerge search dig
I couldn't believe that Gentoo didn't have at least one of nslookup/dig.
Oh well, at least folks here knew |
|
Back to top |
|
|
delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Wed Sep 24, 2003 4:47 am Post subject: |
|
|
nuke wrote: | It would be really good if the above package turned up when I did
emerge search dig | My little-known search Portage by description script works wonderfully here. _________________ I don't believe in witty sigs. |
|
Back to top |
|
|
BitJam Advocate
Joined: 12 Aug 2003 Posts: 2508 Location: Silver City, NM
|
Posted: Wed Sep 24, 2003 6:20 am Post subject: |
|
|
Try:
This takes a long time. You may want to Code: | # ACCEPT_KEYWORDS="~x86" emerge esearch
# eupdatedb
# esearch -S dig |
I've put eupdatedb in my crontab. |
|
Back to top |
|
|
_integralpanther_ n00b
Joined: 13 Jul 2005 Posts: 7 Location: de
|
Posted: Fri Jan 27, 2023 6:28 am Post subject: dns lookup command |
|
|
Hi everyone,
this thread is quiet old but in case anyone still looks for a common method without installing additional programs:
Code: | getent hosts myhostname |
should do the job. At least on my gentoo box.
Just make sure that your /etc/nsswitch.conf contains something like (see man getent):
|
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3131
|
Posted: Fri Jan 27, 2023 4:43 pm Post subject: |
|
|
Getent surely is handy, but it's not the same as nslookup.
nslookup can find records of arbitrary types published on DNS and ignores any sources that are not dns.
Getent shows the IP address that would be handed to the application when resolving names, so A and AAAA entries coming from the configured sources. Including /etc/hosts and mdns if yoursystem is set to use it. |
|
Back to top |
|
|
|