How to verify whether a certain software package has been installed in the ubuntu system?

On Ubuntu, you can use dpkgthe command to verify that a package is installed.

  1. Open a terminal.

  2. Enter the following command:

    dpkg -s <软件包名>
    

    For example, if you want to verify vimthat is installed, you can enter:

    dpkg -s vim
    
  3. Press the Enter key to run the command.

  4. If the software package has been installed, you will see detailed information about the software package, including version number, etc. Here is an example of querying vim. The screenshot is as follows:
    Insert image description here

If the package is not installed, you will see an error message, as shown in the screenshot below:
Insert image description here

This way you can verify whether a specific package is installed on Ubuntu, give it a try.

Guess you like

Origin blog.csdn.net/gzg1500521074/article/details/131383662