Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How do I install dig? I can't figure out what the package name is.

share|improve this question
    
Strange that you don't have it. Package ubuntu-standard directly depends on dnsutils which contains dig, nslookup and nsupdate utilities. Is your system ok? Can you try sudo apt-get install ubuntu-standard? –  ulidtko Feb 7 '11 at 2:39
    
You appear to have answered your own question? –  belacqua Feb 19 '11 at 5:41
add comment

3 Answers 3

You can install it by opening a terminal and typing

sudo apt-get install dnsutils

Or via the Ubuntu Software Center by clicking bellow:

Install via the software center

For future reference, I found this out by doing a quick search with apt-cache:

apt-cache search dns dig

And then verified with aptitude.

share|improve this answer
    
A much more easier command to determine the package, provided you know complete path of file you are searching is $ sudo dpkg -S /usr/bin/dig dnsutils: /usr/bin/dig –  Jamess Feb 7 '11 at 4:53
4  
@James, this command will only work if you had dig already installed, while Oli's will search all available packages. –  Javier Rivera Feb 7 '11 at 8:20
    
Thanks Javier :) Good info. –  Jamess Feb 7 '11 at 8:34
3  
@Jamess You can search by filename on packages.ubuntu.com. And FWIW, you don't need sudo to run dpkg -S. –  Iain Lane Feb 7 '11 at 9:58
add comment
up vote 4 down vote accepted
sudo apt-get install dnsutils

To find out which package a file is in you can do

sudo apt-cache search dig

Sometimes that works, but in this case it was useless. You can search for which package a specific file is in using the 'Search the contents of packages' search form here:

http://packages.ubuntu.com/

share|improve this answer
add comment

Another command:

apt-file search /usr/bin/dig

You should install apt-file and update it beforehand:

sudo apt-get install apt-file
sudo apt-file update
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.