Detailed explanation of linux system software installation command based on Debian of recommendation

  • 2021-07-24 12:08:25
  • OfStack

Introduction to Debian

Debian in a broad sense refers to a cooperative organization dedicated to creating a free operating system and its works. Because Linux macro kernel is the main kernel branch of Debian project, and most of the basic tools of the operating system created by Debian developers come from GNU project, "Debian" often refers to Debian GNU/Linux.
Unofficial kernel branches include Debian GNU/Hurd (Hurd microkernel) which only supports x86, Dyson (OpenSolaris hybrid kernel) which only supports amd64, etc. These unofficial branches all have some serious problems and are not practical. For example, Hurd microkernel is immature in technology, while Dyson's basic functions are still imperfect.

1. Software installation method

1) APT mode
a. Normal installation: apt-get install softname1 softname2 …;
b. Repair installation: apt-get-f install softname1 softname2...; (-f Atemp to correct broken dependencies)
c. Reinstall: apt-get-reinstall install softname1 softname2...;
2) dpkg mode
Normal installation: dpkg-i package_name. deb
3) Source installation (. tar, tar. gz, tar. bz2, tar. Z)
First, decompress the source code compressed package and then complete it through tar command
a. solution xx. tar. gz: tar-zxvf xx. tar. gz
b. solution xx. tar. Z: tar-zxvf xx. tar. Z
c. solution xx. tgz: tar-zxvf xx. tgz
d. Solution xx. bz2: bunzip2 xx. bz2
e. Solution xx. tar: tar xf xx. tar
Then go to the extracted directory. It is recommended to read the description files such as README under 1 first, because there may be differences between different source code packages or precompiled packages at this time. Then it is recommended to use ls-F-color or ls-F commands (in fact, mine only needs l commands) to view the executable files under 1, and the executable files will be marked with the tail of *.
1./configure
make
sudo make install
You can complete the installation.

2. Uninstall method of software package

1) APT mode
(1) Removal unloading: apt-get remove softname1 softname2 …; (Remove the package. When there is a + at the end of the package, it means installation.)
(2) Clear offload: apt-get-purge remove softname1 softname2...; (Clear configuration at the same time)
Clear offload: apt-get purge sofname1 softname2...; (Same as above, also clear the configuration file)
2) dpkg mode
(1) Removal unload: dpkg-r pkg1 pkg2...;
(2) Clear offload: dpkg-P pkg1 pkg2...;

3. Other orders

apt-cache search #-----(package search packet)
apt-cache show #------(package gets information about the package, such as description, size, version, and so on)
apt-get install #-----(package Installation Package)
apt-get install #-----(package--reinstall reinstall package)
apt-get-f install #----(Mandatory installation, "-f =--fix-missing" Think of it as a repair installation...)
apt-get remove #-----(package delete package)
apt-get remove--purge #-----(package delete package, including delete configuration file, etc.)
apt-get autoremove--purge #--(package delete package and its dependent packages + configuration files, etc. (valid for 6.10 only, highly recommended))
apt-get update #----Update source
apt-get upgrade #-----Update installed packages
apt-get dist-upgrade #--Upgrade system
apt-get dselect-upgrade #----Upgrade with dselect
apt-cache depends #-------(package Learn about using dependencies)
apt-cache rdepends #-------(package to understand a specific dependency, when looking at which packages the package depends on...)
apt-get build-dep #------(package Installation Related Compilation Environment)
apt-get source #-----(package download the source code for this package)
apt-get clean & & apt-get autoclean #-------Cleaning up archives of downloaded files & & Clean up only outdated packages
apt-get check #-----Check for corrupted dependencies
dpkg-S filename-Find which package filename belongs to
apt-file search filename--Find which package filename belongs to
apt-file list packagename-Lists the contents of the package
apt-file update--Update the database for apt-file

dpkg--info "Package Name"--Lists the package name after the package is unpacked.
dpkg-l-Lists all packages in the current system. Can be used in split-screen viewing with parameter less1. (Similar to rpm-qa)
dpkg-l grep-i "Package Name"-View the packages in your system associated with "Package Name".
dpkg-s queries the details of installed packages.
dpkg-L Queries where installed packages in the system are installed. (Similar to rpm-ql)
dpkg-S queries which package a file in the system belongs to. (Similar to rpm-qf)
dpkg-I query deb package details, in a package downloaded to the local to see whether to install (see 1 Bai).
dpkg-i manually install the software package (it can't solve the dependency problem before the software package). If you encounter the software dependency problem when installing a certain software package, you can use apt-get-f install to solve the dependency problem.
dpkg-r uninstall package. Not a complete uninstall, its configuration file still exists.
dpkg-P is completely uninstalled (but still does not solve the dependency problem of the software package)
dpkg-reconfigure reconfiguration

apt-get install Download the package, and all dependent packages, and install or upgrade the package at the same time. If a packet is set with hold (stop flag), it will be put on the side of 1 (that is, it will not be upgraded).
apt-get remove [--purge] Remove and any other packages that depend on this package. --purge indicates that the packet should be cleared completely (purged).
apt-get update upgrades the package list from the Debian image. If you want to install any software of the day, run it at least once a day, and must be performed every time you modify the/etc/apt/sources. list.
apt-get upgrade [-u] Upgrades all installed packages to the latest available versions. New packages are not installed or old packages are removed. If a package changes dependencies and a new package needs to be installed, it will not be upgraded, but will be flagged as hold.
apt-get update does not upgrade packages marked as hold.
apt-get dist-upgrade [-u] is similar to apt-get upgrade except that dist-upgrade installs and removes packages to satisfy dependencies. Therefore, it has a definite risk.
apt-cache search in the package name and description, search for packages that contain xxx.
apt-cache show shows a complete description of a software package.
apt-cache showpkg shows more details about the package and how it relates to other packages.

Summarize


Related articles: