在 ubuntu 系統下如果要列出已經安裝的套件
root@test3:~# apt list --installed

假設要看有 php 關鍵字的套件
root@test3:~# apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libapache2-mod-php7.2/bionic-updates,bionic-security,now 7.2.17-0ubuntu0.18.04.1 amd64 [installed,automatic]
php/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-common/bionic,bionic,now 1:60ubuntu1 all [installed,automatic]
php-curl/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-dev/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-fpm/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-gd/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-mbstring/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-mysql/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-pear/bionic-updates,bionic-updates,bionic-security,bionic-security,now 1:1.10.5+submodules+notgz-1ubuntu1.18.04.1 all [installed]
php-xml/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-xmlrpc/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php-zip/bionic,bionic,now 1:7.2+60ubuntu1 all [installed]
php7.2/bionic-updates,bionic-updates,bionic-security,bionic-security,now 7.2.17-0ubuntu0.18.04.1 all [installed,automatic]
php7.2-cli/bionic-updates,bionic-security,now 7.2.17-0ubuntu0.18.04.1 amd64 [installed,automatic]
php7.2-common/bionic-updates,bionic-security,now 7.2.17-0ubuntu0.18.04.1 amd64 [installed,automatic]
php7.2-curl/bionic-updates,bionic-security,now 7.2.17-0ubuntu0.18.04.1 amd64 [installed,automatic]
php7.2-dev/bionic-updates,bionic-security,now 7.2.17-0ubuntu0.18.04.1 amd64 [installed,automatic]
php7.2-fpm/bionic-updates,bionic-security,now 7.2.17-0ubuntu0.18.04.1 amd64 [installed,automatic]
php7.2-gd/bionic-updates,bionic-security,now 7.2.17-0ubuntu0.18.04.1 amd64 [installed,automatic]
php7.2-json/bionic-updates,bionic-security,now 7.2.17-0ubuntu0.18.04.1 amd64 [installed,automatic]
php7.2-mbstring/bionic-updates,bionic-security,now 7.2.17-0ubuntu0.18.04.1 amd64 [installed,automatic]
php7.2-mysql/bionic-updates,bionic-security,now 7.2.17-0ubuntu0.18.04.1 amd64 [installed,automatic]
php7.2-opcache/bionic-updates,bionic-security,now 7.2.17-0ubuntu0.18.04.1 amd64 [installed,automatic]
php7.2-readline/bionic-updates,bionic-security,now 7.2.17-0ubuntu0.18.04.1 amd64 [installed,automatic]
php7.2-xml/bionic-updates,bionic-security,now 7.2.17-0ubuntu0.18.04.1 amd64 [installed,automatic]
php7.2-xmlrpc/bionic-updates,bionic-security,now 7.2.17-0ubuntu0.18.04.1 amd64 [installed,automatic]
php7.2-zip/bionic-updates,bionic-security,now 7.2.17-0ubuntu0.18.04.1 amd64 [installed,automatic]
pkg-php-tools/bionic,bionic,now 1.35ubuntu1 all [installed,automatic]

undefined
Ubuntu 系統管理與架站實務(第三版)

作者: 施威銘研究室
出版社:旗標

arrow
arrow
    文章標籤
    ubuntu apt
    全站熱搜

    helloworld 發表在 痞客邦 留言(0) 人氣()