2

Can I know what is the command to search any package using the terminal, if I only know the name of the Software like, if I want to search VLC or JDK,JRE.. etc

If I do not know what is the url where I get them to download I might search them through the internet, but downloading them and extracting them and then installing becomes a lengthy procedure.

So I wanted to know is there any command to search the package via their names or part of names?

3

As Nick already pointed out, apt-cache search QUERY should list packages containing specific string in their names.

Another useful tool is apt-file. apt-file search QUERY will print list of packages containing files with QUERY in their names. In some cases you know the name of a binary needed (like when you are reading a tutorial and need some command not installed in your OS) but do not know what package it comes with.

Also, dpkg -S QUERY lists installed packages which provide files containing 'QUERY' in their names. In some cases you have a binary or script installed on one machine and want it also on another one, but do not remember where it came from. The output should be smaller than for apt-file in this case, as it does not display content of packages not installed.

You may filter output of those commands with egrep, say with egrep '/NAME$'.

e.g. dpkg -S ps | egrep '/bin/ps$' tells us that ps binary comes with procps package.

  • can the search command have any modifications or extensions so that it can search any of the updates or patches that the package has undergone – Shadab K Aug 24 '13 at 15:17
1

In the command line you can use

apt-cache search SearchTerm

Of course you have to change "SearchTerm" to the piece of text you already know. But there is also a webinterface for searching packages under Ubuntu packages. I think the search function of the Ubuntu Software Center may be helpful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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