Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Can someone explain what actions this command will perform?

sudo apt-get install xyz

share|improve this question
    
It's related to QT development. See also the following question: stackoverflow.com/questions/646232/… –  cmdev Jul 12 '09 at 15:19
add comment

migrated from serverfault.com Jul 29 '10 at 12:59

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

6 Answers

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
add comment

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

share|improve this answer
add comment

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
add comment

This is more of a ServerFault.com 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
add comment

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
add comment

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
add comment

Your Answer

 
discard

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