What are the installation commands of linux system software based on Debian?

11-09-2023

Introduction to debian

First, the software installation method

1)apt mode a. general installation: apt-get install softname 1 softname 2 …; B. Repair and installation: apt-get-f install softname 1 softname 2 ...; (-f a temp to correct broken dependencies) C. Reinstallation: apt-get-reinstall softname 1 softname 2 ...; 2) Ordinary installation in DPKG mode: dpkg -i package_name.deb3) Source code installation (.tar, tar.gz, tar.bz2, Tar.z) Decompress the source code compressed package first and then complete it by tar command. A. Solve xx.tar.z:tar -zxvf xx.tar.zc tar.gzb. Solve XX. tar.z: tar-zxvfxx. tar.zc. Solve XX. TGZ: tar-zxvfxx. TGZD. Solve XX. BZ2: Bunzip2xx. : tarxf xx.tar then enters the extracted directory. It is suggested to read the readme and other description files first, because there may be differences between different source code packages or precompiled packages at this time, and then it is suggested to use the ls -f --color or ls -f command (in fact, mine only needs the l command) to look at the executable file, which will be marked with an * at the end. Generally, the installation can be completed by executing. /configure make sudo make install in turn.

Second, the uninstall method of software package

1)apt mode (1) removable unloading: apt-get remove softname 1 softname 2 …; (Remove the software package, when there is a+at the end of the package, it means to install) (2) Clear uninstall: apt-get-purge remove softname 1 softname 2 ...; (Clear configuration at the same time) Clear uninstall: apt-get purge sofname1 softname2 ...; (Same as above, also clear the configuration file) 2)dpkg mode (1) Removable uninstall: dpkg -r pkg1 pkg2 ...; (2) Clear unloading: dpkg -p pkg1 pkg2 ...;

Third, other orders

Apt-cachesearch #-(package search package) apt-cacheshow #-----(package obtains the relevant information of the package. Such as description, size, version, etc.) apt-get install #-(package installation package) apt-get install #-(package-reinstall package) apt-get-f install #-(mandatory installation, "--f = --fix-missing" as a repair installation ...) apt-getremove #-(package to delete the package) apt-getremove-purge #--(package to delete the package, Including deleting configuration files, etc.) apt-get auto remove-purge #-(package deletes packages and their dependent software packages+configuration files, etc. (only valid for 6.10, Highly recommended)) apt-getupdate #-update source apt-getupgrade #-update installed package apt-getdist-upgrade #-upgrade system apt-get dselect-upgrade # -use dselect to upgrade apt-cachedepends #--------------------------------------------------------------------------------- Let's see which packages the package depends on ...) apt-get build-dep #------------------------------------------------------------------------- -Clean up the archive of downloaded files & & Only clean up outdated packages apt-get check # -Check whether there is any damaged dependency dpkg -s filename ----- Find which software package the filename belongs to-Find which software package the filename belongs to-Find which software package the filename belongs to-List the package name-List the contents of the software package-Update the database of the apt-file.

Dpkg --info "package name"-lists the package name after unpacking. dpkg -l -- lists all packages in the current system. It can be used with the parameter less to view in split screen. (Similar to rpm -qa)dpkg -l | Grep -i "package name"-View the packages associated with the "package name" in the system. dpkg -s queries the details of the installed packages. dpkg -l queries the installation location of the installed packages in the system. (Similar to rpm -ql)dpkg -s queries which package a file belongs to in the system. (Similar to rpm -qf) Dpkg -i inquires about the details of the deb package, and after a software package is downloaded to the local area, see if it needs to be installed (take a look). dpkg -i manually installs the software package (which cannot solve the dependency problem before the software package). If you encounter the problem of software dependency when installing a software package, You can use apt-get -f install to solve the problem of reliability. dpkg -r uninstalls the software package. It is not completely uninstalled, but its configuration file still exists. dpkg -p uninstalls all (but it still can't solve the dependency problem of the software package). dpkg -reconfigure reconfigures.

Apt-get install downloads the software package and all the dependent packages, and installs or upgrades the packages at the same time. If a package has a hold flag set, it will be put aside (that is, it will not be upgraded). Apt-getremove [-purge] removes and any other packages that depend on this package. --purge indicates that this package should be completely purged. Apt-get update upgrades the package list from debian image. If you want to install any software of the day, you must run it at least once a day, and you must execute it every time you modify/etc /etc/apt/sources.list. Apt-get upgrade [-u] Upgrade all installed packages to the latest available version. New packages will not be installed or old packages will be removed. If a package changes its dependency and needs to install a new package, it will not be upgraded, but will be marked 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 is dangerous. Apt-cache search searches for packages containing xxx in the package name and description. Apt-cache show shows a complete description of a software package. Apt-cache showpkg shows more details of the software package and its relationship with other packages.

Copyright Description:No reproduction without permission。

Knowledge sharing community for developers。

Let more developers benefit from it。

Help developers share knowledge through the Internet。

Follow us