Gentoo、Debian、FreeBSD軟體包管理大比拼

來源:互聯網
上載者:User

Gentoo、Debian、FreeBSD的包管理機制其實很相似,Gentoo、Debian是我最喜歡使用的Linux發行版,一個天生就是絕佳的開發平台而另一個無論是伺服器還是案頭環境無疑都是首選產品。

別跟我提rpm/yum和pacman,我不懂lol......

以關鍵詞搜尋軟體
Gentoo: emerge -s <keyword>
輸出會有這個 pkg 的簡介 , 關鍵詞都可以用正規表示式
Debian: apt-cache search <keyword>
FreeBSD: make search name=<keyword> 或 ports_glob <keyword> -- need portupgrade

安裝軟體
Gentoo: emerge <package>
Debian: apt-get install <package>
FreeBSD: portinstall <package>
<need portupgrade>

移除軟體
Gentoo: emerge unmerge <package>
Debian: apt-get remove <package>
FreeBSD: pkg_deinstall <package>
<need portupgrade>

升級單一軟體
Gentoo: emerge -u <package>
Debian: apt-get install <package>
FreeBSD: portupgrade <package>
<need portupgrade>

察看升級全系統會動到哪些套件
Gentoo: emerge -puDv world
Debian: apt-get -s dist-upgrade
FreeBSD: portupgrade -arnv

升級全系統
Gentoo: emerge -u --deep world
Debian: apt-get dist-upgrade
FreeBSD: make world ; portupgrade -ar
<need portupgrade>

查詢系統裝了哪些軟體
Gentoo: emerge -pe world 或 qpkg -I -v
Debian: dpkg --get-selections
FreeBSD: pkg_info

查詢某檔案屬於哪個軟體
Gentoo: qpkg -f <filename>
(need gentoolkit)
Debian: dpkg -S <filename>
FreeBSD: pkg_info -W <filename>

查詢某個套件安裝了什麼檔案
Gentoo: qpkg -l <pkg>
Debian: dpkg -L <pkg>
FreeBSD: pkg_info -L <pkg>

找哪些 pkg "簡介" 裡含有你要找的關鍵詞
Gentoo: emerge -S <關鍵詞>
輸出方式和前者一樣, 關鍵詞都可以用正規表示式
Debian: apt-cache search <keyword>
FreeBSD: make search key=<filename>

不管相依性強制移除某套件
Gentoo: emerge -C <pkg>
Debian: dpkg -r --force-depends <pkg>
dpkg -P --force-depends <pkg>
上面是 remove ,下面是 purge
使用 remove 不會清掉設定檔,用 purge 才會

FreeBSD: pkg_delete -f <pkg>

全系統重新編譯
Gentoo: emerge -e world
Debian: apt-get update;apt-get upgrade
FreeBSD: make world ; portupgrade -arf
<need portupgrade>

查詢有沒有裝這個關鍵詞的套件
Gentoo: qpkg -I | grep <keyword> (qpkg再加上 -v 看版本號碼)
Debian: dpkg -l | grep <keyword>
FreeBSD: pkg_info | grep <keyword>

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.