{"id":181791,"date":"2020-05-12T09:22:13","date_gmt":"2020-05-12T01:22:13","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=181791"},"modified":"2020-05-11T09:36:29","modified_gmt":"2020-05-11T01:36:29","slug":"arch-pacman-cmd","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/arch-pacman-cmd.html","title":{"rendered":"Arch Linux\u4e2d\u7684Pacman\u547d\u4ee4\u5982\u4f55\u4f7f\u7528"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n pacman\u5305\u7ba1\u7406\u5668\u662fArch Linux\u4e0e\u5176\u4ed6\u4e3b\u8981\u53d1\u884c\u7248\uff08\u5982Red Hat\u548cUbuntu\/Debian\uff09\u7684\u4e3b\u8981\u533a\u522b\u4e4b\u4e00\u3002pacman\u76ee\u7684\u662f\u65b9\u4fbf\u5730\u7ba1\u7406\u5305\uff0c\u4e0d\u7ba1\u8f6f\u4ef6\u5305\u662f\u6765\u81ea\u5b98\u65b9\u7684 Arch \u5e93\u8fd8\u662f\u7528\u6237\u81ea\u5df1\u521b\u5efa\uff0cpacman \u90fd\u80fd\u65b9\u4fbf\u5730\u7ba1\u7406\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\u73af\u5883<\/strong><\/div>\n

Archlinux 2020.04<\/p>\n

\u4f7f\u7528pacman\u5b89\u88c5\u7a0b\u5e8f\u5305<\/strong><\/div>\n

\u53ef\u4ee5\u4f7f\u7528pacman\u540c\u65f6\u5b89\u88c5\u4e00\u4e2a\u6216\u8005\u591a\u4e2a\u7a0b\u5e8f\u5305<\/p>\n

\r\nroot@archlinux> pacman -S --noconfirm apache \r\n<\/pre>\n

\"\"
\n-S<\/code>\uff1a\u5b89\u88c5\u5e94\u7528\u7a0b\u5e8f\u3002
\n--noconfirm<\/code>\uff1a\u5b89\u88c5\u65f6\u81ea\u52a8\u786e\u8ba4\u5b89\u88c5\u3002<\/p>\n

\u5220\u9664\u7a0b\u5e8f\u5305<\/strong><\/div>\n

\u5220\u9664\u7a0b\u5e8f\u5305\uff0c\u4f46\u4e0d\u5220\u9664\u4f9d\u8d56\u5305\uff1a<\/p>\n

\r\nroot@archlinux> pacman -R --noconfirm apache\r\n<\/pre>\n

\"\"
\n\u5220\u9664\u7a0b\u5e8f\u5305\uff0c\u5e76\u4e14\u5220\u9664\u4f9d\u8d56\u5305\uff1a<\/p>\n

\r\nroot@archlinux> pacman -Rs apache \u2013noconfirm\r\n<\/pre>\n

\"\"<\/p>\n

\u5347\u7ea7 \u5305<\/strong><\/div>\n

Pacman\u63d0\u4f9b\u4e86\u4e00\u79cd\u66f4\u65b0Arch Linux\u7684\u7b80\u5355\u65b9\u6cd5\u3002\u60a8\u53ea\u9700\u4f7f\u7528\u4e00\u4e2a\u547d\u4ee4\u5373\u53ef\u66f4\u65b0\u6240\u6709\u5df2\u5b89\u88c5\u7684\u7a0b\u5e8f\u5305\u3002\u8fd9\u53ef\u80fd\u9700\u8981\u4e00\u6bb5\u65f6\u95f4\uff0c\u5177\u4f53\u53d6\u51b3\u4e8e\u7cfb\u7edf\u7684\u66f4\u65b0\u7a0b\u5ea6\u3002<\/p>\n

\u4f7f\u7528-Syu<\/code>\u9009\u9879\uff0c\u53ef\u4ee5\u66f4\u65b0\u6240\u6709\u5df2\u7ecf\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\u3002<\/p>\n

\r\nroot@archlinux> pacman -Syu\r\n<\/pre>\n

\"\"<\/p>\n

\u641c\u7d22\u7a0b\u5e8f\u5305<\/strong><\/div>\n

\u641c\u7d22\u672c\u5730\u5df2\u7ecf\u5b89\u88c5\u7684\u7a0b\u5e8f\u5305\uff0c\u4f7f\u7528-Q<\/code>\u9009\u9879\uff1a<\/p>\n

\r\n# \u5217\u51fa\u6240\u6709\u7684\u7a0b\u5e8f\u5305\r\nroot@archlinux> pacman -Q\r\nacl 2.2.53-2\r\narchlinux-keyring 20200422-1\r\nargon2 20190702-2\r\nattr 2.4.48-2\r\naudit 2.8.5-6\r\nbase 2-2\r\nbash 5.0.016-1\r\nbash-completion 2.10-1\r\nbzip2 1.0.8-3\r\nca-certificates 20181109-3\r\n\u2026\r\n\u2026\r\n# \u641c\u7d22\u6307\u5b9a\u540d\u79f0\u7684\u7a0b\u5e8f\u5305\r\nroot@archlinux> pacman -Qs openssh                                                                                  ~\r\nlocal\/openssh 8.2p1-3\r\n    Premier connectivity tool for remote login with the SSH protocol\r\n<\/pre>\n

\"\"
\n\u67e5\u8be2\u7f51\u7edc\u6e90\u91cc\u9762\u662f\u5426\u6709\u67d0\u4e2a\u5b89\u88c5\u5305\uff0c\u53ef\u4ee5\u4f7f\u7528-Ss<\/code>\u9009\u9879\uff1a<\/p>\n

\r\nroot@archlinux> pacman -Ss Gnome-Desktop                                                                     \/usr\/bin\r\nextra\/gnome-desktop 1:3.36.2-1\r\n    Library with common API for various GNOME modules\r\n<\/pre>\n

\"\"
\n\u67e5\u8be2\u67d0\u4e2a\u6587\u4ef6\u5c5e\u4e8e\u54ea\u4e2a\u5b89\u88c5\u5305\uff1a<\/p>\n

\r\nroot@archlinux> pacman -F \/usr\/bin\/vim                                                                              ~\r\nusr\/bin\/vim is owned by extra\/gvim 8.2.0510-2\r\nusr\/bin\/vim is owned by extra\/vim 8.2.0510-2\r\nroot@archlinux> pacman -F \/usr\/bin\/ifconfig                                                                         ~\r\nusr\/bin\/ifconfig is owned by core\/net-tools 1.60.20181103git-2\r\n<\/pre>\n

\"\"
\n\u67e5\u8be2\u67d0\u4e2a\u7a0b\u5e8f\u5305\u5305\u542b\u54ea\u4e9b\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528-Ql<\/code>\u9009\u9879\uff1a<\/p>\n

\r\narchlinux# pacman -Ql net-tools\r\nnet-tools \/usr\/\r\nnet-tools \/usr\/bin\/\r\nnet-tools \/usr\/bin\/arp\r\nnet-tools \/usr\/bin\/ifconfig\r\nnet-tools \/usr\/bin\/ipmaddr\r\nnet-tools \/usr\/bin\/iptunnel\r\nnet-tools \/usr\/bin\/mii-tool\r\nnet-tools \/usr\/bin\/nameif\r\nnet-tools \/usr\/bin\/netstat\r\nnet-tools \/usr\/bin\/plipconfig\r\nnet-tools \/usr\/bin\/rarp\r\nnet-tools \/usr\/bin\/route\r\nnet-tools \/usr\/bin\/slattach\r\n\u2026\r\n<\/pre>\n

\"\"
\n\u67e5\u770b\u8be5\u7a0b\u5e8f\u5305\u6240\u4f9d\u8d56\u7684\u7a0b\u5e8f\u5305\uff0c\u53ef\u4ee5\u4f7f\u7528pactree\u67e5\u770b\u3002\u9700\u8981\u5b89\u88c5pacman-contrib\u7a0b\u5e8f\u5305\uff0c\u4f7f\u7528pactree\u4ee5\u76ee\u5f55\u6811\u7684\u5f62\u5f0f\u663e\u793a\u4f9d\u8d56\u5305\u7684\u540d\u79f0\uff1a<\/p>\n

\r\narchlinux# pactree net-tools\r\nnet-tools\r\n\u2514\u2500glibc\r\n  \u251c\u2500linux-api-headers provides linux-api-headers>=4.10\r\n  \u251c\u2500tzdata\r\n  \u2514\u2500filesystem\r\n    \u2514\u2500iana-etc\r\n<\/pre>\n

\"\"<\/p>\n

\u603b\u7ed3<\/strong><\/div>\n

pacman\u5305\u7ba1\u7406\u5668\u662fArch Linux\u4e0e\u5176\u4ed6\u4e3b\u8981\u53d1\u884c\u7248\uff08\u5982Red Hat\u548cUbuntu\/Debian\uff09\u7684\u4e3b\u8981\u533a\u522b\u4e4b\u4e00\u3002pacman\u76ee\u7684\u662f\u65b9\u4fbf\u5730\u7ba1\u7406\u5305\uff0c\u4e0d\u7ba1\u8f6f\u4ef6\u5305\u662f\u6765\u81ea\u5b98\u65b9\u7684 Arch \u5e93\u8fd8\u662f\u7528\u6237\u81ea\u5df1\u521b\u5efa\uff0cpacman \u90fd\u80fd\u65b9\u4fbf\u5730\u7ba1\u7406\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Archlinux 2020.04 \u53ef\u4ee5\u4f7f\u7528pacman\u540c\u65f6\u5b89\u88c5\u4e00\u4e2a\u6216\u8005\u591a\u4e2a\u7a0b\u5e8f\u5305 root@archlinu […]<\/p>\n","protected":false},"author":309,"featured_media":181792,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-181791","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/181791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/309"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=181791"}],"version-history":[{"count":4,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/181791\/revisions"}],"predecessor-version":[{"id":181809,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/181791\/revisions\/181809"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/181792"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=181791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=181791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=181791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}