Ubuntu Software Management

Ubuntu Software Management
Debian package extension precompiled binary format ".deb", similar to the rpm file, so installation fast, without compiling software. Package file includes specific functions or software necessary files, meta data and instructions
dpkg: package manager for Debian, similar to the rpm, dpkg system is based on Debian package manager. You can install, remove, and build packages, but can not automatically download and install software packages or their dependencies
APT: Advanced Packaging Tool, powerful software management tools, and even upgrade your entire Ubuntu system, based on client / server architecture
APT works : on the server copying all DEB package, and then analyzed by the APT genbasedir tools to analyze all of the DEB DEB package according to each packet header (header) information, and the analysis result is recorded in the folder of a base DEB index manifest file, once the DEB in the APT server subject to change, to use the DEB genbasedir generate new index list of clients during the installation or upgrade must first query list when DEB index, which is known all packages that have dependencies, and along downloaded to the client to install.
When a client wants to install, upgrade or remove some packages, the client computer has made a list of DEB index compressed file, unzip it will be placed in / var / cache / apt /, and the client using apt-get install or when the command apt-get upgrade will this folder DEB data and databases within the client computer aligned, DEB know what is installed, you can not install or upgrade

dpkg command

dpkg common usage: man dpkg


dpkg -i package.deb installation package
dpkg -r package Delete package is not recommended, it does not automatically uninstall depend on the package
dpkg -P package Delete package (including configuration files)
dpkg the -l lists the currently installed package, similar to rpm -qa
dpkg -l package display a brief description of the package, similar -qi RPM
dpkg -L package List file included in the package, similar to the -ql RPM
dpkg -S / path / to / a file system Check file which is provided by the package, similar -qf RPM
dpkg -s package Penalty for listed status of the package, including detailed information, similar -qi RPM
dpkg --configure package Penalty for configuration package, -a used to configure all of the software is not configured package
dpkg -c package.deb list the contents of a deb package, similar to the rpm -qpl
content dpkg --unpack package.deb unlock the deb package

See which package is not complete the installation: dpkg -C

Reset Software Configuration file dpkg-reconfigure

dpkg Example:

List all packages installed on system
dpkg -l
lists the packages installed files
dpkg -L bash
View / bin / bash from which package
dpkg -S / bin / bash
install a local .deb file
dpkg -i / mnt / cdrom / pool / main / z / zip / zip_3.0-11build1_amd64.deb
uninstall packages
dpkg -r zip
Note: generally recommended not to use dpkg uninstall packages. Because when you remove packages that depend on it will continue to install any other package, and may no longer function properly aptDebian use the APT package management system tools, which differ with the rpm command. In Linux distribution based on Debian, there are a variety of tools to interact with APT, to facilitate the users to install, remove and package management.

apt

dpkg not human point is not automatically resolve dependencies, such as A software package depends on package B, then you first have to install B to install A. And we need to use dpkg to install software downloaded to the local. Use apt will automatically install the software from the depot to download software to install, and can automatically resolve dependencies apt, when there is dependent on the time it will automatically download the dependent packages to install from the depot. Of course, the underlying apt or dpkg calls for software installation.

View Help: apt help

apt-related documents

  • /etc/apt/source.list configure the package source, that is to say above the depot
  • /ect/apt/apt.conf.d there is apt piecemeal profile
  • / Ect / apt / preferences to develop a package of version parameter
  • / Var / cache / apt / archives to store downloaded package
  • / Var / cache / apt / archives / partial storage are downloaded package
  • / Var / lib / apt / lists to store the downloaded package details

Source software

Software source (depot) stored in this massive software package, apt will download the software from the software source. In /ect/apt/soure.list can be configured as an apt source software in. Deb keyword defined in this document have been compiled package source, source deb-src-defined source packages. Format of each row is as follows:

deb(或deb-src) 软件源地址  主版本代号  软件仓库1 软件仓库2 软件仓库3 ...

My time following source.list content, Netease when I was with the software source image

deb http://mirrors.163.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ xenial-updates main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ xenial-proposed main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ xenial-backports main restricted universe multiverse

Ubuntu depot is divided into four parts, namely a main, restricted, universe and multiverse

  • main: software package is free software, Ubuntu to provide timely, security support ****
  • restricted: not completely free software, but due to the widely used, so Ubuntu also provides timely, security support ****
  • universe: general community-maintained software, but Ubuntu does not provide security support
  • multiverse: non-free software, not Ubuntu recognized, not recommended

apt-get command

 

apt command Substituted command Function commands
apt install apt-get install Installation package
apt remove apt-get remove Removing packages
apt purge apt-getpurge Removing packages and configuration files
apt update apt-get update Refresh the repository index
apt upgrade apt-get upgrade Upgrade all upgradeable packages
apt autoremove apt-get autoremove Automatically delete unwanted package
apt full-upgrad e apt-getdist-upgrade Automatic processing dependencies in the upgrade package
apt search apt-cache search Search application
apt show apt-cache show Display Installation Details

apt-get command is generally used to install packages, update, and remove, the following are some of its common commands

command Features
update The list of packages software updates to a local warehouse, in general we need to do this before installing the software
upgrade Upgrading the system of all packages , will lead to other installed packages are removed if a package upgrade, then this package will not be upgraded
dist-upgrade When upgrage upgraded version of the command, it will try to resolve conflicts when installed, will remove such packages installed, so caution
remove Unloading packages (retention profiles), but also depends on the uninstall the software packages, B is dependent on A, B will be unloaded when uninstalling A
install Installation package
source Download Source Package
clean Delete locally cached all software installation package
check Check whether there is a dependency problem

 

apt-specific command

apt list lists package containing conditions (installed, can upgrade etc.)
APT Sources Edit-list editing source

Database of available packages from the APT package index /etc/apt/sources.list file and repository /etc/apt/sources.list.d defined in the directory, similar to the two documents yum (the default has been configured foreign and some domestic apt sources). To use the latest changes to the repository to update the local package index

apt command operations (such as installing and removing packages) recorded in the log file /var/log/dpkg.log

apt example:

  • Installation package:
    APT install ZIP Tree
  • Delete Package:
    APT the Remove Tree ZIP
    Description: apt remove add --purge option removes the package configuration file, use caution
  • Update Package Index:
    APT Update
  • Upgrade package: To upgrade your system, first update your package index, then upgrade
    apt upgrade

important point:

    1. Installation package in the folder of the disc in the pool
    2. sudo -i switch to the root user (or forcibly remove the lock with vim exclamation mark shadow inside the root!, then switch to increase after the root password, next time will be able to directly root landing, but want remote root login also need to configure the openssl set specific query other help)

 

Guess you like

Origin www.cnblogs.com/chengkanghua/p/11540927.html