如何使用 APT 查看已安装的命令的名称?

如何使用 APT 查看已安装的命令的名称?

下面我python3-pip使用 APT 安装 Python。从输出中看不出来安装的命令是名为pip3而不是python3-pip

一般来说,我如何使用 APT 查看已安装命令的名称,这样我就不用去猜测了?

nlykkei@ubuntu-dev:~$ apt search python3-pip
Sorting... Done
Full Text Search... Done
python3-pip/cosmic,cosmic 9.0.1-2.3 all
  Python package installer

nlykkei@ubuntu-dev:~$ sudo apt install python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  python3-pip
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 114 kB of archives.
After this operation, 599 kB of additional disk space will be used.
Get:1 http://dk.archive.ubuntu.com/ubuntu cosmic/universe amd64 python3-pip all 9.0.1-2.3 [114 kB]                                                                              
Fetched 114 kB in 0s (279 kB/s)     
Selecting previously unselected package python3-pip.
(Reading database ... 203713 files and directories currently installed.)
Preparing to unpack .../python3-pip_9.0.1-2.3_all.deb ...
Unpacking python3-pip (9.0.1-2.3) ...
Setting up python3-pip (9.0.1-2.3) ...
Processing triggers for man-db (2.8.4-2) ...

答案1

我不知道是否有其他方式或apt-query方法来显示属于某个包的二进制文件。一个简单的解决方案是

 dpkg -L python3-pip | grep -ai bin

dpkg -L python3-pip列出已安装包的所有内容。

欲了解更多信息,请查看软件包

相关内容