pacman -QFS

pacman -Q

* 查询所属的包

示例1:

$ pacman -Qo /usr/bin/basename
/usr/bin/basename is owned by coreutils 9.1-3

示例2:

$ pacman -Qo magick
/usr/bin/magick is owned by imagemagick 7.1.0.52-1

示例3:

$ pacman -Qo /usr/share/man/man1/convert.1.gz
/usr/share/man/man1/convert.1.gz is owned by imagemagick 7.1.0.52-1

* 查询包信息

示例:

$ pacman -Qi xorg-xwayland
Name            : xorg-xwayland
Version         : 22.1.5-1
Description     : run X clients under wayland
Architecture    : x86_64
URL             : https://xorg.freedesktop.org
Licenses        : custom
Groups          : xorg
Provides        : xorg-server-xwayland
Depends On      : nettle  libepoxy  systemd-libs  libxfont2  pixman
                  xorg-server-common  libxcvt
Optional Deps   : None
Required By     : mutter
Optional For    : None
Conflicts With  : xorg-server-xwayland
Replaces        : xorg-server-xwayland
Installed Size  : 2.20 MiB
Packager        : Andreas Radke <andyrtr@archlinux.org>
Build Date      : Thu 03 Nov 2022 12:16:50 AM CST
Install Date    : Fri 04 Nov 2022 11:34:11 AM CST
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

pacman -S

* 更新系统

sudo pacman -Syu

pacman -F

查询文件数据库,即 sync databases, 注意和 pacman -Q 的区别

可配合-y, -yy, -l, 及 -x 来使用。

pacman -F ifconfig
core/net-tools 2.10-1
    usr/bin/ifconfig

pacman -Qo ifconfig
# error: No package owns ifconfig


版权声明:本文为Famous_alger原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。