Home  >  Article  >  System Tutorial  >  Easily master the dpkg command under Linux

Easily master the dpkg command under Linux

WBOY
WBOYforward
2024-02-10 11:48:171171browse

As an administrator, you definitely need to manage various software packages on your Linux system, and the dpkg command is a very important software package management tool in the Linux operating system. It can be used to install, delete, query information about installed software packages, etc. However, many beginners may find the dpkg command too complicated and don't know where to start. Don't worry, this article will help you easily master the dpkg command under Linux.

Easily master the dpkg command under Linux

grammar:

dpkg(options)(parameters)

Options:

-i:Install software package

-r: Delete software package

-P: Delete the configuration file when deleting the software package

-L: Display files associated with the software package

–unpack: Unpack the software package

-c: Display the file list in the software package

-configure:Configure software package

parameter:

deb package

List the contents of the deb package or the directory structure in the file

sudo dpkg -c /var/cache/apt/archives/fdisk_2.34-0.1ubuntu9.1_amd64.deb
Easily master the dpkg command under Linux

install software

sudo dpkg -i /var/cache/apt/archives/fdisk_2.34-0.1ubuntu9.1_amd64.deb
Easily master the dpkg command under Linux

fdisk_2.34-0.1ubuntu9.1_amd64.deb has been downloaded to the computer software package.

Query software package

dpkg -l fdisk#Query the version of the software package
dpkg -L fdisk#Query the files associated with the software package

Easily master the dpkg command under Linux

dpkg -s fdisk#Query the detailed information of the software package

Easily master the dpkg command under Linux

Display all installed deb packages, and display the version number and summary description

dpkg -l
Easily master the dpkg command under Linux
dpkg -l |grep fdisk
Easily master the dpkg command under Linux

Remove package

sudo dpkg -P fdisk
Easily master the dpkg command under Linux

#Uninstall the software package without retaining the configuration, -r retains the configuration.

Through the introduction of this article, I believe that everyone has a deeper understanding and mastery of the dpkg command under Linux. Whether you are a newbie or an administrator who is already proficient in Linux, the dpkg command is the basic knowledge that must be understood. By learning the basic usage of the dpkg command and common command options introduced in this article, you can manage software packages on your Linux system more efficiently. Let’s master this important command together!

The above is the detailed content of Easily master the dpkg command under Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:lxlinux.net. If there is any infringement, please contact admin@php.cn delete