What is the command for DNS lookup in Linux?

What is the command for DNS lookup in Linux?

So I'm currently messing with VIM and using DAGL to make a new VIM plugin but I've run into a problem.

So far, I can't figure out how to use DAGL functions from within the Vimscript that gets loaded when you're insert mode or if I'm doing things wrong.

The problem: I want the .txt files on my network to show the local IP address of the computer running Vim and not the outside (public) IP of the machine.

I figured the easiest way to do this was to set up a DNS resolver on the machine so that I could just go to "" and it will bring me to that file. This worked like a charm in XP.

I figured that maybe in Linux this was different, so I did a little bit of research and figured out that I should be able to do something like. Command! TestDNS lookup call MySpecialDNSResolver(). The command I found above does something like. Xdg-open "". So what I wanted to do was to open that file.txt and then put it into Vim and have it display on the Vim window as if it were typed into a normal text editor.

But this is apparently different. How do I, instead of getting the full path of the file I'm pointing at, get the IP address? Or even a short cut of the address? Can't find anything on google.

As far as I can tell from the manual, Linux doesn't have a built-in DNS server. All DNS-related features must be done via a network protocol, usually udp. To do this in Perl, there's dnsudpinit and dnsudpname.example.

What is the alternative to nslookup in Linux?

I have set up and host and domain registrar on my linux VPS but when trying to do.

nslookup . It returns a "Can't get nameserver address" message. If I use "host" on the command line everything works fine. I think the problem is that the VPS has a local dns server and its configuration probably doesn't match what nslookup is expecting.

What is the best way to troubleshoot this? I don't think you should be using nslookup anyway - it's not ideal for getting correct information about DNS, especially if you want to look up a particular domain. Is there an alternative to nslookup on Linux? No - there isn't. Nslookup is a Windows tool.

None - unless your hosts are on a different platform and you just happen to have a copy of nslookup, then that should work fine.

Related Answers

How to do a reverse lookup with nslookup?

To check the status of the reverse lookup name, you need to perform DNS reverse...

What are the two types of proxies?

You can use a reverse proxy for multiple reasons, but mostly it is us...

What is reverse lookup IP address to hostname?

A reverse lookup is a process that is used to get details of a company from its r...