0 - en to zh-TW translation catalogue (201 entries)

en: Maintenance and Updates: The APT Tools
zh-TW: 維護與更新：APT 工具

en: <emphasis>VOCABULARY</emphasis> Package source and source package
zh-TW: <emphasis>術語</emphasis> 套件來源與原始套件

en: <emphasis>BACK TO BASICS</emphasis> <command>gzip</command>, <command>bzip2</command>, <command>LZMA</command> and <command>XZ</command> Compression
zh-TW: <emphasis>基礎</emphasis> <command>gzip</command>、<command>bzip2</command>、<command>LZMA</command> 與 <command>XZ</command> 壓縮

en: A <filename>.gz</filename> extension refers to a file compressed with the <command>gzip</command> utility. <command>gzip</command> is the fast and efficient traditional Unix utility to compress files. Newer tools achieve better rates of compression but require more resources (computation time and memory) to compress and uncompress a file. Among them, and by order of appearance, there are <command>bzip2</command> (generating files with a <filename>.bz2</filename> extension), <command>lzma</command> (generating <filename>.lzma</filename> files) and <command>xz</command> (generating <filename>.xz</filename> files).
zh-TW: 延伸檔名 <filename>.gz</filename> 表示該檔案以 <command>gzip</command> 工具壓縮而成。<command>gzip</command> 是最快最有效率的傳統型 Unix 壓縮檔案工具。較新的工具壓縮效率較佳，但耗費較多資源 (電腦時間與金錢) 才能壓縮或解壓縮檔案。依字順為 <command>bzip2</command> (延伸檔名為 <filename>.bz2</filename>)、<command>lzma</command> (延伸檔名為 <filename>.lzma</filename>) 與 <command>xz</command> (延伸檔名為 <filename>.xz</filename>)。

en: Filling in the <filename>sources.list</filename> File
zh-TW: 寫入 <filename>sources.list</filename> 檔案

en: <primary>source</primary><secondary>of packages</secondary>
zh-TW: <primary>來源</primary><secondary>套件的</secondary>

en: <primary>package</primary><secondary>source of</secondary>
zh-TW: <primary>套件</primary><secondary>的來源</secondary>

en: Syntax
zh-TW: 語法

en: The first field indicates the source type:
zh-TW: 第一個欄位指示來源類型：

en: <emphasis>VOCABULARY</emphasis> The <literal>main</literal>, <literal>contrib</literal> and <literal>non-free</literal> archives
zh-TW: <emphasis>術語</emphasis><literal>主要</literal>、<literal>奉獻</literal> 與 <literal>不自由</literal> 檔案

en: <primary>component (of a repository)</primary>
zh-TW: <primary>元件 (典藏所)</primary>

en: If many package sources are referenced, it can be useful to split them in multiple files. Each part is then stored in <filename>/etc/apt/sources.list.d/<replaceable>filename</replaceable>.list</filename> (see sidebar <xref linkend="sidebar.directory.d" />).
zh-TW: 確認套件來源後，可以把它拆成多個檔案。每個部份都存在 <filename>/etc/apt/sources.list.d/<replaceable>檔名</replaceable>.list</filename> (見專欄 <xref linkend="sidebar.directory.d" />) 內。

en: The <literal>cdrom</literal> entries describe the CD/DVD-ROMs you have. Contrary to other entries, a CD-ROM is not always available since it has to be inserted into the drive and since only one disc can be read at a time. For those reasons, these sources are managed in a slightly different way, and need to be added with the <command>apt-cdrom</command> program, usually executed with the <literal>add</literal> parameter. The latter will then request the disc to be inserted in the drive and will browse its contents looking for <filename>Packages</filename> files. It will use these files to update its database of available packages (this operation is usually done by the <command>apt update</command> command). From then on, APT can require the disc to be inserted if it needs one of its packages.
zh-TW: <literal>cdrom</literal> 條目表示您有此 CD/DVD-ROMs。相對於其他條目，CD-ROM 並非經常存在，一次祗能塞入一張。基於這個理由，以不同的方式管理此來源，需用到 <command>apt-cdrom</command> 程式，及 <literal>add</literal> 參數。要求將光碟插入光碟機，並找尋 <filename>套件</filename> 檔案。以此等檔案更新可用套件的資料庫 (通常以 <command>apt update</command> 命令完成它)。然後，APT 才能要求插入包括其套件的光碟。

en: Repositories for <emphasis role="distribution">Stable</emphasis> Users
zh-TW: <emphasis role="distribution">穩定版</emphasis> 使用者的典藏庫

en: <primary><literal>stable-backports</literal></primary>
zh-TW: <primary><literal>穩定回移</literal></primary>

en: <primary><literal>stable-updates</literal></primary>
zh-TW: <primary><literal>穩定更新</literal></primary>

en: Here is a standard <filename>sources.list</filename> for a system running the <emphasis role="distribution">Stable</emphasis> version of Debian:
zh-TW: 以下是標準的 <filename>sources.list</filename> 供系統執行 <emphasis role="distribution">穩定</emphasis> 版 Debian：

en: <filename>/etc/apt/sources.list</filename> file for users of Debian Stable
zh-TW: 供 Debian 穩定版使用者的 <filename>/etc/apt/sources.list</filename>

en: Note that when the desired version of a package is available on several repositories, the first one listed in the <filename>sources.list</filename> file will be used. For this reason, non-official sources are usually added at the end of the file.
zh-TW: 請注意，指定版本的套件可能同時存在多個典藏庫，將取用列在 <filename>sources.list</filename> 檔案前面的典藏庫。所以，非官方的來源多半放在此檔案的最後面。

en: As a side note, most of what this section says about <emphasis role="distribution">Stable</emphasis> applies equally well to <emphasis role="distribution">Oldstable</emphasis> since the latter is just an older <emphasis role="distribution">Stable</emphasis> that is maintained in parallel.
zh-TW: 補充說明，本節有關 <emphasis role="distribution">穩定版</emphasis> 的內容同樣適用於 <emphasis role="distribution">舊穩定版</emphasis>，因為後者祗是較舊的 <emphasis role="distribution">穩定版</emphasis>，仍然同步維護中。

en: Security Updates
zh-TW: 安全更新

en: <primary>updates</primary><secondary>security updates</secondary>
zh-TW: <primary>更新</primary><secondary>安全更新</secondary>

en: Stable Updates
zh-TW: 穩定更新

en: <primary>stable updates</primary>
zh-TW: <primary>穩定更新</primary>

en: Stable updates are not security sensitive but are deemed important enough to be pushed to users before the next stable point release.
zh-TW: 穩定更新與安全無關，但認為在下個穩定釋出點前值得使用者更新它。

en: Proposed Updates
zh-TW: 建議更新

en: <primary><literal>proposed-updates</literal></primary>
zh-TW: <primary><literal>建議更新</literal></primary>

en: <primary><literal>stable-proposed-updates</literal></primary>
zh-TW: <primary><literal>穩定版建議更新</literal></primary>

en: Once published, the <emphasis role="distribution">Stable</emphasis> distribution is only updated about once every 2 months. The <literal>proposed-updates</literal> repository is where the expected updates are prepared (under the supervision of the Stable Release Managers).
zh-TW: 出版之後，<emphasis role="distribution">穩定</emphasis> 發行版是唯一固定 2 個月更新的版本。<literal>建議的更新</literal> 典藏庫是儲放更新資料的地方 (由穩定版釋出經理管轄)。

en: The security and stable updates documented in the former sections are always included in this repository, but there is more too, because package maintainers also have the opportunity to fix important bugs that do not deserve an immediate release.
zh-TW: 此典藏所包括前一節的安全與穩定更新文件，以及其他的文件，因為套件維護者也需修護不需立即釋出的重要錯誤。

en: Stable Backports
zh-TW: 穩定回移

en: <primary>backport</primary>
zh-TW: <primary>回移</primary>

en: <primary>updates</primary><secondary>backports</secondary>
zh-TW: <primary>更新</primary><secondary>回移</secondary>

en: The <literal>stable-backports</literal> repository hosts “package backports”. The term refers to a package of some recent software which has been recompiled for an older distribution, generally for <emphasis role="distribution">Stable</emphasis>.
zh-TW: <literal>穩定回移</literal> 典藏庫儲存 “回移的套件”。係指重新編譯供舊發行版使用的套件，通常係供 <emphasis role="distribution">h穩定版</emphasis> 使用。

en: Repositories for <emphasis role="distribution">Testing</emphasis>/<emphasis role="distribution">Unstable</emphasis> Users
zh-TW: 供 <emphasis role="distribution">測試版</emphasis>/<emphasis role="distribution">不穩定版</emphasis> 使用者的典藏庫

en: Here is a standard <filename>sources.list</filename> for a system running the <emphasis role="distribution">Testing</emphasis> or <emphasis role="distribution">Unstable</emphasis> version of Debian:
zh-TW: 這裡是標準的 <filename>sources.list</filename> 供執行 Debian <emphasis role="distribution">測試版</emphasis> 或 <emphasis role="distribution">不穩定版</emphasis> 之用：

en: <filename>/etc/apt/sources.list</filename> file for users of Debian <emphasis role="distribution">Testing</emphasis>/<emphasis role="distribution">Unstable</emphasis>
zh-TW: <filename>/etc/apt/sources.list</filename> 檔案供 Debian <emphasis role="distribution">測試版</emphasis>/<emphasis role="distribution">不穩定版</emphasis> 使用者

en: The <emphasis role="distribution">Experimental</emphasis> Repository
zh-TW: <emphasis role="distribution">實驗性</emphasis> 典藏所

en: <primary><emphasis role="distribution">Experimental</emphasis></primary>
zh-TW: <primary><emphasis role="distribution">實驗性</emphasis></primary>

en: The archive of <emphasis role="distribution">Experimental</emphasis> packages is present on all Debian mirrors, and contains packages which are not in the <emphasis role="distribution">Unstable</emphasis> version yet because of their substandard quality — they are often software development versions or pre-versions (alpha, beta, release candidate…). A package can also be sent there after undergoing subsequent changes which can generate problems. The maintainer then tries to uncover them with help from advanced users who can handle important issues. After this first stage, the package is moved into <emphasis role="distribution">Unstable</emphasis>, where it reaches a much larger audience and where it will be tested in much more detail.
zh-TW: <emphasis role="distribution">實驗性</emphasis> 典藏所的套件是所有 Debian 鏡射站的內容，包括因為品質關係尚未被納入 <emphasis role="distribution">不穩定版</emphasis> 的套件 — 通常是發展中的軟體版本或前置版 (alpha、beta、待釋出…)。修改過的套件多少有點問題，可送至此處。在進階使用者的協助下，維護者努力找出該等問題。經過第一階段後，把套件移至 <emphasis role="distribution">不穩定版</emphasis>，更多的使用者以更詳細的方式測試它。

en: <emphasis role="distribution">Experimental</emphasis> is generally used by users who do not mind breaking their system and then repairing it. This distribution gives the possibility to import a package which a user wants to try or use as the need arises. That is exactly how Debian approaches it, since adding it in APT's <filename>sources.list</filename> file does not lead to the systematic use of its packages. The line to be added is:
zh-TW: 不在乎系統崩盤並有能力自行修復的使用者，就會取用 <emphasis role="distribution">實驗性</emphasis> 的套件。使用者匯入此等套件並測試其功能、檢查是否滿足其需求。這就是 Debian 的訴求，加入 APT 的 <filename>sources.list</filename> 內，並不表示該套件可順利使用，應加入這一個行：

en: Non-Official Resources: <literal>mentors.debian.net</literal>
zh-TW: 非官方資源：<literal>mentors.debian.net</literal>

en: <emphasis>COMMUNITY</emphasis> The <literal>debian.net</literal> sites
zh-TW: <emphasis>社群</emphasis><literal>debian.net</literal> 網站

en: The <emphasis>debian.net</emphasis> domain is not an official resource of the Debian project. Each Debian developer may use that domain name for their own use. These websites can contain unofficial services (sometimes personal sites) hosted on a machine which does not belong to the project and set up by Debian developers, or even prototypes about to be moved on to <emphasis>debian.org</emphasis>. Two reasons can explain why some of these prototypes remain on <emphasis>debian.net</emphasis>: either no one has made the necessary effort to transform it into an official service (hosted on the <emphasis>debian.org</emphasis> domain, and with a certain guarantee of maintenance), or the service is too controversial to be officialized.
zh-TW: <emphasis>debian.net</emphasis> 網址不是 Debian 計畫的官方資源。每個 Debian 發展者都可使用此網址。這些網站可能包括非官方的服務 (有時是個人網站) 位於不屬於計畫的機器上，且由 Debian 發展者建拉，或將移至 <emphasis>debian.org</emphasis> 的原型。這些原型留在 <emphasis>debian.net</emphasis> 的原因有二：沒有人發願把它轉移成為官方服務 (置於 <emphasis>debian.org</emphasis> 網址，並保證後續的維護)，或太具爭論性。

en: Installing a package means giving root rights to its creator, because they decide on the contents of the initialization scripts which are run under that identity. Official Debian packages are created by volunteers who have been co-opted and reviewed and who can seal their packages so that their origin and integrity can be checked.
zh-TW: 安裝套件就是把根權限給其創造者，因為他們決定執行該等腳本的內容。Debian 官方的套件由志願者建立，並封閉套件以確保其完整。

en: Caching Proxy for Debian Packages
zh-TW: Debian 套件快取代理

en: <primary>proxy cache</primary>
zh-TW: <primary>代理伺服器快取</primary>

en: <primary>cache, proxy</primary>
zh-TW: <primary>快取，代理伺服器</primary>

en: When an entire network of machines is configured to use the same remote server to download the same updated packages, any administrator knows that it would be beneficial to have an intermediate proxy acting as a network-local cache (see sidebar <xref linkend="sidebar.cache" />).
zh-TW: 當機器的整個網路都組態成使用同個遠端伺服器下載同個更新套件，管理者就知道中介性質的代理做為在地網路的快取，是最有益的。(見專欄 <xref linkend="sidebar.cache" />)。

en: You can configure APT to use a "standard" proxy (see <xref linkend="sect.apt-config" /> for the APT side, and <xref linkend="sect.http-ftp-proxy" /> for the proxy side), but the Debian ecosystem offers better options to solve this problem. The dedicated software presented in this section are smarter than a plain proxy cache because they can rely on the specific structure of APT repositories (for instance they know when individual files are obsolete or not, and thus adjust the time during which they are kept).
zh-TW: 可以用 "標準" 代理組態 APT (見 <xref linkend="sect.apt-config" /> 給 APT 使用，把 <xref linkend="sect.http-ftp-proxy" /> 給代理端)，但 Debian 的生態系統以更好的選擇解決此問題。本區列出的專用軟體比純快取更聰明，因為他們使用特定構架的 APT 典藏所 (例如他們知道檔案是否已過時，且在持有時調整其內容)。

en: <emphasis role="pkg">apt-cacher</emphasis> and <emphasis role="pkg">apt-cacher-ng</emphasis> work like usual proxy cache servers. APT's <filename>sources.list</filename> is left unchanged, but APT is configured to use them as proxy for outgoing requests.
zh-TW: <emphasis role="pkg">apt-cacher</emphasis> 與 <emphasis role="pkg">apt-cacher-ng</emphasis> 就像一般快取伺服器般運作。APT 的 <filename>sources.list</filename> 不變，但 APT 組態成像是快取。

en: <emphasis role="pkg">approx</emphasis>, on the other hand, acts like an HTTP server that “mirrors” any number of remote repositories in its top-level URLs. The mapping between those top-level directories and the remote URLs of the repositories is stored in <filename>/etc/approx/approx.conf</filename>:
zh-TW: 換句話說，<emphasis role="pkg">approx</emphasis> 就像是 “鏡射” 至高層 URL 的遠端 HTTP 伺服器典藏所。高層典藏所與遠端 URL 典藏所是儲存在 <filename>/etc/approx/approx.conf</filename>：

en: <command>aptitude</command>, <command>apt-get</command>, and <command>apt</command> Commands
zh-TW: <command>aptitude</command>、<command>apt-get</command>、與 <command>apt</command> 命令

en: Initialization
zh-TW: 初始化

en: Installing and Removing
zh-TW: 安裝與移除

en: <primary>package</primary><secondary>installation</secondary>
zh-TW: <primary>套件</primary><secondary>安裝</secondary>

en: <primary>package</primary><secondary>removal</secondary>
zh-TW: <primary>套件</primary><secondary>移除</secondary>

en: <primary>installation</primary><secondary>package installation</secondary>
zh-TW: <primary>安裝</primary><secondary>套件安裝</secondary>

en: <primary>removal of a package</primary>
zh-TW: <primary>移除套件</primary>

en: <emphasis>TIP</emphasis> Installing the same selection of packages several times
zh-TW: <emphasis>秘訣</emphasis> 同個套件安裝多次

en: It can be useful to systematically install the same list of packages on several computers. This can be done quite easily.
zh-TW: 在多部電腦安系統性地安裝相同的套件。此工作還很簡單。

en: First, retrieve the list of packages installed on the computer which will serve as the “model” to copy.
zh-TW: 首先，取得電腦內安裝套件的清單做為複製的 “模板”。

en: The <filename>pkg-list</filename> file then contains the list of installed packages. Next, transfer the <filename>pkg-list</filename> file onto the computers you want to update and use the following commands:
zh-TW: <filename>pkg-list</filename> 檔案內容是已安裝套件的清單。然後，用以下的指令把 <filename>pkg-list</filename> 檔案複製在欲更新的電腦：

en: ## Update dpkg's database of known packages
    # <userinput>avail=`mktemp`</userinput>
    # <userinput>apt-cache dumpavail &gt; "$avail"</userinput>
    # <userinput>dpkg --merge-avail "$avail"</userinput>
    # <userinput>rm -f "$avail"</userinput>
    ## Update dpkg's selections
    # <userinput>dpkg --set-selections &lt; pkg-list</userinput>
    ## Ask apt-get to install the selected packages
    # <userinput>apt-get dselect-upgrade</userinput>
zh-TW: ## 更新 dpkg 已知套件的資料
    #<userinput>avail=`mktemp`</userinput>
    # <userinput>apt-cache dumpavail &gt; "$avail"</userinput>
    # <userinput>dpkg --merge-avail "$avail"</userinput>
    # <userinput>rm -f "$avail"</userinput>
    ## 更新 dpkg 的選擇
    # <userinput>dpkg --set-selections &lt; pkg-list</userinput>
    ## 要求 apt-get 安裝指定的套件
    # <userinput>apt-get dselect-upgrade</userinput>

en: <emphasis>TIP</emphasis> Removing and installing at the same time
zh-TW: <emphasis>秘訣</emphasis> 同時移除與安裝

en: It is possible to ask <command>apt</command> (or <command>apt-get</command>, or <command>aptitude</command>) to install certain packages and remove others on the same command line by adding a suffix. With an <command>apt install</command> command, add “<literal>-</literal>” to the names of the packages you wish to remove. With an <command>apt remove</command> command, add “<literal>+</literal>” to the names of the packages you wish to install.
zh-TW: 在命令 <command>apt</command> (或 <command>apt-get</command>、或 <command>aptitude</command>) 加入後綴就可以同時安裝指定的套件與移除其他套件。在 <command>apt install</command> 命令加入 “<literal>-</literal>” 及希望移除的套件名稱。在 <command>apt remove</command> 命令加入 “<literal>+</literal>” 及希望安裝的套件名稱。

en: The next example shows two different ways to install <replaceable>package1</replaceable> and to remove <replaceable>package2</replaceable>.
zh-TW: 以下顯示安裝 <replaceable>套件1</replaceable> 與移除 <replaceable>套件2</replaceable> 的例子。

en: <emphasis>TIP</emphasis> <command>apt --reinstall</command> and <command>aptitude reinstall</command>
zh-TW: <emphasis>秘訣</emphasis> <command>apt --reinstall</command> 與 <command>aptitude reinstall</command>

en: <primary>reinstallation</primary>
zh-TW: <primary>重新安裝</primary>

en: The system can sometimes be damaged after the removal or modification of files in a package. The easiest way to retrieve these files is to reinstall the affected package. Unfortunately, the packaging system finds that the latter is already installed and politely refuses to reinstall it; to avoid this, use the <literal>--reinstall</literal> option of the <command>apt</command> and <command>apt-get</command> commands. The following command reinstalls <emphasis role="pkg">postfix</emphasis> even if it is already present:
zh-TW: 移除或修改套件內的檔案後，此系統可能受損。最簡易的修復方法是重新安裝受損的套件。不幸的是，套件管理系統拒絕安裝已經安裝的套件；可使用 <literal>--reinstall</literal> 選項於 <command>apt</command> 與 <command>apt-get</command> 命令中就能再安裝。即使已有仍可使用以下的指命令 <emphasis role="pkg">postfix</emphasis> 再安裝：

en: The <command>aptitude</command> command line is slightly different, but achieves the same result with <command>aptitude reinstall postfix</command>.
zh-TW: <command>aptitude</command> 命令列有點不同，但其結果與 <command>aptitude reinstall postfix</command> 命令相同。

en: The problem does not arise with <command>dpkg</command>, but the administrator rarely uses it directly.
zh-TW: 在 <command>dpkg</command> 裡沒有這個問題，但管理者很少用它。

en: Be careful! Using <command>apt --reinstall</command> to restore packages modified during an attack will certainly not recover the system as it was. <xref linkend="sect.dealing-with-compromised-machine" /> details the necessary steps to take with a compromised system.
zh-TW: 小心！使用 <command>apt --reinstall</command> 修復被攻擊的套件不會恢復系統原來的樣子。<xref linkend="sect.dealing-with-compromised-machine" /> 詳述恢復的必要步驟。

en: <emphasis>GOING FURTHER</emphasis> The cache of <filename>.deb</filename> files
zh-TW: <emphasis>下一步</emphasis> 快取 <filename>.deb</filename> 檔

en: System Upgrade
zh-TW: 系統升級

en: <primary>upgrade</primary><secondary>system upgrade</secondary>
zh-TW: <primary>升級</primary><secondary>系統升級</secondary>

en: Regular upgrades are recommended, because they include the latest security updates. To upgrade, use <command>apt upgrade</command>, <command>apt-get upgrade</command> or <command>aptitude safe-upgrade</command> (of course after <command>apt update</command>). This command looks for installed packages which can be upgraded without removing any packages. In other words, the goal is to ensure the least intrusive upgrade possible. <command>apt-get</command> is slightly more demanding than <command>aptitude</command> or <command>apt</command> because it will refuse to install packages which were not installed beforehand.
zh-TW: 建議使用正常的升級，因為包括最新的安全升級。升級的指令，有 <command>apt upgrade</command>、<command>apt-get upgrade</command> 或 <command>aptitude safe-upgrade</command> (當然是跟著 <command>apt update</command> 之後)。在不移除任何套件的情況下，此命令搜尋已安裝套件中可以升級的部份。換句話說，其目標是做到侵入性最小的升級。<command>apt-get</command> 比 <command>aptitude</command> 或 <command>apt</command> 有更多的需求，因為拒絕安裝不曾安裝過的套件。

en: <command>apt</command> will generally select the most recent version number (except for packages from <emphasis role="distribution">Experimental</emphasis> and <emphasis role="distribution">stable-backports</emphasis>, which are ignored by default whatever their version number). If you specified <emphasis role="distribution">Testing</emphasis> or <emphasis role="distribution">Unstable</emphasis> in your <filename>sources.list</filename>, <command>apt upgrade</command> will switch most of your <emphasis role="distribution">Stable</emphasis> system to <emphasis role="distribution">Testing</emphasis> or <emphasis role="distribution">Unstable</emphasis>, which might not be what you intended.
zh-TW: <command>apt</command> 會選擇最新的版本號 (除了來自 <emphasis role="distribution">實驗版</emphasis> 與 <emphasis role="distribution">穩定反向植入版</emphasis>，其預設忽略版本號)。若指定 <emphasis role="distribution">測試版</emphasis> 或 <emphasis role="distribution">不穩定版</emphasis> 於 <filename>sources.list</filename> 內，則 <command>apt upgrade</command> 會把 <emphasis role="distribution">穩定版</emphasis> 系統切換至 <emphasis role="distribution">測試版</emphasis> 或 <emphasis role="distribution">不穩定版</emphasis>，這些都不是您要的。

en: For more important upgrades, such as the change from one major Debian version to the next, you need to use <command>apt full-upgrade</command>. With this instruction, <command>apt</command> will complete the upgrade even if it has to remove some obsolete packages or install new dependencies. This is also the command used by users who work daily with the Debian <emphasis role="distribution">Unstable</emphasis> release and follow its evolution day by day. It is so simple that it hardly needs explanation: APT's reputation is based on this great functionality.
zh-TW: 重要的升級，諸如 Debian 的主要版本升級，需使用 <command>apt full-upgrade</command>。在此指令內， 即使刪除若干老舊的套件或安裝新的相依性也會把 <command>apt</command> 完全升級。也是每日於T Debian <emphasis role="distribution">不穩定版</emphasis> 使用的命令以及逐日追蹤其變動。它的運作極簡單不需說明：APT 的名聲來自其功能性。

en: Unlike <command>apt</command> and <command>aptitude</command>, <command>apt-get</command> doesn't know the <command>full-upgrade</command> command. Instead, you should use <command>apt-get dist-upgrade</command> (”distribution upgrade”), the historical and well-known command that <command>apt</command> and <command>aptitude</command> also accept for the convenience of users who got used to it.
zh-TW: 不同於 <command>apt</command> 與 <command>aptitude</command>，<command>apt-get</command> 不知道 <command>full-upgrade</command> 命令。反而，您應使用 <command>apt-get dist-upgrade</command> (”升級發行版”)，此古老且知名的命令也被 <command>apt</command> 與 <command>aptitude</command> 接受給讀者相當的便利。

en: Configuration Options
zh-TW: 組態選項

en: <primary>APT</primary><secondary>configuration</secondary>
zh-TW: <primary>APT</primary><secondary>組態</secondary>

en: <emphasis>BACK TO BASICS</emphasis> Directories ending in <filename>.d</filename>
zh-TW: <emphasis>基本</emphasis> 結尾是 <filename>.d</filename> 的資料夾名稱

en: Directories with a <filename>.d</filename> suffix are used more and more often. Each directory represents a configuration file which is split over multiple files. In this sense, all of the files in <filename>/etc/apt/apt.conf.d/</filename> are instructions for the configuration of APT. APT includes them in alphabetical order, so that the last ones can modify a configuration element defined in one of the first ones.
zh-TW: 結尾是 <filename>.d</filename> 資料使用機會愈來愈多。每個資料夾內的組態檔係供多個檔案使用。所以，在 <filename>/etc/apt/apt.conf.d/</filename> 內的檔案都是供 APT 組態之用。APT 以字順方式納入他們，最後一個檔案可以修正在前的組態。

en: This structure brings some flexibility to the machine administrator and to the package maintainers. Indeed, the administrator can easily modify the configuration of the software by adding a ready-made file in the directory in question without having to change an existing file. Package maintainers use the same approach when they need to adapt the configuration of another software to ensure that it perfectly co-exists with theirs. The Debian policy explicitly forbids modifying configuration files of other packages — only users are allowed to do this. Remember that during a package upgrade, the user gets to choose the version of the configuration file that should be kept when a modification has been detected. Any external modification of the file would trigger that request, which would disturb the administrator, who is sure not to have changed anything.
zh-TW: 此結構對機器的管理者與套件維護帶來若干彈性。確實，管理者容易修改軟體的組態，祗需在有問題的資料夾新增檔案而不必變動既有的檔案。需要調整另個軟體的組態，以確保與既有軟體相依，套件維護者以同樣的方法就能達成。Debian 的政策禁止修改其他套件的組態檔 — 祗有被授權者才能修改。套件升級時，使用者應保留選擇組態檔版本的權力。外部修改此檔案時將啟動該選項，管理者就知道是外來的修改。

en: Depending on the application, the <filename>.d</filename> directory is used directly or managed by an external script which will concatenate all the files to create the configuration file itself. It is important to execute the script after any change in that directory so that the most recent modifications are taken into account. In the same way, it is important not to work directly in the configuration file created automatically, since everything would be lost at the next execution of the script. The chosen method (<filename>.d</filename> directory used directly or a file generated from that directory) is usually dictated by implementation constraints, but in both cases the gains in terms of configuration flexibility more than make up for the small complications that they entail. The Exim 4 mail server is an example of the generated file method: it can be configured through several files (<filename>/etc/exim4/conf.d/*</filename>) which are concatenated into <filename>/var/lib/exim4/config.autogenerated</filename> by the <command>update-exim4.conf</command> command.
zh-TW: 視應用程式的需要，可直接使用或由外部腳本管理 <filename>.d</filename> 資料夾，將所有檔案串聯成一個組態檔。更動資料夾內容後，必須再執行腳本，才能納入該等變動。還有一件重要的事，千萬不要直接執行自動生成的組態檔，因為下次執行腳本後將失去所有的東西。受到環境的限制才被迫選擇指定的方法 (直接使用 <filename>.d</filename> 資料夾或由該資料夾產生的檔案)，不論何種方法，組態的彈性收益遠大於其帶來的複雜性。Exim 4 郵件伺服器是產生檔案方法的範例之一：可用多個檔案 (<filename>/etc/exim4/conf.d/*</filename>) 組態串聯成 <filename>/var/lib/exim4/config.autogenerated</filename> 再由 <command>update-exim4.conf</command> 命令執行。

en: Managing Package Priorities
zh-TW: 管理套件優先性

en: <primary>package</primary><secondary>priority</secondary>
zh-TW: <primary>套件</primary><secondary>優先性</secondary>

en: <primary>priority</primary><secondary>package priority</secondary>
zh-TW: <primary>優先性</primary><secondary>套件優先性</secondary>

en: One of the most important aspects in the configuration of APT is the management of the priorities associated with each package source. For instance, you might want to extend one distribution with one or two newer packages from <emphasis role="distribution">Testing</emphasis>, <emphasis role="distribution">Unstable</emphasis> or <emphasis role="distribution">Experimental</emphasis>. It is possible to assign a priority to each available package (the same package can have several priorities depending on its version or the distribution providing it). These priorities will influence APT's behavior: for each package, it will always select the version with the highest priority (except if this version is older than the installed one and if its priority is less than 1000).
zh-TW: 組態 APT 最重要的層面之一是管理每個套件來源的優先性。例如，從 <emphasis role="distribution">測試版</emphasis>、<emphasis role="distribution">不穩定</emphasis> 或 <emphasis role="distribution">實驗版</emphasis> 中選取一個或多個套件。可以指令每個套件的優先性 (視其版本或發行版，同個套件可以有多個優先性)。這些優先性將影響 APT 的行為：每個套件總是選擇最優先的版本 (除非舊於已安裝的版本或優先性小於 1000)。

en: <primary><filename>preferences</filename></primary>
zh-TW: <primary><filename>偏好</filename></primary>

en: <primary>APT</primary><secondary>preferences</secondary>
zh-TW: <primary>APT</primary><secondary>偏好</secondary>

en: APT defines several default priorities. Each installed package version has a priority of 100. A non-installed version has a priority of 500 by default, but it can jump to 990 if it is part of the target release (defined with the <literal>-t</literal> command-line option or the <literal>APT::Default-Release</literal> configuration directive).
zh-TW: APT 設定若干預設的優先性。已安裝套件版本的優先性是 100。未安裝版本預設優先性為 500，若是另個釋出的目標則可跳至 990 (以 <literal>-t</literal> 命令列選項或 <literal>APT::Default-Release</literal> 組態指令調整)。

en: <emphasis>SPECIFIC CASE</emphasis> Priority of <emphasis role="distribution">experimental</emphasis>
zh-TW: <emphasis>特例</emphasis><emphasis role="distribution">實驗性</emphasis>的優先性

en: If you listed <emphasis role="distribution">Experimental</emphasis> in your <filename>sources.list</filename> file, the corresponding packages will almost never be installed because their default APT priority is 1. This is of course a specific case, designed to keep users from installing <emphasis role="distribution">Experimental</emphasis> packages by mistake. The packages can only be installed by typing <command>aptitude install <replaceable>package</replaceable>/experimental</command> — users typing this command can only be aware of the risks that they take. It is still possible (though <emphasis>not</emphasis> recommended) to treat packages of <emphasis role="distribution">Experimental</emphasis> like those of other distributions by giving them a priority of 500. This is done with a specific entry in <filename>/etc/apt/preferences</filename>:
zh-TW: 若把 <emphasis role="distribution">Experimental</emphasis> 列在 <filename>sources.list</filename> 檔案內，幾乎不會安裝對應套件因為其 APT 優先性為1。當然這是特例，避免使用者意外安裝 <emphasis role="distribution">Experimental</emphasis> 套件。這些套件祗能以指令 <command>aptitude install <replaceable>套件名稱</replaceable>/experimental</command> 安裝 — 使用者鍵入此指令時自然知道其風險。還是有可能 (雖然 <emphasis>不</emphasis> 建議) 把 <emphasis role="distribution">Experimental</emphasis> 內的套件視為其他發行版而給予優先性 100。在 <filename>/etc/apt/preferences</filename> 檔案內給予特定的款目就行了：

en: Let's suppose that you only want to use packages from the stable version of Debian. Those provided in other versions should not be installed except if explicitly requested. You could write the following entries in the <filename>/etc/apt/preferences</filename> file:
zh-TW: 暫時假設您祗需用到 Debian 穩定版的套件。除非特別指明，不會安裝其他版本的套件。可以在 <filename>/etc/apt/preferences</filename> 檔案內寫入以上的款目：

en: <literal>a=stable</literal> defines the name of the selected distribution. <literal>o=Debian</literal> limits the scope to packages whose origin is “Debian”.
zh-TW: <literal>a=stable</literal> 設定發行版的名稱。<literal>o=Debian</literal> 限制來自 “Debian” 的套件。

en: <emphasis>TIP</emphasis> Comments in <filename>/etc/apt/preferences</filename>
zh-TW: <emphasis>秘訣</emphasis> 在 <filename>/etc/apt/preferences</filename> 內的評論

en: <primary><literal>Explanation</literal></primary>
zh-TW: <primary><literal>解釋</literal></primary>

en: There is no official syntax to put comments in the <filename>/etc/apt/preferences</filename> file, but some textual descriptions can be provided by putting one or more “<literal>Explanation</literal>” fields at the start of each entry:
zh-TW: <filename>/etc/apt/preferences</filename> 檔案沒有放置評論的官方語法，但可以在每個款目的 “<literal>Explanation</literal>” 欄位置入若干說明：

en: Working with Several Distributions
zh-TW: 在多個發行版工作

en: <command>apt</command> being such a marvelous tool, it is tempting to pick packages coming from other distributions. For example, after having installed a <emphasis role="distribution">Stable</emphasis> system, you might want to try out a software package available in <emphasis role="distribution">Testing</emphasis> or <emphasis role="distribution">Unstable</emphasis> without diverging too much from the system's initial state.
zh-TW: <command>apt</command> 是很奇妙的工具，可從其他發行版提取套件。例如，安裝 <emphasis role="distribution">穩定版</emphasis> 系統之後，或許想要在不偏離系統原來狀態下，試試 <emphasis role="distribution">測試版</emphasis> 或 <emphasis role="distribution">不穩定版</emphasis> 的套件。

en: Even if you will occasionally encounter problems while mixing packages from different distributions, <command>apt</command> manages such coexistence very well and limits risks very effectively. The best way to proceed is to list all distributions used in <filename>/etc/apt/sources.list</filename> (some people always put the three distributions, but remember that <emphasis role="distribution">Unstable</emphasis> is reserved for experienced users) and to define your reference distribution with the <literal>APT::Default-Release</literal> parameter (see <xref linkend="sect.apt-upgrade" />).
zh-TW: 混用不同版本套件出問題時，Even if you will occasionally encounter problems while mixing packages from different distributions, <command>apt</command> 可以處理得極為恰當把風險降到最低。最好的方法是把所有的發行版置於 <filename>/etc/apt/sources.list</filename> 檔案內 (某些人總是置入三個發行版，不過還是要記得 <emphasis role="distribution">不穩定版</emphasis> 是有經驗使用者的專屬。) 且在 <literal>APT::Default-Release</literal> 參數中設定偏好的發行版 (見 <xref linkend="sect.apt-upgrade" />) 。

en: Let's suppose that <emphasis role="distribution">Stable</emphasis> is your reference distribution but that <emphasis role="distribution">Testing</emphasis> and <emphasis role="distribution">Unstable</emphasis> are also listed in your <filename>sources.list</filename> file. In this case, you can use <command>apt install <replaceable>package</replaceable>/testing</command> to install a package from <emphasis role="distribution">Testing</emphasis>. If the installation fails due to some unsatisfiable dependencies, let it solve those dependencies within <emphasis role="distribution">Testing</emphasis> by adding the <literal>-t testing</literal> parameter. The same obviously applies to <emphasis role="distribution">Unstable</emphasis>.
zh-TW: 假設 <emphasis role="distribution">穩定版</emphasis> 是您的參考版本，但是 <emphasis role="distribution">測試版</emphasis> 與 <emphasis role="distribution">不穩定版</emphasis> 也列在 <filename>sources.list</filename> 檔案內。在這個情況下，您可使用 <command>apt install <replaceable>套件名稱</replaceable>/testing</command> 安裝來自 <emphasis role="distribution">測試版</emphasis> 的套件。若因相依性未滿足而安裝失敗，可以在 <emphasis role="distribution">測試版</emphasis> 內加入 <literal>-t testing</literal> 參數。同樣的方式也適用於 <emphasis role="distribution">不穩定版</emphasis>。

en: Everything centers around the fact that APT only considers packages of higher or equal version than the installed one (assuming that <filename>/etc/apt/preferences</filename> has not been used to force priorities higher than 1000 for some packages).
zh-TW: 每件事都圍繞在 APT 祗處理高於或等於已安裝版本號套件的前提下 (假設 <filename>/etc/apt/preferences</filename> 還未強迫優先性高於 1000 的某些套件)。

en: Let's assume that you have installed version 1 of a first package from <emphasis role="distribution">Stable</emphasis> and that version 2 and 3 are available respectively in <emphasis role="distribution">Testing</emphasis> and <emphasis role="distribution">Unstable</emphasis>. The installed version has a priority of 100 but the version available in <emphasis role="distribution">Stable</emphasis> (the very same) has a priority of 990 (because it is part of the target release). Packages in <emphasis role="distribution">Testing</emphasis> and <emphasis role="distribution">Unstable</emphasis> have a priority of 500 (the default priority of a non-installed version). The winner is thus version 1 with a priority of 990. The package “stays in <emphasis role="distribution">Stable</emphasis>”.
zh-TW: 假設從Let's assume that you have installed version 1 of a first package from <emphasis role="distribution">穩定版</emphasis> 安裝第一個套件的第一版且從and that version 2 and 3 are available respectively in <emphasis role="distribution">測試版</emphasis> 與 <emphasis role="distribution">不穩定版</emphasis> 安裝同套件的第二版與第三版水。已安裝的版本優先性為 100 但在but the version available in <emphasis role="distribution">穩定版</emphasis> (相同的) 優先性為 990 (因為它是目標釋出版的一部份)。在 <emphasis role="distribution">測試版</emphasis> 與 <emphasis role="distribution">不穩定版</emphasis> 的套件其優先性為 500 (預設不安裝版本的優先性)。獲選者為優先性 990 的版本1。套件 “留在 <emphasis role="distribution">穩定版</emphasis> 內”。

en: Tracking Automatically Installed Packages
zh-TW: 自動追蹤已安裝的套件

en: It is a good habit to mark as automatic any package that you don't need directly so that they are automatically removed when they aren't necessary anymore. <command>apt-mark auto <replaceable>package</replaceable></command> will mark the given package as automatic whereas <command>apt-mark manual <replaceable>package</replaceable></command> does the opposite. <command>aptitude markauto</command> and <command>aptitude unmarkauto</command> work in the same way although they offer more features for marking many packages at once (see <xref linkend="sect.aptitude" />). The console-based interactive interface of <command>aptitude</command> also makes it easy to review the “automatic flag” on many packages.
zh-TW: 把套件標記為自動是個好習慣，不需要時就被自動移除。<command>apt-mark auto <replaceable>套件名稱</replaceable></command> 會標記該套件為自動而 <command>apt-mark manual <replaceable>套件名稱</replaceable></command> 則不標記。<command>aptitude markauto</command> 與 <command>aptitude unmarkauto</command> 作用相同祗是功能較多 (見 <xref linkend="sect.aptitude" />)。命令互動介面的 <command>aptitude</command> 也可檢視多個套件的 “自動旗標”。

en: People might want to know why an automatically installed package is present on the system. To get this information from the command line, you can use <command>aptitude why <replaceable>package</replaceable></command> (<command>apt</command> and <command>apt-get</command> have no similar feature):
zh-TW: 自動安裝套件出現在系統內。係由於從命令列取得該等資訊，可使用 <command>aptitude why <replaceable>套件名稱</replaceable></command> (<command>apt</command> 與 <command>apt-get</command> 沒有類似的功能)：

en: <emphasis>ALTERNATIVE</emphasis> <command>deborphan</command> and <command>debfoster</command>
zh-TW: <emphasis>其他</emphasis> <command>deborphan</command> 與 <command>debfoster</command>

en: <command>debfoster</command> has a more elaborate approach, very similar to APT's one: it maintains a list of packages that have been explicitly installed, and remembers what packages are really required between each invocation. If new packages appear on the system and if <command>debfoster</command> doesn't know them as required packages, they will be shown on the screen together with a list of their dependencies. The program then offers a choice: remove the package (possibly together with those that depend on it), mark it as explicitly required, or ignore it temporarily.
zh-TW: <command>debfoster</command> 還有其他用法，極類似 APT：維護一個已安裝的套件以及需要互調用的套件清單。系統內出現新的套件且 <command>debfoster</command> 不知道它需要那些套件，則在螢幕顯示其相依的套件清單。此程式提供新的選擇：移除套件 (或許連同相依者)，標記為必要，或暫時忽略它。

en: The <command>apt-cache</command> Command
zh-TW: The <command>apt-cache</command> 命令

en: <primary>APT</primary><secondary>package search</secondary>
zh-TW: <primary>APT</primary><secondary>套件搜尋</secondary>

en: <primary>APT</primary><secondary>header display</secondary>
zh-TW: <primary>APT</primary><secondary>顯示標頭</secondary>

en: <primary>search of packages</primary>
zh-TW: <primary>搜尋套件</primary>

en: <primary>package</primary><secondary>search</secondary>
zh-TW: <primary>套件</primary><secondary>搜尋</secondary>

en: The <command>apt-cache</command> command can display much of the information stored in APT's internal database. This information is a sort of cache since it is gathered from the different sources listed in the <filename>sources.list</filename> file. This happens during the <command>apt update</command> operation.
zh-TW: <command>apt-cache</command> 命令可顯示 APT 內部資料庫裡的多種資訊。這些資訊是從 <filename>sources.list</filename> 檔案內聚集不同來源的快取。於執行 <command>apt update</command> 運作時產生的。

en: <emphasis>VOCABULARY</emphasis> Cache
zh-TW: <emphasis>術語</emphasis> 快取

en: A cache is a temporary storage system used to speed up frequent data access when the usual access method is expensive (performance-wise). This concept can be applied in numerous situations and at different scales, from the core of microprocessors up to high-end storage systems.
zh-TW: 快取是一種暫存系統，近用方法昂貴 (講究性能) 時，用於加快常用資料的取用速度。這個概念應用範圍極廣，從微處理器核心至高階儲存系統。

en: <emphasis>ALTERNATIVE</emphasis> <command>axi-cache</command>
zh-TW: <emphasis>其他</emphasis> <command>axi-cache</command>

en: <command>apt-cache search</command> is a very rudimentary tool, basically implementing <command>grep</command> on package's descriptions. It often returns too many results or none at all when you include too many keywords.
zh-TW: <command>apt-cache search</command> 是基礎的工具，應用在 <command>grep</command> 套件描述。輸入過多鍵詞可能送回大量結果或完全無資料。

en: Frontends: <command>aptitude</command>, <command>synaptic</command>
zh-TW: 前置：<command>aptitude</command>、<command>synaptic</command>

en: <primary>APT</primary><secondary>interfaces</secondary>
zh-TW: <primary>APT</primary><secondary>介面</secondary>

en: The <command>aptitude</command> package manager
zh-TW: The <command>aptitude</command> 套件管理者

en: <emphasis>DOCUMENTATION</emphasis> <command>aptitude</command>
zh-TW: <emphasis>文件</emphasis> <command>aptitude</command>

en: To search for a package, you can type <keycombo><keycap>/</keycap></keycombo> followed by a search pattern. This pattern matches the name of the package, but can also be applied to the description (if preceded by <literal>~d</literal>), to the section (with <literal>~s</literal>) or to other characteristics detailed in the documentation. The same patterns can filter the list of displayed packages: type the <keycombo><keycap>l</keycap></keycombo> key (as in <foreignphrase>limit</foreignphrase>) and enter the pattern.
zh-TW: 鍵入 <keycombo><keycap>/</keycap></keycombo> 及搜尋的鍵詞，就能搜尋套件。鍵詞對應至套件的名稱，也可應用於描述內容 (若前置 <literal>~d</literal>、區塊 (前置 <literal>~s</literal>) 或文件內的其他字詞。同樣的鍵詞可以篩選顯示套件的清單：鍵入 <keycombo><keycap>l</keycap></keycombo> 鍵 (如同在 <foreignphrase>limit</foreignphrase> 之內) 與其他鍵詞。

en: <emphasis>TOOL</emphasis> Using <command>aptitude</command> on the command-line interface
zh-TW: <emphasis>工具</emphasis> 在命令列介面使用 <command>aptitude</command>

en: Most of <command>aptitude</command>'s features are accessible via the interactive interface as well as via command-lines. These command-lines will seem familiar to regular users of <command>apt-get</command> and <command>apt-cache</command>.
zh-TW: 經由命令列或互動介面可以近用 <command>aptitude</command> 大部份的功能。命令列看來像是 <command>apt-get</command> 與 <command>apt-cache</command>。

en: The advanced features of <command>aptitude</command> are also available on the command-line. You can use the same package search patterns as in the interactive version. For example, if you want to cleanup the list of “manually installed” packages, and if you know that none of the locally installed programs require any particular libraries or Perl modules, you can mark the corresponding packages as automatic with a single command:
zh-TW: 也能從命令列近用 <command>aptitude</command> 的進階功能。使用互動版相同的套件搜尋模式。例如，清除 “手動安裝” 套件、在地安裝的程式不再需要程式庫或 Perl 模組，就可把對應的套件標示為自動：

en: Here, you can clearly see the power of the search pattern system of <command>aptitude</command>, which enables the instant selection of all the packages in the <literal>libs</literal> and <literal>perl</literal> sections.
zh-TW: 從這裡您可看到 <command>aptitude</command> 搜尋模式系統的威力，即時選取 <literal>libs</literal> 與 <literal>perl</literal> 區塊的所有套件。

en: Beware, if some packages are marked as automatic and if no other package depends on them, they will be removed immediately (after a confirmation request).
zh-TW: 小心對應，部份套件被標記為自動且其他套件均未相依於它們，該等套件就會被自動移除 (經過確認程式)。

en: Managing Recommendations, Suggestions and Tasks
zh-TW: 管理推薦、建議與工作

en: Note that this recommendation tracking feature does not apply to upgrades. For instance, if a new version of <emphasis role="pkg">gnome</emphasis> recommends a package that it did not recommend formerly, the package won't be marked for installation. However, it will be listed on the upgrade screen so that the administrator can still select it for installation.
zh-TW: 此推薦追蹤功能不適用於更新。例如，若 <emphasis role="pkg">gnome</emphasis> 新版建議一個不包括稍前版本的套件，就不會安裝它。然而，還是列在螢幕，管理者仍可點選並安裝它。

en: In the same spirit, remember that <command>aptitude</command> makes intelligent use of the concept of task. Since tasks are displayed as categories in the screens of packages lists, you can either select a full task for installation or removal, or browse the list of packages included in the task to select a smaller subset.
zh-TW: 在同樣的精神下，記得 <command>aptitude</command> 以智慧的手法使用工作的概念。在螢幕的套件清單中顯示工作，可以安裝或移除選定的完整工作，或瀏覽包括選定較小工作的套件清單。

en: Better Solver Algorithms
zh-TW: 較佳的解決演算法

en: <emphasis>NOTE</emphasis> <command>aptitude</command>'s log
zh-TW: <emphasis>說明</emphasis> <command>aptitude</command> 的記錄檔

en: Like <command>dpkg</command>, <command>aptitude</command> keeps a trace of executed actions in its logfile (<filename>/var/log/aptitude</filename>). However, since both commands work at a very different level, you cannot find the same information in their respective logfiles. While <command>dpkg</command> logs all the operations executed on individual packages step by step, <command>aptitude</command> gives a broader view of high-level operations like a system-wide upgrade.
zh-TW: 如同 <command>dpkg</command>，<command>aptitude</command> 追蹤執行動作存在其記錄檔內 (<filename>/var/log/aptitude</filename>)。然而，兩個命令分別在不同層次工作，各自的記錄檔有不同的資訊。當 <command>dpkg</command> 記錄對各別套件的一步步運作，<command>aptitude</command> 則記錄系統更新之類的高階運作。

en: <command>synaptic</command> is a graphical package manager for Debian which features a clean and efficient graphical interface based on GTK+/GNOME. Its many ready-to-use filters give fast access to newly available packages, installed packages, upgradable packages, obsolete packages and so on. If you browse through these lists, you can select the operations to be done on the packages (install, upgrade, remove, purge); these operations are not performed immediately, but put into a task list. A single click on a button then validates the operations, and they are performed in one go.
zh-TW: <command>synaptic</command> 是 Debian 的套件圖形管理器，在 GTK+/GNOME 的基礎上提供清楚有效的圖形介面。它以很多的立即可用篩選器提供快速近用新增的套件、安裝套件、可升級套件、過時套件等。經由這些清單瀏覽，選定對套件的工作 (安裝、升級、移除、清除)；不會立即執行此等工作，但把它們放入工作清單。單鍵按下可執行的工作，接著就可執行。

en: <command>synaptic</command> package manager
zh-TW: <command>synaptic</command> 套件管理器

en: Checking Package Authenticity
zh-TW: 檢查套件真偽

en: <primary>package</primary><secondary>authenticity check</secondary>
zh-TW: <primary>套件</primary><secondary>真偽檢查</secondary>

en: <primary>package</primary><secondary>seal</secondary>
zh-TW: <primary>套件</primary><secondary>紋章</secondary>

en: <primary>package</primary><secondary>signature</secondary>
zh-TW: <primary>套件</primary><secondary>簽章</secondary>

en: <primary>signature</primary><secondary>package signature</secondary>
zh-TW: <primary>簽章</primary><secondary>套件簽章</secondary>

en: <primary>authentication</primary><secondary>package authentication</secondary>
zh-TW: <primary>真偽</primary><secondary>套件真偽</secondary>

en: Security is very important for Falcot Corp administrators. Accordingly, they need to ensure that they only install packages which are guaranteed to come from Debian with no tampering on the way. A computer cracker could try to add malicious code to an otherwise legitimate package. Such a package, if installed, could do anything the cracker designed it to do, including for instance disclosing passwords or confidential information. To circumvent this risk, Debian provides a tamper-proof seal to guarantee — at install time — that a package really comes from its official maintainer and hasn't been modified by a third party.
zh-TW: Falcot 公司的管理極重視安全。因此，他們祗安裝 Debian 保證無竄改的套件。電腦怪客可能在合法的套件巾加入若干惡意程式碼。若安裝了這種套件，就會執行怪客要它做的事，包括洩露密碼或隱私資訊。為避過這個風險，Debian 有個機制在安裝時避過此纂改的風險，祗安裝來自官方維護者的套件且未經第三方修改。

en: <emphasis>IN PRACTICE</emphasis> Adding trusted keys
zh-TW: <emphasis>實務上</emphasis> 新增可信任的鑰匙

en: <primary>trusted key</primary>
zh-TW: <primary>可信任的鑰匙</primary>

en: <primary>key</primary><secondary>APT's authentication keys</secondary>
zh-TW: <primary>鑰匙</primary><secondary>APT 的認可鑰匙</secondary>

en: When a third-party package source is added to the <filename>sources.list</filename> file, APT needs to be told to trust the corresponding GPG authentication key (otherwise it will keep complaining that it can't ensure the authenticity of the packages coming from that repository). The first step is of course to get the public key. More often than not, the key will be provided as a small text file, which we will call <filename>key.asc</filename> in the following examples.
zh-TW: 將第三方套件來源加入 <filename>sources.list</filename> 檔案後，必須告知 APT 信任對應的 GPG 認證密鑰 (否則將繼續抱怨且無法確認來自該典藏所的套件)。第一步是取得公鑰。多半以一個小小的純文字檔做為公鑰，在下面的例子裡，我們稱它為 <filename>key.asc</filename>。

en: Upgrading from One Stable Distribution to the Next
zh-TW: 升級至下個穩定發行版

en: One of the best-known features of Debian is its ability to upgrade an installed system from one stable release to the next: <foreignphrase>dist-upgrade</foreignphrase> — a well-known phrase — has largely contributed to the project's reputation. With a few precautions, upgrading a computer can take as little as a few minutes, or a few dozen minutes, depending on the download speed from the package repositories.
zh-TW: Debian 知名的功能之一是可升級至下個穩定版:<foreignphrase>dist-upgrade</foreignphrase> — 知名的句子 — 相當促進 Debian 的名聲。除了極少的例外，升級電腦系統祗需幾分鐘的時間，或暫十來分鐘，依照從套件儲存庫下載的速度而定.

en: Recommended Procedure
zh-TW: 建議程序

en: Since Debian has quite some time to evolve in-between stable releases, you should read the release notes before upgrading.
zh-TW: Debian 各穩定版之間存在相當的差異，升級前應仔細閱讀釋出說明。

en: <emphasis>BACK TO BASICS</emphasis> Release notes
zh-TW: <emphasis>基本</emphasis> 釋出說明

en: The release notes for an operating system (and, more generally, for any software) are a document giving an overview of the software, with some details concerning the particularities of one version. These documents are generally short compared to the complete documentation, and they usually list the features which have been introduced since the previous version. They also give details on upgrading procedures, warnings for users of previous versions, and sometimes errata.
zh-TW: 作業系統 (更寛廣的說，任何軟體都在內) 的釋出說明是一份描述軟體概況的文件，特別關照指定的版本。相對於完成的軟體文件，這些文件相當簡短，通常列出前版之後新生成的功能。也提供升級的程序、對前版使用者的警示、以及若干錯誤更正。

en: Handling Problems after an Upgrade
zh-TW: 處理升級後的問題

en: In spite of the Debian maintainers' best efforts, a major system upgrade isn't always as smooth as you could wish. New software versions may be incompatible with previous ones (for instance, their default behavior or their data format may have changed). Also, some bugs may slip through the cracks despite the testing phase which always precedes a Debian release.
zh-TW: 僅管 Debian 管理者已經儘力做好份內的工作，主系統的升級仍可能卡卡的不如想像中順利。軟體的新版本可能無法與舊的相容 (例如，可能改變預設行為或資料格式)。同時，儘管在 Debian 釋出前做為詳盡的測試，還是有若干漏網的錯誤。

en: To anticipate some of these problems, you can install the <emphasis role="pkg">apt-listchanges</emphasis> package, which displays information about possible problems at the beginning of a package upgrade. This information is compiled by the package maintainers and put in <filename>/usr/share/doc/<replaceable>package</replaceable>/NEWS.Debian</filename> files for the benefit of users. Reading these files (possibly through <emphasis role="pkg">apt-listchanges</emphasis>) should help you avoid bad surprises.
zh-TW: 可以先安裝 <emphasis role="pkg">apt-listchanges</emphasis> package, 套件，在套件升級前先顯示可能問題。由套件維護者編輯的這些資訊且置於 <filename>/usr/share/doc/<replaceable>套件名</replaceable>/NEWS.Debian</filename> 檔案名內，供使用者參考。閱讀該等檔案 (可能經由 <emphasis role="pkg">apt-listchanges</emphasis>) 應有助於歸避不好的意外。

en: sometimes a patch already exists, and it is available on the bug report; you can then recompile a fixed version of the broken package locally (see <xref linkend="sect.rebuilding-package" />);
zh-TW: 有時已有補丁，並且列在錯誤報告內；可以在地重新編譯修補破碎的套件 (見 <xref linkend="sect.rebuilding-package" />)；

en: in other cases, users may have found a workaround for the problem and shared their insights about it in their replies to the report;
zh-TW: 否則，使用者可能找到另個解決問題的方法且在報告內分享；

en: in yet other cases, a fixed package may have already been prepared and made public by the maintainer.
zh-TW: 再不然，維護者可能已準備並公開修訂套件。

en: Keeping a System Up to Date
zh-TW: 保持系統在最新狀態

en: While it is of course possible to periodically run a tool to check for available updates and run the upgrades, such a repetitive task is tedious, especially when it needs to be performed on several machines. Fortunately, like many repetitive tasks, it can be partly automated, and a set of tools have already been developed to that effect.
zh-TW: 最好定期執行升級與更新，雖然很瑣碎卻是必要的。幸運的是，這種重複性的工作可以自動執行，有很多工具可以使用。

en: The first of these tools is <command>apticron</command>, in the package of the same name. Its main effect is to run a script daily (via <command>cron</command>). The script updates the list of available packages, and, if some installed packages are not in the latest available version, it sends an email with a list of these packages along with the changes that have been made in the new versions. Obviously, this package mostly targets users of Debian <emphasis role="distribution">Stable</emphasis>, since the daily emails would be very long for the faster paced versions of Debian. When updates are available, <command>apticron</command> automatically downloads them. It does not install them — the administrator will still do it — but having the packages already downloaded and available locally (in APT's cache) makes the job faster.
zh-TW: 第一個工具是 <command>apticron</command>，位於同名套件中。主要作用是每日執行一個腳本 (經由 <command>cron</command>)。這個腳本更新可用套件清單，若已安裝的套件不在此清單內，則發送電子郵件列出該等套件清單，並指出在新版中可用的套件。明顯地，此套件的對象是 Debian <emphasis role="distribution">穩定版</emphasis> 的使用者，對其他版本的使用者而言，此清單太長了。取得可更新清單後，<command>apticron</command> 自動下載它們。不會安裝它們 — 那是管理者的權限與工作 — 但已下載的套件可以在地 (於 APT 快取內) 安裝，速度快多了。

en: This option allows you to specify the frequency (in days) at which the package lists are refreshed. <command>apticron</command> users can do without this variable, since <command>apticron</command> already does this task.
zh-TW: 此選項允許您指定重新載入的頻率。<command>apticron</command> 也可以在無變數的前提下執行，因為 <command>apticron</command> 本來就已在執行中。

en: Again, this option indicates a frequency (in days), this time for the downloading of the actual packages. Again, <command>apticron</command> users won't need it.
zh-TW: 再次地，此選項指定頻率 (以日計)，此時實際地下載套件。同樣地，使用者不需指定執行 <command>apticron</command>。

en: This option covers a feature that <command>apticron</command> doesn't have. It controls how often obsolete packages (those not referenced by any distribution anymore) are removed from the APT cache. This keeps the APT cache at a reasonable size and means that you don't need to worry about that task.
zh-TW: 此選項包括 <command>apticron</command> 沒有的功能。指定過時套件 (未被任何發行版參照) 移出 APT 快取的時機。如此一來，APT 快取的容量就保持在合理的範圍，不必再擔心其工作負擔。

en: Upgrading with <command>gpk-update-viewer</command>
zh-TW: 使用 <command>gpk-update-viewer</command> 升級

en: Automatic Upgrades
zh-TW: 自動升級

en: <primary>upgrade</primary><secondary>automatic system upgrade</secondary>
zh-TW: <primary>升級</primary><secondary>系統自動升級</secondary>

en: <primary>automatic upgrade</primary>
zh-TW: <primary>自動升級</primary>

en: Since Falcot Corp has many computers but only limited manpower, its administrators try to make upgrades as automatic as possible. The programs in charge of these processes must therefore run with no human intervention.
zh-TW: 因為 Falcot Corp 雖有多部電腦但功能陽春，其管理者試圖儘可能地自動升級。必須在無人為介入情況下處理升級事宜。

en: Configuring <command>dpkg</command>
zh-TW: 組態 <command>dpkg</command>

en: Configuring APT
zh-TW: 組態 APT

en: The case of APT is simple: the <literal>-y</literal> option (or <literal>--assume-yes</literal>) tells APT to consider the answer to all its questions to be “yes”.
zh-TW: APT 的例子很簡單：<literal>-y</literal> 選項 (或 <literal>--assume-yes</literal>) 告訴 APT 面對所有的問題時，答案都是 “yes”。

en: Configuring <command>debconf</command>
zh-TW: 組態 <command>debconf</command>

en: The case of <command>debconf</command> deserves more details. This program was, from its inception, designed to control the relevance and volume of questions displayed to the user, as well as the way they are shown. That is why its configuration requests a minimal priority for questions; only questions above the minimal priority are displayed. <command>debconf</command> assumes the default answer (defined by the package maintainer) for questions which it decided to skip.
zh-TW: <command>debconf</command> 需要較詳細的說明。此程式原本的設計就是控制給使用者看到的相關性及數量，以及顯示的方法。問題需有最小的優先權；擁有最小優先權以上的問題才顯示。<command>debconf</command> 預設的答案 (由套件維護者設定) 會略過。

en: To reconfigure <command>debconf</command>, use the <command>dpkg-reconfigure</command> tool from the <emphasis role="pkg">debconf</emphasis> package; the relevant command is <command>dpkg-reconfigure debconf</command>. Note that the configured values can be temporarily overridden with environment variables when needed (for instance, <varname>DEBIAN_FRONTEND</varname> controls the interface, as documented in the <citerefentry><refentrytitle>debconf</refentrytitle><manvolnum>7</manvolnum></citerefentry> manual page).
zh-TW: 組態 <command>debconf</command> 時，用到 <command>dpkg-reconfigure</command> 工具，它是來自 <emphasis role="pkg">debconf</emphasis> 套件；相關的命令是 <command>dpkg-reconfigure debconf</command>。組態值可能是在需要時暫時取代的環境變數 (例如，<varname>DEBIAN_FRONTEND</varname> 控制介面，如同在 <citerefentry><refentrytitle>debconf</refentrytitle><manvolnum>7</manvolnum></citerefentry> 手冊頁面所述)。

en: Handling Command Line Interactions
zh-TW: 處理命令列介面

en: The last source of interactions, and the hardest to get rid of, is the configuration scripts run by <command>dpkg</command>. There is unfortunately no standard solution, and no answer is overwhelmingly better than another.
zh-TW: 最後一個互動來源，以及最難擺脫的，是 <command>dpkg</command> 執行的組態腳本。不幸的是，沒有標準的解法且沒有較佳的答案。

en: The common approach is to suppress the standard input by redirecting the empty content of <filename>/dev/null</filename> into it with <command><replaceable>command</replaceable> &lt;/dev/null</command>, or to feed it with an endless stream of newlines. None of these methods is 100 % reliable, but they generally lead to the default answers being used, since most scripts consider a lack of reply as an acceptance of the default value.
zh-TW: 通常的做法是，把標準的輸入由空白內容的 <filename>/dev/null</filename> 檔案轉向給 <command><replaceable>命令</replaceable> &lt;/dev/null</command>，或由新的鍵入字串取代。以上的方法都不是 100 % 可靠，但它們可以轉至預設的答案，因為大部份的腳本已考量到無預設值的答案。

en: The Miracle Combination
zh-TW: 神奇的組合

en: By combining the previous elements, it is possible to design a small but rather reliable script which can handle automatic upgrades.
zh-TW: 把前述的元素組合起來，就可能設計出一個可處理自動升級的小而可靠腳本。

en: Non-interactive upgrade script
zh-TW: 無互動升級腳本

en: <emphasis>IN PRACTICE</emphasis> The Falcot Corp case
zh-TW: <emphasis>實務</emphasis> Falcot Corp 個案

en: Falcot computers are a heterogeneous system, with machines having various functions. Administrators will therefore pick the most relevant solution for each computer.
zh-TW: Falcot 公司採用異質系統電腦，執行多種功能。管理者必須為每部電腦挑選最適合的解決方案。

en: In the lab, the few computers using <emphasis role="distribution">Testing</emphasis> — to take advantage of the latest software versions — are not upgraded automatically either. Administrators only configure APT to prepare the upgrades but not enact them; when they decide to upgrade (manually), the tedious parts of refreshing package lists and downloading packages will be avoided, and administrators can focus on the really useful part.
zh-TW: 在實驗室裡，有些安裝 <emphasis role="distribution">測試版</emphasis> — 就是使用最新版的軟體 — 的電腦也不會自動更新。管理者必須組態 APT 才能更新它們；決定更新時 (手動)，列出重新載入套件清單並避免下載繁瑣的部件，管理者就能專注在真正有用的部件。

en: Searching for Packages
zh-TW: 搜尋套件

en: The most trivial search possible is looking up an exact package name. If <command>apt show <replaceable>package</replaceable></command> returns a result, then the package exists. Unfortunately, this requires knowing or even guessing the package name, which isn't always possible.
zh-TW: 最瑣碎的搜尋可能是找到正確的套件名稱。若 <command>apt show <replaceable>套件名稱</replaceable></command> 送回結果，表示該套件存在。不幸的是，必須知道或猜對套件名稱，卻幾乎是不可能的.

en: <emphasis>TIP</emphasis> Package naming conventions
zh-TW: <emphasis>秘訣</emphasis> 套件命名慣例

en: Some categories of packages are named according to a conventional naming scheme; knowing the scheme can sometimes allow you to guess exact package names. For instance, for Perl modules, the convention says that a module called <literal>XML::Handler::Composer</literal> upstream should be packaged as <emphasis role="pkg">libxml-handler-composer-perl</emphasis>. The library enabling the use of the <command>gconf</command> system from Python is packaged as <emphasis role="pkg">python-gconf</emphasis>. It is unfortunately not possible to define a fully general naming scheme for all packages, even though package maintainers usually try to follow the choice of the upstream developers.
zh-TW: 部份類型的套件遵循慣例命多；祗要知道該慣例就能夠猜到正確的套件名稱。例如，Perl 模組，慣例是稱呼為 <literal>XML::Handler::Composer</literal> 上游的套件名就是 <emphasis role="pkg">libxml-handler-composer-perl</emphasis>。從 Python 啟用 <command>gconf</command> 系統的程式庫就是套件 <emphasis role="pkg">python-gconf</emphasis>。不幸的是即使套件管理者努力選擇上游發展者的慣例，仍無法猜中所有套件的通俗慣例。

en: For more complex searches, a more powerful tool such as <command>aptitude</command> is required. <command>aptitude</command> allows you to search according to a logical expression based on the package's meta-data fields. For instance, the following command searches for packages whose name contains <literal>kino</literal>, whose description contains <literal>video</literal> and whose maintainer's name contains <literal>paul</literal>:
zh-TW: 更複雜的搜尋，需要更有力的工具，如 <command>aptitude</command> 是其中之一。<command>aptitude</command> 可搜尋套件元資料欄位的內容。例如，以下的範例搜尋含有 <literal>kino</literal> 字樣的套件名稱，其說明包括 <literal>video</literal> 與維護者名字為 <literal>paul</literal>：

en: The search only returns one package, <emphasis role="pkg">kino</emphasis>, which satisfies all three criteria.
zh-TW: 此搜尋祗找到一個套件，<emphasis role="pkg">kino</emphasis>，滿足全部三個條件。

en: <primary>tag</primary>
zh-TW: <primary>標籤</primary>

en: Selecting the <literal>works-with::video</literal> and <literal>use::editing</literal> tags yields a handful of packages, including the <emphasis role="pkg">kino</emphasis> and <emphasis role="pkg">pitivi</emphasis> video editors. This system of classification is bound to be used more and more as time goes on, and package managers will gradually provide efficient search interfaces based on it.
zh-TW: 以 <literal>works-with::video</literal> 及 <literal>use::editing</literal> 標籤可找出若干套件，包括 <emphasis role="pkg">kino</emphasis> 與 <emphasis role="pkg">pitivi</emphasis> 影像編輯器。愈來愈多人使用這種分類系統，在此基礎上，套件管理者建立更有效的介面。

en: To sum up, the best tool for the job depends on the complexity of the search that you wish to do:
zh-TW: 總的來說，最好的工具視搜尋複雜度而定：

en: <command>apt-cache</command> only allows searching in package names and descriptions, which is very convenient when looking for a particular package that matches a few target keywords;
zh-TW: <command>apt-cache</command> 祗能搜尋套件名稱與說明，很適合搜尋符合少許鍵詞的特定套件；

en: when the search criteria also include relationships between packages or other meta-data such as the name of the maintainer, <command>synaptic</command> will be more useful;
zh-TW: 搜尋對象包括維護者名稱在內的套件關係或其他元資料時，<command>synaptic</command> 就派上用場了；

en: when a tag-based search is needed, a good tool is <command>packagesearch</command>, a graphical interface dedicated to searching available packages along several criteria (including the names of the files that they contain). For usage on the command-line, <command>axi-cache</command> will fit the bill.
zh-TW: <command>packagesearch</command> 是圖形介面的標籤型搜尋工具，可搜尋若干領域的套件 (包括套件內的檔案名稱)。命令列的工具，則使用 <command>axi-cache</command>。

en: finally, when the searches involve complex expressions with logic operations, the tool of choice will be <command>aptitude</command>'s search pattern syntax, which is quite powerful despite being somewhat obscure; it works in both the command-line and the interactive modes.
zh-TW: 最後，需要邏輯運算元的複雜搜尋時，首選工具為 <command>aptitude</command> 的語法，雖然功能強大但較為難用，它有命令列與互動模式兩種介面。
