Linux
如何在安裝時列出fedora中所有已安裝的軟體包
我可以列出它們的用途
sudo yum list installed
但是如何讓它們在安裝時顯示?
作為 root(或使用
sudo
),使用yum
選項history
.[root@fedora ~]# yum history list Loaded plugins: langpacks, presto, refresh-packagekit ID | Command line | Date and time | Action(s) | Altered ------------------------------------------------------------------------------- 250 | -y update google-chrome- | 2013-01-30 18:02 | Update | 1 EE 249 | -y update | 2013-01-25 07:11 | Update | 22 248 | -y update | 2013-01-23 17:56 | Update | 12 247 | -y update | 2013-01-23 08:41 | Update | 9 EE 246 | -y update | 2013-01-20 21:49 | Update | 4 245 | -x kernel* update | 2013-01-07 08:11 | Update | 3
您可以查看特定
yum
事務的包和更改:[root@fedora ~]# yum history info 250 Loaded plugins: langpacks, presto, refresh-packagekit Transaction ID : 250 Begin time : Wed Jan 30 18:02:31 2013 Begin rpmdb : 1624:34a60f2e27ebe4d959f1473055da42645705b96f End time : 18:02:59 2013 (28 seconds) End rpmdb : 1624:f4ef7af3a97b1f922f41803ba6b9578a7abe3e71 User : User <user> Return-Code : Success Command Line : -y update google-chrome-stable.x86_64 Transaction performed with: Installed rpm-4.9.1.3-1.fc16.x86_64 @updates Installed yum-3.4.3-25.fc16.noarch @updates Installed yum-metadata-parser-1.1.4-5.fc16.x86_64 @koji-override-0/$releasever Installed yum-presto-0.7.1-1.fc16.noarch @koji-override-0/$releasever Packages Altered: Updated google-chrome-stable-24.0.1312.56-177594.x86_64 @google-chrome Update 24.0.1312.57-178923.x86_64 @google-chrome Scriptlet output: 1 Redirecting to /bin/systemctl start atd.service
您可以使用以下命令查看特定於歷史記錄的包:
[root@fedora ~]# yum history packages-list yum Loaded plugins: langpacks, presto, refresh-packagekit ID | Action(s) | Package ------------------------------------------------------------------------------- 148 | Updated | yum-3.4.3-24.fc16.noarch EE 148 | Update | 3.4.3-25.fc16.noarch EE 94 | Updated | yum-3.4.3-23.fc16.noarch 94 | Update | 3.4.3-24.fc16.noarch 52 | Updated | yum-3.4.3-7.fc16.noarch 52 | Update | 3.4.3-23.fc16.noarch 2 | Updated | yum-3.4.3-5.fc16.noarch EE 2 | Update | 3.4.3-7.fc16.noarch EE 1 | Install | yum-3.4.3-5.fc16.noarch
man 8 yum
或yum help history
將列出更多可能使用歷史選項的選項。