Sunday, 16 June 2013

How to install packages in Ubuntu?

This post will explain how can you install packages in Ubuntu

  1. Vis Basic Graphical Method

    You can install your softwares using Ubuntu Software center which a basic GUI tool to install softwares. You can access it simply by typing Ubuntu software center in your dash board.

    You have softwares divided into various categories on the left panel like Games, System etc. You can directly search for your software on the top right corner search area.
  2. Via Advanced Graphical Method

    The Synaptic Package Manager offers a more advanced way of installing packages. If you have problems finding a suitable package with the Add/Remove tool, try using the search in Synaptic. This searches all of the packages in the available repositories, even the ones which don't contain programs. You can access it simply by typing synaptic package manager in your dashboard. Note you need to have root access(authentication) for this.

    This will also resolve and install dependencies (if any exists) for the software you are installing.
  3. By using the CLI(Command line interface)

    The apt-get program is a command-line package manager, which should be used if the Add/Remove tool and Synaptic ever run into problems. It provides an advanced interface to APT, the underlying package management system which Ubuntu uses, but is reasonably easy to operate. Power users may find that apt-get is quicker to use and more powerful than the graphical options above.

    Some commonly used commands are

    • apt-get install <package_name> :  This command installs a new package 
    • apt-get build-dep <package_name>  :  This command searches the repositories and installs the build 
      dependencies for <package_name>. If the package is not in the 
      repositories it will return an error. 
    • apt-get install <package1_name> <package2_name> <package3_name> : APT will accept multiple package names as a space delimited list. 
    • apt-get update : This is the equivalent of "Reload" in Synaptic or "Fetch updates" in Adept.
    • apt-get upgrade : This command upgrades all installed packages.  This is the equivalent of "Mark all upgrades" in Synaptic.
    • apt-get dist-upgrade : The same as the above, except add the "smart upgrade" checkbox. It tells
       APT to use "smart" conflict resolution system, and it will attempt to 
      upgrade the most important packages at the expense of less important 
      ones if necessary. 
t> UA-39527780-1 back to top