Detailed explanation of Linux system software installation commands based on Debian (recommended)

Detailed explanation of Linux system software installation commands based on Debian (recommended)

Introduction to Debian

1. Software Installation Method

1) APT method
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) Ordinary installation using dpkg: dpkg -i package_name.deb
3) Source code installation (.tar, tar.gz, tar.bz2, tar.Z)
First, unzip the source code package and then complete it through the tar command
a. Unzip xx.tar.gz: tar -zxvf xx.tar.gz
b. Unzip xx.tar.Z: tar -zxvf xx.tar.Z
c. Unzip xx.tgz: tar -zxvf xx.tgz
d. Decompress xx.bz2: bunzip2 xx.bz2
e. Unzip xx.tar: tar xf xx.tar
Then enter the unzipped directory. It is recommended to read the instruction file such as README first, because different source code packages or precompiled packages may have differences. Then it is recommended to use the ls -F --color or ls -F command (in fact, I only need the l command) to check the executable file. The executable file will be marked with an asterisk at the end.
Generally execute ./configure in sequence
make
sudo make install
The installation is complete.

2. How to uninstall the software package

1) APT method (1) Uninstall by removal: apt-get remove softname1 softname2 ...; (remove the software package. When there is a + at the end of the package, it means installation)
(2) Purge uninstallation: apt-get --purge remove softname1 softname2...; (clear the configuration at the same time)
Clean uninstall: apt-get purge sofname1 softname2...; (same as above, also clears configuration files)
2) dpkg method (1) Uninstall by removal: dpkg -r pkg1 pkg2 ...;
(2) Clean uninstall: dpkg -P pkg1 pkg2...;

3. Other commands

apt-cache search # ------(package search package)
apt-cache show #------(package gets package related information, such as description, size, version, etc.)
apt-get install # ------(package installation package)
apt-get install # -----(package --reinstall reinstall package)
apt-get -f install # -----(Force installation, "-f = --fix-missing" should be a repair installation...)
apt-get remove #-----(package delete package)
apt-get remove --purge # ------(package deletes packages, including deleting configuration files, etc.)
apt-get autoremove --purge # ----(package deletes the package and its dependent packages + configuration files, etc. (only valid for 6.10, highly recommended))
apt-get update #------Update source
apt-get upgrade #------Update installed packages
apt-get dist-upgrade # ---------Upgrade system
apt-get dselect-upgrade #------Use dselect to upgrade
apt-cache depends #-------(package understands usage dependencies)
apt-cache rdepends # ------(package To understand a specific dependency, check which packages the package depends on...)
apt-get build-dep # ------(package installation related compilation environment)
apt-get source #------(package downloads the source code of the package)
apt-get clean && apt-get autoclean # --------Clean the archive of downloaded files && only clean outdated packages
apt-get check #-------Check for damaged dependencies
dpkg -S filename -----Find which package filename belongs to
apt-file search filename -----Find which package filename belongs to
apt-file list packagename -----List the contents of a package
apt-file update --Update the apt-file database

dpkg --info "package name" -- lists the package name after the package is unpacked.
dpkg -l -- List all packages in the current system. 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 "package name" in the system.
dpkg -s queries the detailed information of the installed packages.
dpkg -L queries the installed location of the software packages in the system. (similar to rpm -ql)
dpkg -S queries the system to which package a file belongs. (similar to rpm -qf)
dpkg -I queries the detailed information of the deb package. After a software package is downloaded to the local computer, check whether it needs to be installed (just check it).
dpkg -i manually installs the software package (it cannot solve the dependency problem between the software packages). If you encounter a software dependency problem when installing a certain software package, you can use apt-get -f install to solve the dependency problem.
dpkg -r uninstalls the package. It is not a complete uninstall, its configuration files still exist.
dpkg -P uninstall all (but still can not solve the problem of software package dependencies)
dpkg -reconfigure Reconfigure

apt-get install downloads the software package and all dependent packages, and installs or upgrades the package at the same time. If a package is set with the hold flag, it will be put aside (i.e. will not be upgraded).
apt-get remove [--purge] Remove this package and any other packages that depend on it. --purge specifies that the package should be completely purged.
apt-get update updates the package lists from the Debian mirrors. It should be run at least once a day if you want to install any software that day, and it must be run every time you modify /etc/apt/sources.list.
apt-get upgrade [-u] Upgrades all installed packages to the latest available versions. No new packages will be installed or old packages removed. If a package changes dependencies that would require the installation of a new package, it will not be upgraded but instead marked as held.
apt-get update will not upgrade packages marked as held.
apt-get dist-upgrade [-u] Similar to apt-get upgrade, except that dist-upgrade will install and remove packages to satisfy dependencies. Therefore, it is somewhat dangerous.
apt-cache search Search for packages containing xxx in the package name and description.
apt-cache show displays a complete description of a package.
apt-cache showpkg displays more details about the package and its relationship to other packages.

Summarize

This is the end of this article about the detailed explanation of software installation commands for Debian-based Linux systems (recommended). For more relevant Linux system software installation commands, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed tutorial on using pip command after Python installation under Linux
  • How to install VMware Tools in Linux (CentOS 7) command line mode
  • Installation and usage instructions of rz/sz command in Linux system (detailed explanation)
  • Linux NFS installation configuration and common problems, /etc/exports configuration file, showmount command
  • Install git and common git commands on Linux system
  • How to install and set up Linux mysql command to allow remote connection
  • Ubuntu Linux installation command for PHP5.3.0

<<:  Solution to ElementUI's this.$notify.close() call not working

>>:  Analysis of the use of the MySQL database show processlist command

Recommend

Solve the problem of docker log mounting

The key is that the local server does not have wr...

In-depth explanation of special permissions SUID, SGID and SBIT in Linux

Preface For the permissions of files or directori...

22 Vue optimization tips (project practical)

Table of contents Code Optimization Using key in ...

Example of using CSS3 to achieve shiny font effect when unlocking an Apple phone

0. Introduction August 18, 2016 Today, I noticed ...

Determine whether MySQL update will lock the table through examples

Two cases: 1. With index 2. Without index Prerequ...

Summary of basic knowledge points of Linux group

1. Basic Introduction of Linux Group In Linux, ev...

Example of how to install nginx to a specified directory

Due to company requirements, two nginx servers in...

Overview of MySQL Statistics

MySQL executes SQL through the process of SQL par...

How to completely uninstall iis7 web and ftp services in win7

After I set up the PHP development environment on...

Docker uses busybox to create a base image

The first line of a Docker image starts with an i...

ThingJS particle effects to achieve rain and snow effects with one click

Table of contents 1. Particle Effects 2. Load the...

Basic usage of custom directives in Vue

Table of contents Preface text 1. Global Registra...

Mysql sorting and paging (order by & limit) and existing pitfalls

Sorting query (order by) In e-commerce: We want t...

Analysis of MySQL's planned tasks and event scheduling examples

This article uses examples to describe MySQL'...