Super User is a question and answer site for computer enthusiasts and power users. 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

Can someone explain what actions this command will perform?

sudo apt-get install xyz

share|improve this question

migrated from Jul 29 '10 at 12:59

This question came from our site for system and network administrators.

It's related to QT development. See also the following question:… – cmdev Jul 12 '09 at 15:19

Indeed, lets break this down.

  • sudo (some parameters): Instructs the operating system to execute the parameters as a command, but do so with administrative (usually root) privileges.
  • apt-get (some parameters): Runs the package manager called apt-get on your machine. The parameters are a command for apt-get to run.
  • install xyz: These parameters to apt-get instruct apt-get to find and install a package called xyz.

So, as a whole, this command attempts to find and install package/program xyz on your machine and does so as root if you are able to authenticate as such.

share|improve this answer

Note: "apt-get install" will also install missing dependencies for the xyz package.

share|improve this answer

for future reference, the man command can help with commands

just type

man *yourCommand*

or in your case

man sudo

man apt-get
share|improve this answer
A bit bofh'ish, but I like it! – Andrioid Jul 13 '09 at 7:32

This is more of a question than StackOverflow, but it instructs the package manager to install the xyz program.

sudo - do this as an administrative user apt-get - the package management program install - the instruction for the program xyz - the program to install

share|improve this answer
And how can I see from what repository will the library be installed? My OS is Ubuntu. – cmdev Jul 12 '09 at 15:21

In order to see the repository that would be used to install a package, use the following:

apt-get --print-uris install xyz

then answer "Y". The URIs will be printed, but the package won't be installed.

To see what repositories you have configured, look at this file /etc/apt/sources.list which can be edited (but you should probably use System>Administration>Software Sources to choose repositories.

share|improve this answer

To see what versions of a package are available to be installed, and from what repository, try

apt-cache policy xyz
share|improve this answer
apt-cache policy doesn't need root privileges. – LiraNuna Jul 12 '09 at 22:38

You must log in to answer this question.