天天看點

Debian/Ubuntu上如何使用APT包管理工具

在linux系統或者伺服器上使用包管理工具管理包是一件很重要的事情,不同的linux發行版都在系統中預裝了待編譯的二進制檔案,配置檔案以及相關資訊。

相關閱讀:Read Also: Learn 25 ‘apt-get’ and ‘apt-cache’ Command Examples in Debian based Systems

包管理工具可以有很多使用方式來幫助我們管理系統或者服務戲,例如:

  1. 下載下傳和灌裝軟體
  2. 從源碼編譯軟體
  3. 記錄所有已安裝軟體的更新和更新

    管理軟體的依賴關系

    以及管理已安裝軟體的其他資訊

    在這篇文章中我們會列舉Debian/Ubuntu的新的包管理工具apt的15種用法。

    apt是一個ubuntu/Debian系統上的指令行包管理工具,通過指令行來實作系統上包管理接口。

$ sudo apt install glances   //Installing a Package
$ sudo apt content glances   // Find Location of Installed Packag
$ sudo apt depends glances   //Check All Dependencies of a Package
$ sudo apt search apache   //Search for a Package
$ sudo apt show firefox   //view Information About Package
$ sudo apt check firefox   //Verify a Package for any Broken Dependencies
$ sudo apt recommends apache2   //List Recommended Missing Packages of Given Package
$ sudo apt version firefox   //Check Installed Package Version
$ sudo apt upgrade   //Upgrade System
$ sudo apt autoremove   //Remove Unused Packages
$ sudo apt autoclean    //Clean Old Repository of Downloaded Packages
or
$ sudo apt clean
$ sudo apt purge glances  //Remove Packages with its Configuration Files
$ sudo apt deb atom-amd64.deb   //Install .Deb Package
$ apt help   //Find Help While Using APT
           

原文連結:15 Examples of How to Use New Advanced Package Tool (APT) in Ubuntu/Debian

繼續閱讀