Linux is a famous family of open-source Unix-like operating systems. It has its root as the Linux kernel manages a system’s resources, hardware, software memory, etc.
dpkg
is a command tool offered by the Linux command line to manage Debian systems packages. It is a command tool for installation, building, removing, and managing Debian-based packages. So, it carries operations for .deb
packages through the Linux terminal.
Terminal syntax:
dpkg -S [package name]
To check if a package apache
is installed or not using dpkg
command, we enter:
dpkg -S apache.deb
If the package is installed, it returns a prompt apache.deb installed
. When not installed, it returns apache.deb not installed
.
Listing syntax:
dpkg -L
When we enter the above syntax on the command or terminal prompt, every package installed in the system is displayed.
Content list syntax:
dpkg --Contents [package name]
To list the contents in the apache
package, we enter:
dpkg --Contents apache
Every content of the apache
would be listed on the terminal.
dpkg
commandRemove syntax:
dpkg -r [package name]
To remove the apache
package, we enter:
dpkg -r apache
The above command will remove the apache
package from the list of packages in the system.
dpkg
commandInstallation syntax:
dpkg -i [package name]
To install a package apache
, we enter:
dpkg -i apache
The above command installs the package apache
.
The dpkg
command is a tool for Debian systems like Ubuntu. It is used in the terminal prompt to manage and control the resource content of the system.