Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently installed Ubuntu Server edition 13.10. But I have ran into a bit of problem.

At the end of the install, it asks you for several extra packages whether you want them or not, like openSSH server, virtual machine host. Here's what I'm looking at:

enter image description here

Now, my problem is that I can't remember If I have checked the "virtual machine host" checkbox. How do I check if my server has the corresponding packages?

What packages come with the virtual machine host?

share|improve this question
up vote 54 down vote accepted

To List all Installed Packages

Here "less" is a simple text reader used to scroll through the list of packages in a new buffer that opens in the existing terminal window. The list will not be mixed with other terminal commands and output. Hit 'q' to return to terminal prompt. See "man less" for more info.

dpkg -l | less

To check whether a package is installed or not:

dpkg -l {package_name}
dpkg -l vlc

To check if the package is installed or not (for example, vlc). If installed, launch the package:

dpkg -l | grep vlc

Show the location where the package is installed. The "-S" (capital S) stands for "search"

sudo dpkg -S {package_name}
sudo dpkg -S skype

To use Grep to search:

dpkg -l | grep {keywords}
dpkg -l | grep pdf
share|improve this answer
dpkg -l | vlc doesn't look right. That will pipe the output of dpkg into vlc. Do you mean dpkg -l | grep vlc? – AgentME Dec 19 '14 at 22:19
What is the diference between this and dpkg-query -l "packagename" – heypaleblue May 24 '15 at 17:56

Use dpkg

This command is the debian package manager.

You can list all the installed packages with

dpkg -l

You can see details for a specific package with

dpkg -p packagename

And to learn if it is installed ,use

dpkg -s packagename | grep Status

You can learn which package contains the software you want with

apt-cache search name*  

In your case you should use this command to search the package name you want

apt-cache search virtual machine host 
share|improve this answer

I've found a way to check for package installation with just dpkg-query command and no pipes.

I searched for such solution while writing a task for ansible playbook.

So, yo can do something like this:

/usr/bin/dpkg-query --show --showformat='\r' '<your package name>'

This is just one another way to do the thing.

share|improve this answer

Use tasksel ('$ sudo apt-get install tasksel' if you don't already have it) and run '$ tasksel --list-tasks'.

tasksel will print out a list of the tasks, and there will be an 'i' next to each task that is installed, and a 'u' next to each task that is not installed.

If you wish to install the task, use '$ tasksel install '. The name of the task you are looking for is 'virt-host'.

The software selection items are called "tasks".

share|improve this answer
thanks for telling me the name of the task, that was one of my problems, wasn't sure which package to look for. – D.Zou Feb 20 '14 at 22:11

Your Answer


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.