Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I was wondering if it was possible to check information about a package before installing it without needing to open a web browser to look for it there.

For example, say I type in

~$ asdf

Then I see recommended packages:

No command 'asdf' found, did you mean:
 Command 'asdfg' from package 'aoeui' (universe)
 Command 'sadf' from package 'sysstat' (main)
 Command 'sdf' from package 'sdf' (universe)
asdf: command not found

Say I want to find out what the package 'sdf' does. Can I find this information in terminal, or will I have to do it the slow way and look it up online?

share|improve this question
    
This is one of the many uses of a package manager. In ubuntu's case, this is probably apt-get. You can use it's options to query information about available packages and then, if desired, install them. –  HalosGhost May 29 at 19:36

2 Answers 2

up vote 8 down vote accepted

The main package management tool suite of Ubuntu is called APT.

Since Ubuntu 14.04, you can use the apt command:

apt show sdf

Earlier releases do not have this command. You can use apt-cache to obtain information about available packages, and apt-get to perform actions such as installing packages.

apt-cache show sdf

Aptitude is a more advanced interface to package manipulation (existing both as a command line tool and a full-screen text mode interactive tool). You need to install the aptitude package.

aptitude show sdf
share|improve this answer
1  
I learned something! The updated apt command is long overdue. –  Dan Garthwaite May 30 at 1:22

In Ubuntu(debian based), you may run apt-cache show package command to view all the information about the package. Also run apt-cache showpkg package , apt-cache policy package to get additional infos.

Example:

$ apt-cache show sdf
Package: sdf
Priority: extra
Section: universe/text
Installed-Size: 1415
Maintainer: Colin Watson <cjwatson@debian.org>
Architecture: all
Version: 2.001+1-3
Depends: perl
Suggests: sdf-doc, perl-doc, htmldoc, texlive-latex-base, ghostscript, sgmltools-lite
Filename: pool/universe/s/sdf/sdf_2.001+1-3_all.deb
Size: 294288
MD5sum: 49f9370b17567bae8a362d83633ffb66
SHA1: 967da4edf9948bb9393db34bd1f8037a840bd335
SHA256: 968769e7c75d1612f4f3c4b26c49532b26f288fd8ee722c2d83ba807620e0df5
Description-en: Simple Document Parser
 SDF (Simple Document Format) is a freely available document development
 system which generates high quality outputs in a variety of formats
 from a single source. The output formats supported include
 PostScript(tm), PDF, HTML, plain text, POD, man pages, LaTeX,
 MIF, SGML, Windows(tm) help, RTF, MIMS F6 help and MIMS HTX help.
 If the idea of specifying documents in a logical manner via a
 simple markup language sounds appealing, SDF may be useful to you.
Description-md5: 65eb1315794ec8133dd1a14b0e8db243
Multi-Arch: foreign
share|improve this answer

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.