There are multiple command-line solutions available on Linux. Several of them come even pre-installed, but most of them are at least available via the standard repositories. Note that I'm also using the Unbound name server in my local network here :)
This tool ships with the
dnsutils package – which in fact is described as Clients provided with BIND, but definitely does not require bind itself (though it uses one of its libraries,
libbind). As you requested, it supports an optional parameter to specify which name server to use (by default it checks which one is configured with your system):
nslookup example.org 18.104.22.168
would request the IP of
example.org from a name server listening at port 53 at
22.214.171.124. There's an interactive command-line interface as well, and you can specify which type of address you're looking for – e.g.
type=mx for the SMTP MX records of a domain, or
type=ns for the name servers.
nslookup was declared "deprecated" a while ago, today one should use
dig. By default,
dig produces much more detailed output. The syntax here would be:
dig example.org @126.96.36.199
for the same task described above. And again, specifying a name server is optional. Interestingly, the
dig tool comes with the very same package, at least on Ubuntu:
This candidate seems to be completely independent from any bind library. It belongs to the djbdns name server which was written from the scratch for exactly the same reasons you're looking after a replacement to bind, and is described e.g. in this article. You can find it in the Ubuntu repositories as
udns-utils, the same on Debian Jessie (Wheezy seems not to have it). But unfortunately,
dnsip does not support specifying the name server at the command line.