I am wondering what this command line does? "sudo apt-get update"
What does it update?
|
I am wondering what this command line does? "sudo apt-get update" What does it update? |
||||
|
|
You can combine commands with
or to get newest versions possible as per version requirements of dependencies:
You need |
||||
|
|
|
A Google search can give you the definition for almost any terminal command, as can --help in the terminal. For example,
The command essentially has three parts:
performs the following command with super-user (root) capabilities. Many actions that require modifying system files or installing applications require extra permissions to go through.
is a command-line tool which Ubuntu uses to install, remove, and manage software packages
is an option for the apt-get program to use which updates the package lists from a server on the internet. The package lists provide the apt-get utility with important information about the software packages that you can install using apt-get. apt-get uses these lists to determine which software to install when given a command to install. For example
would install the Guake terminal as it is currently listed in my computer's local software lists. This may not, however, be the appropriate version, or if the program is new, it might not be available at all. Thus, when installing software with apt-get, you typically type
ensuring that apt-get knows to install the most recent version of the package. Another useful source for information is the |
|||||||||
|
|
You need to run apt-get update once before installing new packages as this updates the local repository information. If you are going to install multiple packages shortly after each other, you do not need to run apt-get update. Also, you can install multiple packages at once if you type
|
|||
|
|
|
Lets consider the example of installing VLC player in Ubuntu
will check the repositories for the updates available.
will install the VLC player from the repositories which we searched for. If you had logged in as a root user (administrator), you don't have to use |
||||
|
|
|
When you install packages from the command line with
Running When you install packages with a GUI interface (the Update Manager, the Software Center, or the Synaptic Package Manager), the work of Because information about what updated versions of packages are available is obtained by running Please note that if you are going to perform multiple package management operations around the same time, you don't need to run |
|||
|
|
|
Running In a nutshell: It is highly recommended to run |
||||
|
|
|
As said by plenty of people before me this updates your local repository (package list). You may run into trouble if you try to install
and foobar or a dependency don't have their latest version in the repository. This can be especially problematic if installing a .deb file manually or a ppa from a 3rd party. Basically it makes sure your list matches the master list. |
|||
|
|
|
Updates the available software list in your computer. Your compouter has a list (such as a catalog) that cointains all the available software that the ubuntu servers have available. But the available software and versions might change, so a "update" will hit the server and see what software is available in order to update its local lists (or catalogs). Note that To actually sudo apt-get upgrade which is usually executed after a "update" |
|||
|
|