If Ubuntu is installing new software, there is already a Deb installation package (for example: Iptux.deb), but you cannot log on to the desktop environment. So how do you install it? The answer is: Use the dpkg command.
The dpkg commands are often formatted as follows:
The code is as follows:
sudo dpkg-i iptux.deb#
View the details of the Iptux.deb package, including the software name, version, and size (where-I is equivalent to –info)
The code is as follows:
sudo dpkg-c iptux.deb#
View the file structure contained in the Iptux.deb package (where-C is equivalent to –contents)
The code is as follows:
sudo dpkg-i iptux.deb#
Install Iptux.deb software package (where-I is equivalent to –install)
The code is as follows:
sudo dpkg-l iptux#
View information for the Iptux package (the software name can be viewed through the dpkg-i command, where-L is equivalent to –list)
The code is as follows:
sudo dpkg-l iptux#
View all files for the Iptux package installation (the software name can be viewed through the dpkg-i command, where-L is equivalent to –listfiles)
The code is as follows:
sudo dpkg-s iptux#
View the details of the Iptux software package (the software name can be viewed through the dpkg-i command, where-S is equivalent to –status)
The code is as follows:
sudo dpkg-r iptux#
Uninstall the Iptux software package (the software name can be viewed through the dpkg-i command, where-R is equivalent to –remove)
There are several other common uses:
Solution Package:
The code is as follows:
Dpkg--unpack Package_file
This command only unpack "package_file" and does not perform package configuration work.
Configuration package:
The code is as follows:
Dpkg--configure Package
Gets, sets, and clears the selection status of the package:
Copy Code
The code is as follows:
DPKG--get-selections [Package]
Output to standard output, you can use pipelines or redirects.
The code is as follows:
Dpkg--set-selections
Obtained from standard input, you can use pipelines or redirects.
The code is as follows:
Dpkg--clear-selections
Mark all packages as unloaded.
Options:
-B
--auto-deconfigure
When the package is unloaded, all packages that depend on the unloaded package are automatically unloaded.
--no-act
--dry-run
--simulate
Test only, get output, do not make any modifications to the system.
There are also options that the tasks specified are actually handed over to Dpkg-deb, Dpkg-query:
Dpkg-deb:
-B | --build
-C | --contents
-E | --control
-X | -extract
-F | --field
-I. | --info
-X | --vextract
Dpkg-query
-L | --list
-S | --status
-L | --listfiles
-S | --search
-P | --print-avail