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

en: Configuration
zh-TW: 組態

en: Localization
zh-TW: 在地化

en: Locales
zh-TW: 地區設定

en: Network
zh-TW: 網路

en: Name resolution
zh-TW: 名稱解析

en: Users
zh-TW: 使用者

en: Groups
zh-TW: 群組

en: Accounts
zh-TW: 帳號

en: Command-line interpreter
zh-TW: 命令列解析器

en: Printing
zh-TW: 列印

en: Bootloader
zh-TW: 啟動程式

en: Kernel compiling
zh-TW: 編譯核心

en: Basic Configuration: Network, Accounts, Printing...
zh-TW: 基本組態：網路、帳號、列印...

en: A computer with a new installation created with <command>debian-installer</command> is intended to be as functional as possible, but many services still have to be configured. Furthermore, it is always good to know how to change certain configuration elements defined during the initial installation process.
zh-TW: 以 <command>debian-installer</command> 命令安裝的電腦是儘可能的可用，但仍有若干服務需要組態。而且，瞭解修改初始安裝程序的組態是件好事。

en: This chapter reviews everything included in what we could call the “basic configuration”: networking, language and locales, users and groups, printing, mount points, etc.
zh-TW: 本章包括所有的 “基本組態”：網路、語系與地區設定、列印、掛載點等。

en: Configuring the System for Another Language
zh-TW: 組態系統供其他語系使用

en: <primary>French localization</primary>
zh-TW: <primary>法文在地化</primary>

en: If the system was installed using French, the machine will probably already have French set as the default language. But it is good to know what the installer does to set the language, so that later, if the need arises, you can change it.
zh-TW: 選擇法語介面安裝系統，則可能已經把法語當成預設語言。但是瞭解安裝器安裝語系的方法，需要發生時，就可以變更語系。

en: <emphasis>TOOL</emphasis> The <command>locale</command> command to display the current configuration
zh-TW: <emphasis>工具</emphasis> 此 <command>locale</command> 命令顯示當前的組態

en: <primary>locale</primary>
zh-TW: <primary>地區設定</primary>

en: The <command>locale</command> command lists a summary of the current configuration of various locale parameters (date format, numbers format, etc.), presented in the form of a group of standard environment variables dedicated to the dynamic modification of these settings.
zh-TW: <command>locale</command> 命令列出地區設定參數的當前語系組態 (日期格式、數字格式等)，以一組標準的環境變數表示這些設定的動態修改。

en: Setting the Default Language
zh-TW: 設定預設語系

en: <primary>language</primary>
zh-TW: <primary>語系</primary>

en: A locale is a group of regional settings. This includes not only the language for text, but also the format for displaying numbers, dates, times, and monetary sums, as well as the alphabetical comparison rules (to properly account for accented characters). Although each of these parameters can be specified independently from the others, we generally use a locale, which is a coherent set of values for these parameters corresponding to a “region” in the broadest sense. These locales are usually indicated under the form, <literal><replaceable>language-code</replaceable>_<replaceable>COUNTRY-CODE</replaceable></literal>, sometimes with a suffix to specify the character set and encoding to be used. This enables consideration of idiomatic or typographical differences between different regions with a common language.
zh-TW: 地區設定是一組區域設定。不祗是語文，還包括顯示的數字、日期、時間、貨幣與字母對照表 (針對重音符號)。雖然這些參數可以各別設定，我們還是習慣以一個區域設定處理全部事宜，廣義上符合 “地區” 的一組設定值就搞定。這些地區設定以相同形式表現，<literal><replaceable>語文代碼</replaceable>_<replaceable>國家代碼</replaceable></literal>，有時加上後置詞指明使用的編碼。這種方式可以呈現同個語文在不同地區的慣用語或用字。

en: <emphasis>CULTURE</emphasis> Character sets
zh-TW: <emphasis>文字</emphasis> 字元集

en: Historically, each locale has an associated “character set” (group of known characters) and a preferred “encoding” (internal representation for characters within the computer).
zh-TW: 過去，每個地區都對應一組 “字元集” (已知字元的集合) 與偏好的 “編碼” (電腦內表示字元的方法)。

en: The most popular encodings for latin-based languages were limited to 256 characters because they opted to use a single byte for each character. Since 256 characters was not enough to cover all European languages, multiple encodings were needed, and that is how we ended up with <emphasis>ISO-8859-1</emphasis> (also known as “Latin 1”) up to <emphasis>ISO-8859-15</emphasis> (also known as “Latin 9”), among others.
zh-TW: 最常見的編碼是拉丁基礎的語言限於256個字元，因為每個字元祗用到一個位元組。256個字元顯然不夠所有的歐洲語系使用，需要多編碼，所以出現 <emphasis>ISO-8859-1</emphasis> (也稱為 “Latin 1”) 至 <emphasis>ISO-8859-15</emphasis> (也稱為 “Latin 9”)，以及其他的編碼方式。

en: Working with foreign languages often implied regular switches between various encodings and character sets. Furthermore, writing multilingual documents led to further, almost intractable problems. Unicode (a super-catalog of nearly all writing systems from all of the world's languages) was created to work around this problem. One of Unicode's encodings, UTF-8, retains all 128 ASCII symbols (7-bit codes), but handles other characters differently. Those are preceded by a specific escape sequence of a few bits, which implicitly defines the length of the character. This allows encoding all Unicode characters on a sequence of one or more bytes. Its use has been popularized by the fact that it is the default encoding in XML documents.
zh-TW: 在英文以外的語系工作，經常需要切換編碼與字元集。尤有甚者，撰寫多語系文件還會碰到極為頑固的問題。Unicode (幾乎包括全世界所有書寫系統的編碼) 就是用來解決此等問題。UTF-8 是 Unicode 的編碼之一，仍是 128 ASCII 符號 (7-位元代碼)，但以不同方式處理其他字元。以逸出字元為首的數個位元帶頭，設定字元的長度。此種方法允許 Unicode 字元以一個或多個位元組呈現。已是 XML 文件的預設編碼方式。

en: This is the encoding that should generally be used, and is thus the default on Debian systems.
zh-TW: 就是這個編碼表最常用，Debian 系統把它做為預設值。

en: The first question invites you to select “locales” to support. Selecting all English locales (meaning those beginning with “<literal>en_</literal>”) is a reasonable choice. Do not hesitate to also enable other locales if the machine will host foreign users. The list of locales enabled on the system is stored in the <filename>/etc/locale.gen</filename> file. It is possible to edit this file by hand, but you should run <command>locale-gen</command> after any modifications. It will generate the necessary files for the added locales to work, and remove any obsolete files.
zh-TW: 第一件事是選擇支援的 “地區設定”。選擇英語地區設定 (表示以 “<literal>en_</literal>” 起頭) 是合理的。別忘了再選擇另個地區設定以便支援其他語系。系統的地區設定表儲存在 <filename>/etc/locale.gen</filename> 檔案內。可以手動編輯它，但在修改後應執行 <command>locale-gen</command> 命令。產生新增地區設定所需要的必要檔案，並且移除不需要的檔案。

en: <primary>environment</primary>
zh-TW: <primary>環境</primary>

en: <emphasis>BEHIND THE SCENES</emphasis> <filename>/etc/environment</filename> and <filename>/etc/default/locale</filename>
zh-TW: <emphasis>後台</emphasis> <filename>/etc/environment</filename> 與 <filename>/etc/default/locale</filename>

en: The <filename>/etc/environment</filename> file provides the <command>login</command>, <command>gdm</command>, or even <command>ssh</command> programs with the correct environment variables to be created.
zh-TW: <filename>/etc/environment</filename> 檔案提供 <command>login</command>、<command>gdm</command>、或 <command>ssh</command> 程式建置正確的環境變數。

en: The <filename>/etc/default/locale</filename> file works in a similar manner, but contains only the <varname>LANG</varname> environment variable. Thanks to this split, some PAM users can inherit a complete environment without localization. Indeed, it is generally discouraged to run server programs with localization enabled; on the other hand, localization and regional settings are recommended for programs that open user sessions.
zh-TW: <filename>/etc/default/locale</filename> 檔案以類似的方式運作，但祗有 <varname>LANG</varname> 環境變數。感謝此種區隔，某些 PAM 使用者可以在地區設定之外承襲完整的環境。事實上，不鼓勵在伺服器軟體執行地區設定；比較建議在使用者端的程式設定地區及區域。

en: Configuring the Keyboard
zh-TW: 組態鍵盤

en: <primary>keyboard layout</primary>
zh-TW: <primary>鍵盤布局</primary>

en: <primary>layout, keyboard</primary>
zh-TW: <primary>布局，鍵盤</primary>

en: Even if the keyboard layout is managed differently in console and graphical mode, Debian offers a single configuration interface that works for both: it is based on debconf and is implemented in the <emphasis role="pkg">keyboard-configuration</emphasis> package. Thus the <command>dpkg-reconfigure keyboard-configuration</command> command can be used at any time to reset the keyboard layout.
zh-TW: 即使鍵盤布局與終端機和圖形介面的管理不同，Debian 仍提供單一組態介面供兩者使用：以 debconf 為基礎應用於 <emphasis role="pkg">keyboard-configuration</emphasis> 套件。因此，任何時間均可使用 <command>dpkg-reconfigure keyboard-configuration</command> 命令重設鍵盤。

en: <indexterm><primary><literal>azerty</literal></primary></indexterm>The questions are relevant to the physical keyboard layout (a standard PC keyboard in the US will be a “Generic 104 key”), then the layout to choose (generally “US”), and then the position of the AltGr key (right Alt). Finally comes the question of the key to use for the “Compose key”, which allows for entering special characters by combining keystrokes. Type successively <keycombo action="seq"><keycap>Compose</keycap><keycap>'</keycap><keycap>e</keycap></keycombo> and produce an e-acute (“é”). All these combinations are described in the <filename>/usr/share/X11/locale/en_US.UTF-8/Compose</filename> file (or another file, determined according to the current locale indicated by <filename>/usr/share/X11/locale/compose.dir</filename>).
zh-TW: <indexterm><primary><literal>azerty</literal></primary></indexterm>問題與鍵盤的實體配置 (美式標準鍵盤為 “通用 104 鍵”)有關，選擇配置 (通常是 “US”)，然後選取 AltGr鍵 (即右側的 Alt 鍵)。最後是 “組合鍵”，以多個鍵同時按下組合成特殊字元。連續鍵入 <keycombo action="seq"><keycap>Compose</keycap><keycap>'</keycap><keycap>e</keycap></keycombo> 就能產生帶讀音符號的 e (“é”)。這些組合鍵列在 <filename>/usr/share/X11/locale/en_US.UTF-8/Compose</filename> 檔案 (或其他檔案，視 <filename>/usr/share/X11/locale/compose.dir</filename> 指示的當前在地設定)。

en: <primary><literal>Compose</literal>, key</primary>
zh-TW: <primary><literal>組合</literal>，鍵</primary>

en: Migrating to UTF-8
zh-TW: 移殖至 UTF-8

en: The generalization of UTF-8 encoding has been a long awaited solution to numerous difficulties with interoperability, since it facilitates international exchange and removes the arbitrary limits on characters that can be used in a document. The one drawback is that it had to go through a rather difficult transition phase. Since it could not be completely transparent (that is, it could not happen at the same time all over the world), two conversion operations were required: one on file contents, and the other on filenames. Fortunately, the bulk of this migration has been completed and we discuss it largely for reference.
zh-TW: 期待已久的 UTF-8 一般化編碼是解決互通性的方案之一，可解決文件中字元的國際交換與誤值的限制。其中一個限制是必須經由相當困難的轉換階段。它可以完全透通 (就是，不會同時在全世界發生)，需要兩個轉換作業：檔案內容，以及檔案名稱。幸運的是，該等移殖已經完成且討論甚多。

en: <emphasis>CULTURE</emphasis> <foreignphrase>Mojibake</foreignphrase> and interpretation errors
zh-TW: <emphasis>文化</emphasis> <foreignphrase>亂碼</foreignphrase> 與解譯錯誤

en: Thus, if a French text appears normal with the exception of accented letters and certain symbols which appear to be replaced with sequences of characters like “Ã©” or Ã¨” or “Ã§”, it is probably a file encoded as UTF-8 but interpreted as ISO-8859-1 or ISO-8859-15. This is a sign of a local installation that has not yet been migrated to UTF-8. If, instead, you see question marks instead of accented letters — even if these question marks seem to also replace a character that should have followed the accented letter — it is likely that your installation is already configured for UTF-8 and that you have been sent a document encoded in Western ISO.
zh-TW: 因此，法文的內容看起來正常，祗是無法顯示 “Ã©” 或 Ã¨” 或 “Ã§” 等重音字母與符號，很可能以 UTF-8 編碼儲存但被解讀成 ISO-8859-1 或 ISO-8859-15。在地的安裝尚未移殖至 UTF-8。如果，看到問號取代重音字母 — 即使這些問號取代重音字母後的字元 — 很可能已安裝並組態為 UTF-8 不過送出的文件仍以 Western ISO 編碼。

en: So much for “simple” cases. These cases only appear in Western culture, since Unicode (and UTF-8) was designed to maximize the common points with historical encodings for Western languages based on the Latin alphabet, which allows recognition of parts of the text even when some characters are missing.
zh-TW: 這些都是 “簡單的” 個案。這些個案祗出現在西方文化裡，因為 Unicode (與 UTF-8) 是擴充拉丁字母為基礎的西方語系編碼，即使失漏部份字元仍可辨識其他內容。

en: In more complex configurations, which, for example, involve two environments corresponding to two different languages that do not use the same alphabet, you often get completely illegible results — a series of abstract symbols that have nothing to do with each other. This is especially common with Asian languages due to their numerous languages and writing systems. The Japanese word <foreignphrase>mojibake</foreignphrase> has been adopted to describe this phenomenon. When it appears, diagnosis is more complex and the simplest solution is often to simply migrate to UTF-8 on both sides.
zh-TW: 在較複雜的環境裡，諸如，使用不同字母的兩種語文，通常得到完全不同的結果 — 彼此完全無意義的抽象符號。特別是語言與文字完全不同的亞洲語文。日文的 <foreignphrase>mojibake</foreignphrase>，即亂碼，用來說明此現象。出現時，診斷極為困難，最簡單的方法就是兩端都移殖至 UTF-8。

en: As far as file names are concerned, the migration can be relatively simple. The <command>convmv</command> tool (in the package with the same name) was created specifically for this purpose; it allows renaming files from one encoding to another. The use of this tool is relatively simple, but we recommend doing it in two steps to avoid surprises. The following example illustrates a UTF-8 environment containing directory names encoded in ISO-8859-15, and the use of <command>convmv</command> to rename them.
zh-TW: 轉換檔名編碼，移殖工作還算簡單。<command>convmv</command> 工具 (以同名存在套件內) 是專門移殖用的；可以把檔名重新命名於不同的編碼。此工具還很簡單，但需要兩個步驟。下例說明在 UTF-8 環境下採用 ISO-8859-15 編碼的資料夾，以 <command>convmv</command> 重新命名。

en: For the file content, conversion procedures are more complex due to the vast variety of existing file formats. Some file formats include encoding information that facilitates the tasks of the software used to treat them; it is sufficient, then, to open these files and re-save them specifying UTF-8 encoding. In other cases, you have to specify the original encoding (ISO-8859-1 or “Western”, or ISO-8859-15 or “Western (Euro)”, according to the formulations) when opening the file.
zh-TW: 以檔案內容來說，因為檔案格式的多樣性，增加轉換工作的複雜度。有些檔案格式本身包括編碼資訊協助軟體使用它們；就可以直接打開它們，並指明以 UTF-8 編碼再儲存之。其他的情況下，則必須以原始的編碼格式 (ISO-8859-1 或 “Western”、或 ISO-8859-15 或 “Western (Euro)”，視其規則而定) 開啟它們。

en: Configuring the Network
zh-TW: 組態網路

en: <emphasis>BACK TO BASICS</emphasis> Essential network concepts (Ethernet, IP address, subnet, broadcast)
zh-TW: <emphasis>基本</emphasis> 必要的網路概念 (Ethernet、IP 位址、次網路、廣播)

en: <primary>connector, RJ45</primary>
zh-TW: <primary>連結器，RJ45</primary>

en: <primary>RJ45 connector</primary>
zh-TW: <primary>RJ45 連接器</primary>

en: <primary>address, IP address</primary>
zh-TW: <primary>位址，IP 位址</primary>

en: An IP address is a number used to identify a network interface on a computer on a local network or the Internet. In the currently most widespread version of IP (IPv4), this number is encoded in 32 bits, and is usually represented as 4 numbers separated by periods (e.g. <literal>192.168.0.1</literal>), each number being between 0 and 255 (inclusive, which corresponds to 8 bits of data). The next version of the protocol, IPv6, extends this addressing space to 128 bits, and the addresses are generally represented as a series of hexadecimal numbers separated by colons (e.g., 2001:0db8:13bb:0002:0000:0000:0000:0020, or 2001:db8:13bb:2::20 for short).
zh-TW: IP 位址是一組數字用於辨識電腦在地區網路或網際網路的介面。最常用的是 IP 版本是 (IPv4)，此組數字由 32 位元編成，通常以句點區隔的 4 個數字表示 (如 <literal>192.168.0.1</literal>)，使用 0 至 255 之間的數字 (含在內，對應於 8 位元的資料)。通信協定的下個版本是 IPv6，採用 128 位元表示一個位址，其位址以 16 進位表示，用冒號區隔 (如，2001:0db8:13bb:0002:0000:0000:0000:0020，或 2001:db8:13bb:2::20 簡版表示)。

en: <primary>subnet</primary>
zh-TW: <primary>次網路</primary>

en: <primary>mask</primary><secondary>subnet mask</secondary>
zh-TW: <primary>遮罩</primary><secondary>次網路遮罩</secondary>

en: A subnet mask (netmask) defines in its binary code which portion of an IP address corresponds to the network, the remainder specifying the machine. In the example of configuring a static IPv4 address given here, the subnet mask, <literal>255.255.255.0</literal> (24 “1”s followed by 8 “0”s in binary representation) indicates that the first 24 bits of the IP address correspond to the network address, and the other 8 are specific to the machine. In IPv6, for readability, only the number of “1”s is expressed; the netmask for an IPv6 network could, thus, be <literal>64</literal>.
zh-TW: 次網路遮罩 (網路遮罩) 設定對應於網路的 IP 位址二進位代碼，其餘的則有機器指定。在前述的固定 IPv4 位址中，次網路遮罩，<literal>255.255.255.0</literal> (以 2 進位表示，就是 24 個 “1” 之後接著 8 個 “0”) 表示 IP 位址前 24 位元對應至網路位址，且其餘 8 個則指向機器。在 IPv6 裡，為了方便閱讀，祗表示數字 “1”；IPv6 網路的網路遮罩可以是 <literal>64</literal>。

en: The network address is an IP address in which the part describing the machine's number is 0. The range of IPv4 addresses in a complete network is often indicated by the syntax, <emphasis>a.b.c.d/e</emphasis>, in which <emphasis>a.b.c.d</emphasis> is the network address and <emphasis>e</emphasis> is the number of bits affected to the network part in an IP address. The example network would thus be written: <literal>192.168.0.0/24</literal>. The syntax is similar in IPv6: <literal>2001:db8:13bb:2::/64</literal>.
zh-TW: 網路位址是一個 IP 位址，描述機器的號碼是 0。IPv4 位址的範圍是完成的網路以此語法表示，<emphasis>a.b.c.d/e</emphasis>，<emphasis>a.b.c.d</emphasis> 是網路位址，而 <emphasis>e</emphasis> 是被影響的位元數。因此，此網路可寫成：<literal>192.168.0.0/24</literal>。在 IPv6 的類似語法為：<literal>2001:db8:13bb:2::/64</literal>。

en: <primary>router</primary>
zh-TW: <primary>路由器</primary>

en: <primary>bridge</primary>
zh-TW: <primary>橋接器</primary>

en: A router is a machine that connects several networks to each other. All traffic coming through a router is guided to the correct network. To do this, the router analyzes incoming packets and redirects them according to the IP address of their destination. The router is often known as a gateway; in this configuration, it works as a machine that helps reach out beyond a local network (towards an extended network, such as the Internet).
zh-TW: 路由器用於連結多個網路。進入路由器的資訊被引導至正確的網路。所以，路由器分析進來的封包，根據其目的位址轉送至其他地方。路由器通常稱為閘道器；協助進入在地網路以外的地方 (網際網路之類的外部網路)。

en: <primary>broadcast</primary>
zh-TW: <primary>廣播</primary>

en: The special broadcast address connects all the stations in a network. Almost never “routed”, it only functions on the network in question. Specifically, it means that a data packet addressed to the broadcast never passes through the router.
zh-TW: 特定的廣播位址連結網路內所有的站台。幾乎不曾 “發送”，祗在網路內發送問題。就是說，經由廣播發送的資料封包不會通常路由器。

en: This chapter focuses on IPv4 addresses, since they are currently the most commonly used. The details of the IPv6 protocol are approached in <xref linkend="sect.ipv6" />, but the concepts remain the same.
zh-TW: 本章祗討論 IPv4 位址，現在最常見的。IPv6 協定的詳情在 <xref linkend="sect.ipv6" />，其概念是一樣的。

en: <primary><emphasis role="pkg">network-manager</emphasis></primary>
zh-TW: <primary><emphasis role="pkg">網路管理器</emphasis></primary>

en: <primary>network</primary><secondary>configuration</secondary>
zh-TW: <primary>網路</primary><secondary>組態</secondary>

en: <primary>interface</primary><secondary>network interface</secondary>
zh-TW: <primary>介面</primary><secondary>網路介面</secondary>

en: Ethernet Interface
zh-TW: Ethernet 介面

en: If the computer has an Ethernet card, the IP network that is associated with it must be configured by choosing from one of two methods. The simplest method is dynamic configuration with DHCP, and it requires a DHCP server on the local network. It may indicate a desired hostname, corresponding to the <literal>hostname</literal> setting in the example below. The DHCP server then sends configuration settings for the appropriate network.
zh-TW: 電腦使用 Ethernet 網路卡時，必須以下列的方法之一組態 IP 網路。最簡單的方式是以 DHCP 動態組態，需要在地網路的 DHCP 伺服器。可以使用與下例 <literal>hostname</literal> 設定的主機名稱。DHCP 伺服器就會送出組態設定給適當的網路。

en: DHCP configuration
zh-TW: DHCP 組態

en: A “static” configuration must indicate network settings in a fixed manner. This includes at least the IP address and subnet mask; network and broadcast addresses are also sometimes listed. A router connecting to the exterior will be specified as a gateway.
zh-TW: “靜態” 組態必須以固定方式指明網路設定。至少包括 IP 網址及次網路遮罩；有時也列出網路及廣播位址。必須以閘道指出連結外部的路由器。

en: Static configuration
zh-TW: 靜態組態

en: <primary>network</primary><secondary>address</secondary>
zh-TW: <primary>網路</primary><secondary>位址</secondary>

en: <emphasis>NOTE</emphasis> Multiple addresses
zh-TW: <emphasis>說明</emphasis> 多位址

en: As you can guess, the configurations can be rather complex, but these options are only used in very special cases. The examples cited here are typical of the usual configurations.
zh-TW: 如您所想，組態可以極為複雜，不過祗限於極為特殊的例子。此處引用的例子都是一般常見的組態。

en: Connecting with PPP through a PSTN Modem
zh-TW: 經由 PSTN 數據機的 PPP 連結

en: <primary>point to point</primary>
zh-TW: <primary>點對點</primary>

en: <primary>connection</primary><secondary>by PSTN modem</secondary>
zh-TW: <primary>連結</primary><secondary>經由 PSTN 數據機</secondary>

en: <primary>modem</primary><secondary>PSTN</secondary>
zh-TW: <primary>數據機</primary><secondary>PSTN</secondary>

en: A point to point (PPP) connection establishes an intermittent connection; this is the most common solution for connections made with a telephone modem (“PSTN modem”, since the connection goes over the public switched telephone network).
zh-TW: 點對點 (PPP) 連結建立斷續的連結；這是電話數據機最常見的連結方式 (“PSTN 數據機”，經由公共交換電話網路)。

en: A connection by telephone modem requires an account with an access provider, including a telephone number, username, password, and, sometimes the authentication protocol to be used. Such a connection is configured using the <command>pppconfig</command> tool in the Debian package of the same name. By default, it sets up a connection named <literal>provider</literal> (as in Internet service provider). When in doubt about the authentication protocol, choose <emphasis>PAP</emphasis>: it is offered by the majority of Internet service providers.
zh-TW: 電話數據機需要帳號才能連結，包括電話號碼、使用者名稱、密碼、以及認證協定。這種連結 Debian 同名套件內的使用 <command>pppconfig</command> 工具。預設使用的名稱是 <literal>提供者</literal> (做為網際網路服務提供者)。對認證協定有疑義時，選擇 <emphasis>PAP</emphasis>：大多數網際網路服務提供者使用它。

en: After configuration, it is possible to connect using the <command>pon</command> command (giving it the name of the connection as a parameter, when the default value of <literal>provider</literal> is not appropriate). The link is disconnected with the <command>poff</command> command. These two commands can be executed by the root user, or by any other user, provided they are in the <literal>dip</literal> group.
zh-TW: 組態之後，就可以使用 <command>pon</command> 命令 (<literal>提供者</literal> 的預設值不適用時，將連結的名稱當成參數)。以 <command>poff</command> 命令斷線。這兩個令可以被根使用者執行，或位在 <literal>dip</literal> 群組的其他使用者。

en: Connecting through an ADSL Modem
zh-TW: 以 ADSL 數據連結

en: <primary>connection</primary><secondary>by ADSL modem</secondary>
zh-TW: <primary>連結</primary><secondary>經由 ADSL 數據機</secondary>

en: <primary>modem</primary><secondary>ADSL</secondary>
zh-TW: <primary>數據機</primary><secondary>ADSL</secondary>

en: <primary>ADSL, modem</primary>
zh-TW: <primary>ADSL，數據機</primary>

en: The generic term “ADSL modem” covers a multitude of devices with very different functions. The modems that are simplest to use with Linux are those that have an Ethernet interface (and not only a USB interface). These tend to be popular; most ADSL Internet service providers lend (or lease) a “box” with Ethernet interfaces. Depending on the type of modem, the configuration required can vary widely.
zh-TW: “ADSL 數據機” 一辭包括不同功能的多種設備。使用 Linux 的數據機有 Ethernet 介面 (不祗是 USB 介面)。這是極為普遍的數據機；大部份的 ADSL 網際網路服務商出借 (或出租) 一個含 Ethernet 介面的 “盒子”。視其類型而有不同的設定。

en: Modems Supporting PPPOE
zh-TW: 支援 PPPOE 的數據機

en: Some Ethernet modems work with the PPPOE protocol (Point to Point Protocol over Ethernet). The <command>pppoeconf</command> tool (from the package with the same name) will configure the connection. To do so, it modifies the <filename>/etc/ppp/peers/dsl-provider</filename> file with the settings provided and records the login information in the <filename>/etc/ppp/pap-secrets</filename> and <filename>/etc/ppp/chap-secrets</filename> files. It is recommended to accept all modifications that it proposes.
zh-TW: 部份 Ethernet 數據機使用 PPPOE 協定 (乙太網上的對等協定，Point to Point Protocol over Ethernet)。<command>pppoeconf</command> 工具 (位於同名套件內) 將組態其連結。修改 <filename>/etc/ppp/peers/dsl-provider</filename> 檔案內容時，採用 <filename>/etc/ppp/pap-secrets</filename> 與 <filename>/etc/ppp/chap-secrets</filename> 檔案的內容。建議全盤接納所有的提議。

en: Once this configuration is complete, you can open the ADSL connection with the command, <command>pon dsl-provider</command> and disconnect with <command>poff dsl-provider</command>.
zh-TW: 組態完成之後，以命令 <command>pon dsl-provider</command> 開啟 ADSL 連結，並以命令 <command>poff dsl-provider</command> 斷線。

en: <emphasis>TIP</emphasis> Starting <command>ppp</command> at boot
zh-TW: <emphasis>秘訣</emphasis>啟動 <command>ppp</command> 於開機時

en: <primary><command>init</command></primary>
zh-TW: <primary><command>在裡面</command></primary>

en: PPP connections over ADSL are, by definition, intermittent. Since they are usually not billed according to time, there are few downsides to the temptation of keeping them always open. The standard means to do so is to use the init system.
zh-TW: PPP 在 ADSL 上的連結，其本意是斷斷續續的。因為不是依照連線時間收費，所以不必隨時打開它。標準的方法是使用 init 系統。

en: Once this unit file has been defined, it needs to be enabled with <command>systemctl enable adsl-connection</command>. Then the loop can be started manually with <command>systemctl start adsl-connection</command>; it will also be started automatically on boot.
zh-TW: 設定這個 unit file 之後，還需以 <command>systemctl enable adsl-connection</command> 命令啟動它。然後以手動方式，啟動此命令 <command>systemctl start adsl-connection</command> 迴圈；然後就可在開機時自動啟動。

en: On systems not using <command>systemd</command> (including <emphasis role="distribution">Wheezy</emphasis> and earlier versions of Debian), the standard SystemV init works differently. On such systems, all that is needed is to add a line such as the following at the end of the <filename>/etc/inittab</filename> file; then, any time the connection is disconnected, <command>init</command> will reconnect it.
zh-TW: 未使用 <command>systemd</command> 命令的系統 (包括 <emphasis role="distribution">Wheezy</emphasis> 及更早的 Debian 版本)，可使用標準的 SystemV init。在這種系統裡，祗需在 <filename>/etc/inittab</filename> 檔案加入一行字；然後，在斷線之後，執行 <command>init</command> 就可重新連線。

en: For ADSL connections that auto-disconnect on a daily basis, this method reduces the duration of the interruption.
zh-TW: 撥接後自動斷線的 ADSL，這種方法減少中斷的次數。

en: Modems Supporting PPTP
zh-TW: 支援 PPTP 的數據機

en: The PPTP (Point-to-Point Tunneling Protocol) protocol was created by Microsoft. Deployed at the beginning of ADSL, it was quickly replaced by PPPOE. If this protocol is forced on you, see <xref linkend="sect.pptp" />.
zh-TW: PPTP (點對點隧道協議，Point-to-Point Tunneling Protocol) 協定由微軟創製。在 ADSL 的初期就已布置，取代 PPPOE。若被強迫使用此協定，參見 <xref linkend="sect.pptp" />。

en: Modems Supporting DHCP
zh-TW: 支援 DHCP 數據機

en: When a modem is connected to the computer by an Ethernet cable (crossover cable) you typically configure a network connection by DHCP on the computer; the modem automatically acts as a gateway by default and takes care of routing (meaning that it manages the network traffic between the computer and the Internet).
zh-TW: 以 Ethernet 纜線 (跳線) 連線電腦的數據機，可以在電腦以 DHCP 組態網路連結；數據機自動成為閘道且執行路由的功能 (就是管理電腦與網際網路的流量)。

en: <emphasis>BACK TO BASICS</emphasis> Crossover cable for a direct Ethernet connection
zh-TW: <emphasis>基本</emphasis> 直接連結 Ethernet 的跳線

en: <primary>crossover cable</primary>
zh-TW: <primary>跳線</primary>

en: Computer network cards expect to receive data on specific wires in the cable, and send their data on others. When you connect a computer to a local network, you usually connect a cable (straight or crossover) between the network card and a repeater or switch. However, if you want to connect two computers directly (without an intermediary switch or repeater), you must route the signal sent by one card to the receiving side of the other card, and vice-versa. This is the purpose of a crossover cable, and the reason it is used.
zh-TW: 電腦網路卡經由特定纜線接收資料，也從同樣的管道送出資料。電腦連上地區網路後，通常以纜線 (直接連線或跳線) 連結網路上與中繼器或交換器。若想直接連結兩部電腦 (不經過交換器或中繼器)，必須經由網路卡送出資料至接收端的另個網路卡，反之亦然。這就是跳線的作用，以及使用它的原因。

en: Most “ADSL routers” on the market can be used like this, as do most of the ADSL modems provided by Internet services providers.
zh-TW: 大部份的 “ADSL 路由器” 也能這麼做，網際網路服務供應商提供的 ADSL 數據機也具有此功能。

en: Automatic Network Configuration for Roaming Users
zh-TW: 網路自動組態漫遊使用者

en: <primary>network</primary><secondary>roaming configuration</secondary>
zh-TW: <primary>網路</primary><secondary>漫遊組態</secondary>

en: Many Falcot engineers have a laptop computer that, for professional purposes, they also use at home. The network configuration to use differs according to location. At home, it may be a wifi network (protected by a WPA key), while the workplace uses a wired network for greater security and more bandwidth.
zh-TW: Falcot 公司的工程師擁有專業用的筆電，同時也在家裡使用它。根據使用場所的不同，網路有不同的組態方式。在家裡，可能使用 WiFi 網路 (以 WPA 鑰保護)，在工作場合則使用較安全與頻寬更充足的固接網路。

en: To avoid having to manually connect or disconnect the corresponding network interfaces, administrators installed the <emphasis role="pkg">network-manager</emphasis> package on these roaming machines. This software enables a user to easily switch from one network to another using a small icon displayed in the notification area of their graphical desktop. Clicking on this icon displays a list of available networks (both wired and wireless), so they can simply choose the network they wish to use. The program saves the configuration for the networks to which the user has already connected, and automatically switches to the best available network when the current connection drops.
zh-TW: 為了避免人工連結與斷線對應的網路介面，管理者在漫遊機器安裝 <emphasis role="pkg">network-manager</emphasis> 套件。此軟體可以讓使用者從圖形桌面的小圖示，在多個網路間切換。按下此圖示即顯示可用的網路 (固接與無線)，藉以選擇其中之一。此程式儲存曾連結網路的組態，斷線時自動選擇最佳的網路。

en: In order to do this, the program is structured in two parts: a daemon running as root handles activation and configuration of network interfaces and a user interface controls this daemon. PolicyKit handles the required authorizations to control this program and Debian configured PolicyKit in such a way so that members of the netdev group can add or change Network Manager connections.
zh-TW: 為了達到這個目的，程式分為兩個部份：在根部執行後台進程並組態網路介面與使用者介面控制該後台進程。PolicyKit 處理必要的權限以控制此程式，然後由 Debian 組態 PolicyKit 讓 netdev 群組成員可以新增或修改 Network Manager 的連結。

en: Note that this program is installed by default when the “Desktop Environment” task is chosen during initial installation.
zh-TW: 在初始安裝階段選擇 “桌面環境”的工作，就能夠預設安裝此程式。

en: Setting the Hostname and Configuring the Name Service
zh-TW: 設定主機名稱與組態名稱服務

en: <primary>name</primary><secondary>attribution and resolution</secondary>
zh-TW: <primary>名稱</primary><secondary>屬性與解析</secondary>

en: <primary>assignment of names</primary>
zh-TW: <primary>指定名稱</primary>

en: The purpose of assigning names to IP numbers is to make them easier for people to remember. In reality, an IP address identifies a network interface associated with a device such as a network card. Since each machine can have several network cards, and several interfaces on each card, one single computer can have several names in the domain name system.
zh-TW: 將 IP 數字轉換為名稱係方便記憶。實務上，IP 位址係用於辨識網路卡之類的網路介面設備。機器可能有多個網路卡，每個網路卡可能有多個介面，所以在網域名稱系統裡，一部電腦就可能有多個名稱。

en: Each machine is, however, identified by a main (or “canonical”) name, stored in the <filename>/etc/hostname</filename> file and communicated to the Linux kernel by initialization scripts through the <command>hostname</command> command. The current value is available in a virtual filesystem, and you can get it with the <command>cat /proc/sys/kernel/hostname</command> command.
zh-TW: 然而，每部機器都有個辨識用的主要 (如 “canonical”) 名稱，儲存在 <filename>/etc/hostname</filename> 檔案內並以初始腳本經由 <command>hostname</command> 命令與 Linux 核心溝通。現在的值儲存在虛擬檔案系統，可經由 <command>cat /proc/sys/kernel/hostname</command> 命令取得。

en: <primary><command>hostname</command></primary>
zh-TW: <primary><command>主機名稱</command></primary>

en: <emphasis>BACK TO BASICS</emphasis> <filename>/proc/</filename> and <filename>/sys/</filename>, virtual filesystems
zh-TW: <emphasis>基本</emphasis> <filename>/proc/</filename> 與 <filename>/sys/</filename>，虛擬檔案系統

en: The <filename>/proc/</filename> and <filename>/sys/</filename> file trees are generated by “virtual” filesystems. This is a practical means of recovering information from the kernel (by listing virtual files) and communicating them to it (by writing to virtual files).
zh-TW: <filename>/proc/</filename> 與 <filename>/sys/</filename> 檔案樹係由 “虛擬” 檔案系統產生。從核心 (以列出虛擬檔案方式) 取得資訊並與其溝通 (寫入虛擬檔案) 的實務。

en: Surprisingly, the domain name is not managed in the same way, but comes from the complete name of the machine, acquired through name resolution. You can change it in the <filename>/etc/hosts</filename> file; simply write a complete name for the machine there at the beginning of the list of names associated with the address of the machine, as in the following example:
zh-TW: 意外的是，網域名稱的管理方式不同，來自機器的完整名稱，經由名稱解析取得。可以在 <filename>/etc/hosts</filename> 檔案內更改它；在名稱清單前寫入完整的名稱，如下例：

en: <primary><filename>hosts</filename></primary>
zh-TW: <primary><filename>主機</filename></primary>

en: <primary>domain</primary><secondary>name</secondary>
zh-TW: <primary>網域</primary><secondary>名稱</secondary>

en: <primary>name</primary><secondary>domain</secondary>
zh-TW: <primary>名稱</primary><secondary>網域</secondary>

en: Name Resolution
zh-TW: 名稱解析

en: <primary>resolution</primary><secondary>name</secondary>
zh-TW: <primary>解析</primary><secondary>名稱</secondary>

en: <primary>name</primary><secondary>resolution</secondary>
zh-TW: <primary>名稱</primary><secondary>解析</secondary>

en: The mechanism for name resolution in Linux is modular and can use various sources of information declared in the <filename>/etc/nsswitch.conf</filename> file. The entry that involves host name resolution is <literal>hosts</literal>. By default, it contains <literal>files dns</literal>, which means that the system consults the <filename>/etc/hosts</filename> file first, then DNS servers. NIS/NIS+ or LDAP servers are other possible sources.
zh-TW: Linux 的名稱解析機制是模組化的且可使用 <filename>/etc/nsswitch.conf</filename> 宣稱的資料來源。涉及主機名稱解析的款目是 <literal>hosts</literal>。預設，它包括 <literal>files dns</literal>，表示系統先參照 <filename>/etc/hosts</filename> 檔案，再參照 DNS 伺服器。NIS/NIS+ 或 LDAP 伺服器是另個來源選擇。

en: <emphasis>NOTE</emphasis> NSS and DNS
zh-TW: <emphasis>說明</emphasis> NSS 與 DNS

en: Be aware that the commands specifically intended to query DNS (especially <command>host</command>) do not use the standard name resolution mechanism (NSS). As a consequence, they do not take into consideration <filename>/etc/nsswitch.conf</filename>, and thus, not <filename>/etc/hosts</filename> either.
zh-TW: 專門用於查詢 DNS (特別是 <command>host</command>) 的命令未使用標準的名稱解析機制 (NSS)。也就是，完全未考慮 <filename>/etc/nsswitch.conf</filename>，也不使用 <filename>/etc/hosts</filename>。

en: Configuring DNS Servers
zh-TW: 組態 DNS 伺服器

en: <primary>Domain Name Service</primary>
zh-TW: <primary>網域名稱服務</primary>

en: DNS (Domain Name Service) is a distributed and hierarchical service mapping names to IP addresses, and vice-versa. Specifically, it can turn a human-friendly name such as <literal>www.eyrolles.com</literal> into the actual IP address, <literal>213.244.11.247</literal>.
zh-TW: DNS (網域名稱服務) 是對映名稱至 IP 位址的分散式階層服務，同時也反向對映。尤其是，把人可閱讀的名稱，如 <literal>www.eyrolles.com</literal> 對映至實際的 IP 位址 <literal>213.244.11.247</literal>。

en: To access DNS information, a DNS server must be available to relay requests. Falcot Corp has its own, but an individual user is more likely to use the DNS servers provided by their ISP.
zh-TW: 必須先設定 DNS 伺服器，才能用到 DNS 資訊。Falcot 公司自設該伺服器，但個人使用者可能使用 ISP 提供的 DNS 伺服器。

en: The <filename>/etc/hosts</filename> file
zh-TW: <filename>/etc/hosts</filename> 檔案

en: This file is available even during network outages or when DNS servers are unreachable, but will only really be useful when duplicated on all the machines on the network. The slightest alteration in correspondence will require the file to be updated everywhere. This is why <filename>/etc/hosts</filename> generally only contains the most important entries.
zh-TW: 即使網路停擺或 DNS 伺服器不通仍可近用此檔案，但祗適用於在地區網路所有機器重製的內容。即使是極微小的變動，都需要更新各地所有的檔案。所以， <filename>/etc/hosts</filename> 通常祗包括最重要的款目。

en: This file will be sufficient for a small network not connected to the Internet, but with 5 machines or more, it is recommended to install a proper DNS server.
zh-TW: 這個檔案對未連上網際網路的小型網路是夠用的，5 部以內的機器，建議安裝一個 DNS 伺服器較佳。

en: <emphasis>TIP</emphasis> Bypassing DNS
zh-TW: <emphasis>秘訣</emphasis> 繞過 DNS

en: Since applications check the <filename>/etc/hosts</filename> file before querying DNS, it is possible to include information in there that is different from what the DNS would return, and therefore to bypass normal DNS-based name resolution.
zh-TW: 某些應用程式先檢查 <filename>/etc/hosts</filename> 檔案才查詢 DNS，與 DNS 送回資料不同的部份，可以先儲存在這裡，並略過 DNS 的名稱解析。

en: This allows, in the event of DNS changes not yet propagated, to test access to a website with the intended name even if this name is not properly mapped to the correct IP address yet.
zh-TW: 修改 DNS 但尚未布署前，這種做法可以測試網站名稱與 IP 位址的對應性。

en: Another possible use is to redirect traffic intended for a specific host to the localhost, thus preventing any communication with the given host. For example, hostnames of servers dedicated to serving ads could be diverted which would bypass these ads resulting in more fluid, less distracting, navigation.
zh-TW: 另一個可能用法是把流量轉移至指定的區域主機，避免大流量進入指定的主機。例如，可以繞過專供廣告使用的伺服器主機名稱，讓結果更順暢、少些干擾。

en: User and Group Databases
zh-TW: 使用者與群組資料庫

en: <primary>database</primary><secondary>of users</secondary>
zh-TW: <primary>資料庫</primary><secondary>使用者</secondary>

en: <primary>database</primary><secondary>of groups</secondary>
zh-TW: <primary>資料庫</primary><secondary>群組</secondary>

en: <emphasis>NOTE</emphasis> Editing system files
zh-TW: <emphasis>說明</emphasis> 編輯系統檔案

en: The system files mentioned in this chapter are all plain text files, and can be edited with a text editor. Considering their importance to core system functionality, it is always a good idea to take extra precautions when editing system files. First, always make a copy or backup of a system file before opening or altering it. Second, on servers or machines where more than one person could potentially access the same file at the same time, take extra steps to guard against file corruption.
zh-TW: 本章討論的系統檔案都是純文字檔，可以用文字編輯器處理。這些檔案對核心系統的運作極為重要，編輯該等檔案時多加慎重不會錯的。首先，先複製或備份原檔案。第二，在伺服器或多人可同時近用該等檔案的機器上，多費心以防止檔案損壞。

en: For this purpose, it is enough to use the <command>vipw</command> command to edit the <filename>/etc/passwd</filename> file, or <command>vigr</command> to edit <filename>/etc/group</filename>. These commands lock the file in question prior to running the text editor, (<command>vi</command> by default, unless the <varname>EDITOR</varname> environment variable has been altered). The <literal>-s</literal> option in these commands allows editing the corresponding <foreignphrase>shadow</foreignphrase> file.
zh-TW: 為了達成此目標，最好使用 <command>vipw</command> 命令編輯 <filename>/etc/passwd</filename> 檔案，或使用 <command>vigr</command> 命令編輯 <filename>/etc/group</filename> 檔案。這些命令會先鎖住該等檔案再執行文字編輯器， (預設使用 <command>vi</command> 命令，除非 <varname>EDITOR</varname> 環境變數有其他的設定)。加上 <literal>-s</literal> 選項可同時編輯對應的 <foreignphrase>shadow</foreignphrase> 檔案。

en: <emphasis>BACK TO BASICS</emphasis> Crypt, a one-way function
zh-TW: <emphasis>基本</emphasis> Crypt，單向的函數

en: <command>crypt</command> is a one-way function that transforms a string (<varname>A</varname>) into another string (<varname>B</varname>) in a way that <varname>A</varname> cannot be derived from <varname>B</varname>. The only way to identify <varname>A</varname> is to test all possible values, checking each one to determine if transformation by the function will produce <varname>B</varname> or not. It uses up to 8 characters as input (string <varname>A</varname>) and generates a string of 13, printable, ASCII characters (string <varname>B</varname>).
zh-TW: <command>crypt</command> 是單向函數以特別的方法把字串 (<varname>A</varname>) 轉換成另個字串 (<varname>B</varname>)，轉換後無法回覆成 <varname>A</varname> 經由 <varname>B</varname>。辨識 <varname>A</varname> 的唯一方法是逐一測試所有可能的值，查驗等同於 <varname>B</varname> 的結果。最多可輸入 8 個字元 (字串 <varname>A</varname>) 然後產生 13 個字元的可列印 ASCII 字元 (字串 <varname>B</varname>)。

en: User List: <filename>/etc/passwd</filename>
zh-TW: 使用者清單：<filename>/etc/passwd</filename>

en: <primary>password</primary>
zh-TW: <primary>密碼</primary>

en: Here is the list of fields in the <filename>/etc/passwd</filename> file:
zh-TW: 在 <filename>/etc/passwd</filename> 檔案內的欄位清單：

en: login, for example <literal>rhertzog</literal>;
zh-TW: 登入，例如 <literal>rhertzog</literal>；

en: <literal>uid</literal>: unique number identifying each user;
zh-TW: <literal>uid</literal>：用於辨識個別使用者的不重複數字；

en: <literal>gid</literal>: unique number for the user's main group (Debian creates a specific group for each user by default);
zh-TW: <literal>gid</literal>：使用者主要群組 (Debian 的預設值係為每個使用者建立一個群組) 的不重複號碼；

en: <literal>GECOS</literal>: data field usually containing the user's full name;
zh-TW: <literal>GECOS</literal>：通常儲存使用者全名的資料欄；

en: login directory, assigned to the user for storage of their personal files (the environment variable <varname>$HOME</varname> generally points here);
zh-TW: 登入資料夾，用於儲存使用者的個人檔案 (環境變數 <varname>$HOME</varname> 通常指向此處)；

en: program to execute upon login. This is usually a command interpreter (shell), giving the user free rein. If you specify <command>/bin/false</command> (which does nothing and returns control immediately), the user cannot login.
zh-TW: 登入時執行的程式。通常是命令解譯器 (shell)，若指定為 <command>/bin/false</command> (不做任何事並立即回到控制)，則使用者無法登入。

en: <emphasis>BACK TO BASICS</emphasis> Unix group
zh-TW: <emphasis>基本</emphasis> Unix 群組

en: <primary>group</primary>
zh-TW: <primary>群組</primary>

en: A Unix group is an entity including several users so that they can easily share files using the integrated permission system (by benefiting from the same rights). You can also restrict use of certain programs to a specific group.
zh-TW: Unix 群組是包括多個使用者的實體，以整合授權系統可以共享檔案 (具有同樣的權限)。可以限定程式供指定的群組使用。

en: The Hidden and Encrypted Password File: <filename>/etc/shadow</filename>
zh-TW: 隱藏與加密的密碼檔：<filename>/etc/shadow</filename>

en: The <filename>/etc/shadow</filename> file contains the following fields:
zh-TW: The <filename>/etc/shadow</filename> 檔案含以下的欄位：

en: login;
zh-TW: 登入；

en: encrypted password;
zh-TW: 加密的密碼；

en: several fields managing password expiration.
zh-TW: 管理密碼期限的欄位。

en: <emphasis>SECURITY</emphasis> <filename>/etc/shadow</filename> file security
zh-TW: <emphasis>安全</emphasis> <filename>/etc/shadow</filename> 檔案安全

en: <emphasis>DOCUMENTATION</emphasis> <filename>/etc/passwd</filename>, <filename>/etc/shadow</filename> and <filename>/etc/group</filename> file formats
zh-TW: <emphasis>文件</emphasis> <filename>/etc/passwd</filename>、<filename>/etc/shadow</filename> 與 <filename>/etc/group</filename> 檔案格式

en: Modifying an Existing Account or Password
zh-TW: 修改既有的帳號或密碼

en: Finally, the <command>chage</command> (CHange AGE) command allows the administrator to change the password expiration settings (the <literal>-l <replaceable>user</replaceable></literal> option will list the current settings). You can also force the expiration of a password using the <command>passwd -e <replaceable>user</replaceable></command> command, which will require the user to change their password the next time they log in.
zh-TW: 最後，<command>chage</command> (CHange AGE) 命令允許管理者變更密碼的有效期 (<literal>-l <replaceable>使用者</replaceable></literal> 選項列出現在的設定)。以 <command>passwd -e <replaceable>使用者</replaceable></command> 命令強迫密碼失效，要求使用者登錄時變更密碼才能繼續使用。

en: Disabling an Account
zh-TW: 帳號禁用

en: <primary>account</primary><secondary>disable</secondary>
zh-TW: <primary>帳號</primary><secondary>禁用</secondary>

en: <emphasis>GOING FURTHER</emphasis> NSS and system databases
zh-TW: <emphasis>下一步</emphasis> NSS 與系統資料庫

en: Instead of using the usual files to manage lists of users and groups, you could use other types of databases, such as LDAP or <command>db</command>, by using an appropriate NSS (Name Service Switch) module. The modules used are listed in the <filename>/etc/nsswitch.conf</filename> file, under the <literal>passwd</literal>, <literal>shadow</literal> and <literal>group</literal> entries. See <xref linkend="sect.config-nss" /> for a specific example of the use of an NSS module by LDAP.
zh-TW: 與其使用檔案管理使用者與群組清單，還可使用其他資料庫類型，諸如 LDAP 或 <command>db</command>，藉由適當的 NSS (Name Service Switch 姓名服務切換) 模組。可用的模組列在 <filename>/etc/nsswitch.conf</filename> 檔案內，在 <literal>passwd</literal>、<literal>shadow</literal> 與 <literal>group</literal> 款目下。LDAP 下的 NSS 模組使用法，見 <xref linkend="sect.config-nss" />。

en: Group List: <filename>/etc/group</filename>
zh-TW: 群組清單：<filename>/etc/group</filename>

en: Groups are listed in the <filename>/etc/group</filename> file, a simple textual database in a format similar to that of the <filename>/etc/passwd</filename> file, with the following fields:
zh-TW: 群組列在 <filename>/etc/group</filename> 檔案內，單純的文字資料庫類似 <filename>/etc/passwd</filename> 檔案，包括以下的欄位：

en: group name;
zh-TW: 群組名稱；

en: password (optional): This is only used to join a group when one is not a usual member (with the <command>newgrp</command> or <command>sg</command> commands, see sidebar <xref linkend="sidebar.working-with-several-groups" />);
zh-TW: 密碼 (選項)：加入群組會用到 (以 <command>newgrp</command> 或 <command>sg</command> 命令，見專欄 <xref linkend="sidebar.working-with-several-groups" />)；

en: <literal>gid</literal>: unique group identification number;
zh-TW: <literal>gid</literal>：不重複的群組辨識碼；

en: list of members: list of names of users who are members of the group, separated by commas.
zh-TW: 成員清單：屬於此群組的使用者名稱清單，以逗點區隔。

en: <emphasis>BACK TO BASICS</emphasis> Working with several groups
zh-TW: <emphasis>基本</emphasis> 在多個群組工作

en: <primary>group</primary><secondary>change</secondary>
zh-TW: <primary>群組</primary><secondary>改變</secondary>

en: Each user may be a member of many groups; one of them is their “main group”. A user's main group is, by default, created during initial user configuration. By default, each file that a user creates belongs to them, as well as to their main group. This is not always desirable; for example, when the user needs to work in a directory shared by a group other than their main group. In this case, the user needs to change their main group using one of the following commands: <command>newgrp</command>, which starts a new shell, or <command>sg</command>, which simply executes a command using the supplied alternate group. These commands also allow the user to join a group to which they do not belong. If the group is password protected, they will need to supply the appropriate password before the command is executed.
zh-TW: 終端使用者可能參加多個群組；其中一個是自己的 “主要群組”。使用者自己的主要群組，使用者初始組態時自動產生的預設值。使用者新增的檔案自動屬於該讀者，以及其主要群組。這種方式並不完全合意；例如，使用者需要在自己主要群組之外的資料夾工作，與其他群組共享其檔案。在這種情況下，使用者需以命令：<command>newgrp</command> 變更其主要群組，產生新的 shell，或以 <command>sg</command> 命令，使用其他群組。這些命令也允許使用者加入其他群組。若該等群組受密碼保護，則需先取得密碼才能執行該等命令。

en: Alternatively, the user can set the <literal>setgid</literal> bit on the directory, which causes files created in that directory to automatically belong to the correct group. For more details, see sidebar <xref linkend="sidebar.setgid-dir" />.
zh-TW: 使用者還可以設定資料夾的 <literal>setgid</literal> 位元，讓該資料夾內的檔案自動屬於特定群組。詳情見專欄 <xref linkend="sidebar.setgid-dir" />。

en: The <command>id</command> command displays the current state of a user, with their personal identifier (<varname>uid</varname> variable), current main group (<varname>gid</varname> variable), and the list of groups to which they belong (<varname>groups</varname> variable).
zh-TW: <command>id</command> 命令顯示使用者現在的狀態，包括個人辨識碼 (<varname>uid</varname> 變數)、現在的主要群組 (<varname>gid</varname> variable)、以及其所屬群組的清單 (<varname>groups</varname> 變數)。

en: <primary>group</primary><secondary>creation</secondary>
zh-TW: <primary>群組</primary><secondary>新增</secondary>

en: <primary>group</primary><secondary>deletion</secondary>
zh-TW: <primary>群組</primary><secondary>刪除</secondary>

en: <primary>creation</primary><secondary>of groups</secondary>
zh-TW: <primary>新增</primary><secondary>群組</secondary>

en: <emphasis>TIP</emphasis> <command>getent</command>
zh-TW: <emphasis>秘訣</emphasis> <command>getent</command>

en: The <command>getent</command> (get entries) command checks the system databases the standard way, using the appropriate library functions, which in turn call the NSS modules configured in the <filename>/etc/nsswitch.conf</filename> file. The command takes one or two arguments: the name of the database to check, and a possible search key. Thus, the command <command>getent passwd rhertzog</command> will give the information from the user database regarding the user <literal>rhertzog</literal>.
zh-TW: <command>getent</command> (取得款目的意思 get entries) 命令使用適當的程式庫函數，呼叫組態於 <filename>/etc/nsswitch.conf</filename> 檔案的 NSS 模組，以標準方式檢查系統資料庫。此命令需要一個或兩個參數：被檢查的資料庫名稱、以及可能的搜尋鍵詞。因此，<command>getent passwd rhertzog</command> 命令將從使用者 <literal>rhertzog</literal> 中給予使用者資料庫。

en: Creating Accounts
zh-TW: 新增帳號

en: <primary>account</primary><secondary>creation</secondary>
zh-TW: <primary>帳號</primary><secondary>新增</secondary>

en: <primary>creation</primary><secondary>of user accounts</secondary>
zh-TW: <primary>新增</primary><secondary>使用者帳號</secondary>

en: One of the first actions an administrator needs to do when setting up a new machine is to create user accounts. This is typically done using the <command>adduser</command> command which takes a user-name for the new user to be created, as an argument.
zh-TW: 設定新機器後管理者需做的第一件事就是新增使用者帳號。以 <command>adduser</command> 命令新增使用者的名稱，做為其參數。

en: The <command>adduser</command> command asks a few questions before creating the account, but its usage is fairly straightforward. Its configuration file, <filename>/etc/adduser.conf</filename>, includes all the interesting settings: it can be used to automatically set a quota for each new user by creating a user template, or to change the location of user accounts; the latter is rarely useful, but it comes in handy when you have a large number of users and want to divide their accounts over several disks, for instance. You can also choose a different default shell.
zh-TW: <command>adduser</command> 命令在新增帳號前先詢問若干問題，但其使用方式相當直覺。 <filename>/etc/adduser.conf</filename> 是它的組態檔，包括有趣的設定：可用於自動設定使用者的額度、或改變使用者帳號的位置；後者較少使用，但有多個使用者且需區隔該等帳號於若干硬碟時，就是很好用的工具。也可選擇不同的 shell 為預設值。

en: <emphasis>BACK TO BASICS</emphasis> Quota
zh-TW: <emphasis>基本</emphasis> 額度

en: <primary>quota</primary>
zh-TW: <primary>額度</primary>

en: The term “quota” refers to a limit on machine resources that a user is allowed to use. This frequently refers to disk space.
zh-TW: “額度” 指的是使用者在此機器可使用的資源上限。通常指的是磁碟空間。

en: The creation of an account populates the user's home directory with the contents of the <filename>/etc/skel/</filename> template. This provides the user with a set of standard directories and configuration files.
zh-TW: 新增帳號時，把使用者的家目錄置於 <filename>/etc/skel/</filename> 模皮。提供使用者一組標準的資料夾與組態檔案。

en: <primary>group</primary><secondary>add a user</secondary>
zh-TW: <primary>群組</primary><secondary>新增使用者</secondary>

en: <primary>add a user to a group</primary>
zh-TW: <primary>新增群組的使用者</primary>

en: In some cases, it will be useful to add a user to a group (other than their default “main” group) in order to grant them additional permissions. For example, a user who is included in the <emphasis>audio</emphasis> group can access audio devices (see sidebar <xref linkend="sidebar.special-files" />). This can be achieved with a command such as <command>adduser <replaceable>user</replaceable> <replaceable>group</replaceable></command>.
zh-TW: 有的時候，把使用者加入群組 (除了自己預設的 “主要” 群組) 以取得額外的權限。例如，在 <emphasis>audio</emphasis> 群組內的使用者可以近用該群組內的音效設備 (見專欄 <xref linkend="sidebar.special-files" />)。以 <command>adduser <replaceable>user</replaceable> <replaceable>group</replaceable></command> 命令就能把使用者加入該群組。

en: <emphasis>BACK TO BASICS</emphasis> Device access permissions
zh-TW: <emphasis>基本</emphasis> 近用設備的權限

en: <primary>device</primary><secondary>access permissions</secondary>
zh-TW: <primary>設備</primary><secondary>近用權限</secondary>

en: <primary>mode</primary><secondary>character</secondary>
zh-TW: <primary>模式</primary><secondary>字元</secondary>

en: <primary>mode</primary><secondary>block</secondary>
zh-TW: <primary>模式</primary><secondary>區塊</secondary>

en: <primary>block, mode</primary>
zh-TW: <primary>區塊，模組</primary>

en: <primary>character, mode</primary>
zh-TW: <primary>字元，模組</primary>

en: <primary>special, file</primary>
zh-TW: <primary>特別，檔案</primary>

en: Each hardware peripheral device is represented under Unix with a special file, usually stored in the file tree under <filename>/dev/</filename> (DEVices). Two types of special files exist according to the nature of the device: “character mode” and “block mode” files, each mode allowing for only a limited number of operations. While character mode limits interaction with read/write operations, block mode also allows seeking within the available data. Finally, each special file is associated with two numbers (“major” and “minor”) that identify the device to the kernel in a unique manner. Such a file, created by the <command>mknod</command> command, simply contains a symbolic (and more human-friendly) name.
zh-TW: 每個週邊硬體設備在 Unix 之下，都是一個儲存在 <filename>/dev/</filename> (DEVices) 的特別檔案。根據設備的特性有兩種特別檔案：“字元模式” 與 “區塊模式” 檔案，每個模式都祗有固定數量的運算元。字元模式限制讀/寫運算，區塊模式還允許搜尋可得的資料。最後，每個特別檔案有兩個數字 (“主要” 與 “次要”) 供核心辨識該設備。這種檔案以 <command>mknod</command> 命令新增，包括符號名稱 (人類可以理解的符號)。

en: The permissions of a special file map to the permissions necessary to access the device itself. Thus, a file such as <filename>/dev/mixer</filename>, representing the audio mixer, only has read/write permissions for the root user and members of the <literal>audio</literal> group. Only these users can operate the audio mixer.
zh-TW: 特別檔案的權限對映至近用設備本身的權限。因此，<filename>/dev/mixer</filename> 這個檔案代表混音器，祗有根使用者與 <literal>audio</literal> 群組的使用者擁有讀/取權限。且祗有該等使用者才能操作混音器。

en: Shell Environment
zh-TW: Shell 環境

en: Command interpreters (or shells) can be a user's first point of contact with the computer, and they must therefore be rather friendly. Most of them use initialization scripts that allow configuration of their behavior (automatic completion, prompt text, etc.).
zh-TW: 命令解譯器 (或 shells) 是使用者接觸電腦的第一個點，必須足夠友善。大部份的人使用初始設定的腳本組態其行為 (自動完成、提示字元等)。

en: <primary>command line interface</primary>
zh-TW: <primary>命令列介面</primary>

en: <primary>command interpreter</primary>
zh-TW: <primary>命令解譯器</primary>

en: <command>bash</command>, the standard shell, uses the <filename>/etc/bash.bashrc</filename> initialization script for “interactive” shells, and <filename>/etc/profile</filename> for “login” shells.
zh-TW: <command>bash</command> 是標準的 shell，使用 <filename>/etc/bash.bashrc</filename> 初始腳本做為 “互動” shells，並以 <filename>/etc/profile</filename> 做為 “登入” shells。

en: In simple terms, a login shell is invoked when you login to the console either locally or remotely via <command>ssh</command>, or when you run an explicit <command>bash --login</command> command. Regardless of whether it is a login shell or not, a shell can be interactive (in an <command>xterm</command>-type terminal for instance); or non-interactive (when executing a script).
zh-TW: 簡單說，不論在地登入或使用 <command>ssh</command> 遠端登入，或以 <command>bash --login</command> 命令登入，都啟用登入 shell。在 登入或非登入 shell 裡，該 shell 必須是互動的 (例如在 <command>xterm</command>-type 終端機內)；或非互動式 (使用執行式腳本)。

en: <emphasis>DISCOVERY</emphasis> Other shells, other scripts
zh-TW: <emphasis>發現</emphasis> 其他 shells、其他腳本

en: <emphasis>BACK TO BASICS</emphasis> Automatic completion
zh-TW: <emphasis>基本</emphasis> 自動補完

en: <primary>automatic completion</primary>
zh-TW: <primary>自動補完</primary>

en: Many command interpreters provide a completion feature, which allows the shell to automatically complete a partially typed command name or argument when the user hits the <keycap>Tab</keycap> key. This lets users work more efficiently and be less error-prone.
zh-TW: 若干命令解譯器提供補完功能，即鍵入命令前幾個字後，使用者按 <keycap>Tab</keycap> 後，shell 自動補完命令名稱或參數。使用者的工作更有效率且更少錯誤。

en: <emphasis>BACK TO BASICS</emphasis> The tilde, a shortcut to HOME
zh-TW: <emphasis>基本</emphasis> 波浪號，回到家資料夾的捷徑

en: The tilde is often used to indicate the directory to which the environment variable, <varname>HOME</varname>, points (being the user's home directory, such as <filename>/home/rhertzog/</filename>). Command interpreters automatically make the substitution: <filename>~/hello.txt</filename> becomes <filename>/home/rhertzog/hello.txt</filename>.
zh-TW: 波浪號通常用於表示環境變數 <varname>HOME</varname> 指向 (就是使用者的家資料夾，如 <filename>/home/rhertzog/</filename>) 的資料夾。命令解譯器自動取代：<filename>~/hello.txt</filename> 就是 <filename>/home/rhertzog/hello.txt</filename>。

en: The tilde also allows access to another user's home directory. Thus, <filename>~rmas/bonjour.txt</filename> is synonymous with <filename>/home/rmas/bonjour.txt</filename>.
zh-TW: 波浪號也可近用至另個使用者的家資料夾。因此，<filename>~rmas/bonjour.txt</filename> 等於 <filename>/home/rmas/bonjour.txt</filename>。

en: <emphasis>BACK TO BASICS</emphasis> Environment variables
zh-TW: <emphasis>基本</emphasis> 環境變數

en: <primary>variable, environment</primary>
zh-TW: <primary>變數，環境</primary>

en: Environment variables allow storage of global settings for the shell or various other programs called. They are contextual (each process has its own set of environment variables) but inheritable. This last characteristic offers the possibility for a login shell to declare variables which will be passed down to all programs it executes.
zh-TW: 環境變數儲存供 shell 或其他程式使用的全域設定。它們是與環境相關的 (每個程序都有自己的環境變數) 但可繼承的。最後這個特性讓登入 shell 時可以宣告繼承所有程式的變數。

en: <emphasis>TIP</emphasis> All shells configured identically
zh-TW: <emphasis>秘訣</emphasis> 所有的 shells 擁有相同的組態

en: Printer Configuration
zh-TW: 列表機組態

en: <primary>configuration</primary><secondary>printing</secondary>
zh-TW: <primary>組態</primary><secondary>列印</secondary>

en: <primary>printing</primary><secondary>configuration</secondary>
zh-TW: <primary>列印</primary><secondary>組態</secondary>

en: <emphasis>COMMUNITY</emphasis> CUPS
zh-TW: <emphasis>社群</emphasis> CUPS

en: Configuring the Bootloader
zh-TW: 組態 Bootloader

en: <primary>loader</primary><secondary>bootloader</secondary>
zh-TW: <primary>安裝器</primary><secondary>啟動載入器</secondary>

en: <primary>bootloader</primary>
zh-TW: <primary>啟動載入器</primary>

en: It is probably already functional, but it is always good to know how to configure and install the bootloader in case it disappears from the Master Boot Record. This can occur after installation of another operating system, such as Windows. The following information can also help you to modify the bootloader configuration if needed.
zh-TW: 或許已經運作了，但最好知道如何組態與安裝載入啟動器，萬一它不在 Master Boot Record 中。安裝 Windows 等其他作業系統後，很可能出現這種情況。以下的資訊在必要時可協助修改載入啟動器組態。

en: <emphasis>BACK TO BASICS</emphasis> Master boot record
zh-TW: <emphasis>基本</emphasis> Master boot record

en: The Master Boot Record (MBR) occupies the first 512 bytes of the first hard disk, and is the first thing loaded by the BIOS to hand over control to a program capable of booting the desired operating system. In general, a bootloader gets installed in the MBR, removing its previous content.
zh-TW: 主開機記錄 (Master Boot Record, MBR) 位於第一顆磁碟的最前方 512 位元組，首先被 BIOS 載入，再啟動作業系統。一般來說，由主開機記錄安裝啟動程式，移除稍早的內容。

en: Identifying the Disks
zh-TW: 辨識磁碟

en: <emphasis>CULTURE</emphasis> <emphasis>udev</emphasis> and <filename>/dev/</filename>
zh-TW: <emphasis>文化</emphasis> <emphasis>udev</emphasis> 與 <filename>/dev/</filename>

en: The <filename>/dev/</filename> directory traditionally houses so-called “special” files, intended to represent system peripherals (see sidebar <xref linkend="sidebar.special-files" />). Once upon a time, it used to contain all special files that could potentially be used. This approach had a number of drawbacks among which the fact that it restricted the number of devices that one could use (due to the hardcoded list of names), and that it was impossible to know which special files were actually useful.
zh-TW: <filename>/dev/</filename> 資料夾習慣儲存被稱為 “特殊的” 檔案，用於代表系統的週邊裝置 (見專欄 <xref linkend="sidebar.special-files" />)。曾經納入所有可能用到的特殊檔案。這種處理方式有若干缺點，限制設備數量是其中之一，每種設備祗能有一個 (因為清單名稱被限制)，且不可能知道實際上該用那個特殊檔案。

en: With dynamically assigned names, you can thus keep the same name for a given device, regardless of the connector used or the connection order, which is especially useful when you use various USB peripherals. The first partition on the first hard drive can then be called <filename>/dev/sda1</filename> for backwards compatibility, or <filename>/dev/root-partition</filename> if you prefer, or even both at the same time since <command>udevd</command> can be configured to automatically create a symbolic link.
zh-TW: 動態給予名稱，就能夠讓同名稱永遠指向特定設備，不必在意連結的設備或順序，尤其在使用 USB 週邊時更為便利。第一個磁碟的第一個區塊稱為 <filename>/dev/sda1</filename> 可供向後相容，喜歡的話也可稱為 <filename>/dev/root-partition</filename>，或兩者共用，因為 <command>udevd</command> 可以組態成自動新增符號連結。

en: <primary>hard drive, names</primary>
zh-TW: <primary>硬碟，名稱</primary>

en: <primary>names</primary><secondary>of hard drives</secondary>
zh-TW: <primary>名稱</primary><secondary>硬式磁碟機</secondary>

en: Configuration of the bootloader must identify the different hard drives and their partitions. Linux uses “block” special files stored in the <filename>/dev/</filename> directory, for this purpose. Since Debian <emphasis role="distribution">Squeeze</emphasis>, the naming scheme for hard drives has been unified by the Linux kernel, and all hard drives (IDE/PATA, SATA, SCSI, USB, IEEE 1394) are now represented by <filename>/dev/sd*</filename>.
zh-TW: 組態啟動程式必須辨認硬碟及其分區。Linux 使用 “block” 特殊檔案儲存在 <filename>/dev/</filename> 資料夾內。因為 Debian <emphasis role="distribution">Squeeze</emphasis> 版本使用源自 Linux 核心的硬碟命名架構，所有的硬碟 (IDE/PATA、SATA、SCSI、USB、IEEE 1394) 都以 <filename>/dev/sd*</filename> 表示。

en: Each partition is represented by its number on the disk on which it resides: for instance, <filename>/dev/sda1</filename> is the first partition on the first disk, and <filename>/dev/sdb3</filename> is the third partition on the second disk.
zh-TW: 每個分區由其磁碟代號表示：如，<filename>/dev/sda1</filename> 是第一個磁碟的第一個分區，而 <filename>/dev/sdb3</filename> 是第二個磁碟的第三個分區。

en: <primary>partition</primary><secondary>primary</secondary>
zh-TW: <primary>分區</primary><secondary>主要</secondary>

en: <primary>partition</primary><secondary>extended</secondary>
zh-TW: <primary>分區</primary><secondary>延伸</secondary>

en: <primary>partition</primary><secondary>secondary</secondary>
zh-TW: <primary>分區</primary><secondary>次要</secondary>

en: <primary>partition table</primary><secondary>MS-DOS format</secondary>
zh-TW: <primary>分區表</primary><secondary>MS-DOS 格式</secondary>

en: The PC architecture (or “i386”, including its younger cousin “amd64”) has long been limited to using the “MS-DOS” partition table format, which only allows four “primary” partitions per disk. To go beyond this limitation under this scheme, one of them has to be created as an “extended” partition, and it can then contain additional “secondary” partitions. These secondary partitions are numbered from 5. Thus the first secondary partition could be <filename>/dev/sda5</filename>, followed by <filename>/dev/sda6</filename>, etc.
zh-TW: PC 架構 (或 “i386”，包括新出現的 “amd64”) 不再受限於使用 “MS-DOS” 分區表格式，每個磁碟可以擁有超過 4 個 “主要” 分區。在此架構下要超過此限制，必須新增 “延伸” 分區，然後就能使用新增的 “次要” 分區。這些次要分區由 5 開始編號。所以，第一個磁碟的次要分區可以是 <filename>/dev/sda5</filename>，然後是 <filename>/dev/sda6</filename>，餘此類推。

en: Another restriction of the MS-DOS partition table format is that it only allows disks up to 2 TiB in size, which is becoming a real problem with recent disks.
zh-TW: MS-DOS 分區表格式的另個限制是磁碟的容量不能超過 2 TiB，成為當代磁碟的真正問題。

en: <primary>GPT</primary><secondary>partition table format</secondary>
zh-TW: <primary>GPT</primary><secondary>分區表格式</secondary>

en: <primary>partition table</primary><secondary>GPT format</secondary>
zh-TW: <primary>分區表</primary><secondary>GPT 格式</secondary>

en: The example configuration files given in the following sections are based on the same setup: a single SATA disk, where the first partition is an old Windows installation and the second contains Debian GNU/Linux.
zh-TW: 下節的組態檔根據同樣的設定而來：一個 SATA 磁碟，第一個區分是安裝舊型的視窗、第二個分區安裝 Debian GNU/Linux。

en: <emphasis>LILO</emphasis> (LInux LOader) is the oldest bootloader — solid but rustic. It writes the physical address of the kernel to boot on the MBR, which is why each update to LILO (or its configuration file) must be followed by the command <command>lilo</command>. Forgetting to do so will render a system unable to boot if the old kernel was removed or replaced as the new one will not be in the same location on the disk.
zh-TW: <emphasis>LILO</emphasis> (Linux 啟動程式, LInux LOader) 是最舊的啟動程式 — 穩定但粗糙。把核心的實體位址寫入 MBR 的啟動，所以每次更新至 LILO (或其組態檔案) 都必須再執行命令 <command>lilo</command>。忘記的話，移除或更新核心後，新的核心就不會在磁碟的原來位置，以致系統無法啟動。

en: LILO's configuration file is <filename>/etc/lilo.conf</filename>; a simple file for standard configuration is illustrated in the example below.
zh-TW: LILO 的組態檔是 <filename>/etc/lilo.conf</filename>；一個簡單的檔案供標準組態之用，如下例。

en: LILO configuration file
zh-TW: LILO 組態檔案

en: GRUB 2 Configuration
zh-TW: GRUB 2 組態

en: <emphasis>NOTE</emphasis> Disk names for GRUB
zh-TW: <emphasis>說明</emphasis> GRUB 的磁碟名稱

en: Partitions also have a specific name in GRUB. When you use “classical” partitions in MS-DOS format, the first partition on the first disk is labeled, <literal>(hd0,msdos1)</literal>, the second <literal>(hd0,msdos2)</literal>, etc.
zh-TW: 區分表在 GRUB 內也有特定的名稱。通常使用 MS-DOS 格式的 “經典” 區分，第一個磁碟的第一個分區標記為 <literal>(hd0,msdos1)</literal>、第二個分區標記為 <literal>(hd0,msdos2)</literal>，餘此類推。

en: Other Configurations: Time Synchronization, Logs, Sharing Access…
zh-TW: 其他組態：時間同步、記錄、共享近用…

en: The many elements listed in this section are good to know for anyone who wants to master all aspects of configuration of the GNU/Linux system. They are, however, treated briefly and frequently refer to the documentation.
zh-TW: 本節列出的細目對希望精通 GNU/Linux 系統組態極有幫助。這裡祗列出簡要的內容，詳情仍需參閱文件。

en: Timezone
zh-TW: 時區

en: <primary>timezone</primary>
zh-TW: <primary>時區</primary>

en: <emphasis>BACK TO BASICS</emphasis> Symbolic links
zh-TW: <emphasis>基本</emphasis> 符號連結

en: <primary>link</primary><secondary>symbolic</secondary>
zh-TW: <primary>連結</primary><secondary>符號</secondary>

en: <primary>symbolic link</primary>
zh-TW: <primary>符號連結</primary>

en: A symbolic link is a pointer to another file. When you access it, the file to which it points is opened. Removal of the link will not cause deletion of the file to which it points. Likewise, it does not have its own set of permissions, but rather retains the permissions of its target. Finally, it can point to any type of file: directories, special files (sockets, named pipes, device files, etc.), even other symbolic links.
zh-TW: 符號連結是一種指向另個檔案的指標。近用時，被指向的檔案就被打開。移除連結不會刪除指向的檔案。同樣的，沒有自的授權，而是使用目標本身的授權。最後，可以用於任何類型的檔案：資料夾、特殊檔案 (網路插座、具名管道、設備檔案等)、甚至另個符號連結。

en: The <command>ln -s <replaceable>target</replaceable> <replaceable>link-name</replaceable></command> command creates a symbolic link, named <replaceable>link-name</replaceable>, pointing to <replaceable>target</replaceable>.
zh-TW: <command>ln -s <replaceable>target</replaceable> <replaceable>link-name</replaceable></command> 命令新增一個符號連結，命名為 <replaceable>link-name</replaceable>，指向 <replaceable>target</replaceable>。

en: If the target does not exist, then the link is “broken” and accessing it will result in an error indicating that the target file does not exist. If the link points to another link, you will have a “chain” of links that turns into a “cycle” if one of the targets points to one of its predecessors. In this case, accessing one of the links in the cycle will result in a specific error (“too many levels of symbolic links”); this means the kernel gave up after several rounds of the cycle.
zh-TW: 若目標不存在，則連結算是 “破損” 且其近用送回錯誤訊息指示目標檔案不存在。若連結指向另個連結，該連結又指向其前任連結，則該等連結的 “鏈” 形成 “循環”。在這種情況下，近用循環內的任一連結也會得到特定的錯誤 (“過多層的符號連結”)；經過若干循環後核心放棄它。

en: When you need to temporarily change the timezone, use the <varname>TZ</varname> environment variable, which takes priority over the configured system default:
zh-TW: 暫時變更時區，可使用 <varname>TZ</varname> 環境變數，它的優先次序在預設的組態檔之前：

en: <emphasis>NOTE</emphasis> System clock, hardware clock
zh-TW: <emphasis>說明</emphasis> 系統時鐘，硬體時鐘

en: There are two time sources in a computer. A computer's motherboard has a hardware clock, called the “CMOS clock”. This clock is not very precise, and provides rather slow access times. The operating system kernel has its own, the software clock, which it keeps up to date with its own means (possibly with the help of time servers, see <xref linkend="sect.time-synchronization" />). This system clock is generally more accurate, especially since it doesn't need access to hardware variables. However, since it only exists in live memory, it is zeroed out every time the machine is booted, contrary to the CMOS clock, which has a battery and therefore “survives” rebooting or halting of the machine. The system clock is, thus, set from the CMOS clock during boot, and the CMOS clock is updated on shutdown (to take into account possible changes or corrections if it has been improperly adjusted).
zh-TW: 電腦內有兩個時間來源。主機板有個硬體時鐘，稱為 “CMOS 時鐘”。這個時鐘不準，近用的速度慢。作業系統核心有自己的系統時鐘，以自己的方式 (可能由時間伺服器協助，見 <xref linkend="sect.time-synchronization" />) 保持時間的正確。此系統時鐘較為準確，尤其是不需經由硬體變數就能近用。然而，系統時鐘祗存在於記憶體，開機就歸零，不像 CMOS 時間鐘，有電池支援，不受重新開機或暫停下仍能 “存活”。因此，開機時，由 CMOS 時鐘設定系統時鐘，關機時更新 CMOS 時鐘 (若被不當調整就能修正它)。

en: In practice, there is a problem, since the CMOS clock is nothing more than a counter and contains no information regarding the time zone. There is a choice to make regarding its interpretation: either the system considers it runs in universal time (UTC, formerly GMT), or in local time. This choice could be a simple shift, but things are actually more complicated: as a result of daylight saving time, this offset is not constant. The result is that the system has no way to determine whether the offset is correct, especially around periods of time change. Since it is always possible to reconstruct local time from universal time and the timezone information, we strongly recommend using the CMOS clock in universal time.
zh-TW: 實務上有個問題，因為 CMOS 時鐘祗是個計數器，未含時區資訊。有幾個方式選擇其解釋方式：系統以世界標準時間 (UTC，舊稱 GMT)，或當地時間看待。雖然可以簡單切換，但卻頗為複雜：它的偏移值不是常數。系統無法判斷偏移值的正確性，尤其在時區交接。總是在世界標準時間與時區資訊之間重組在地時間，建議使用 CMOS 時間為世界標準時間。

en: Time Synchronization
zh-TW: 時間同步

en: <primary>time synchronization</primary>
zh-TW: <primary>時間同步</primary>

en: <primary>clock</primary><secondary>synchronization</secondary>
zh-TW: <primary>時間</primary><secondary>同步</secondary>

en: Time synchronization, which may seem superfluous on a computer, is very important on a network. Since users do not have permissions allowing them to modify the date and time, it is important for this information to be precise to prevent confusion. Furthermore, having all of the computers on a network synchronized allows better cross-referencing of information from logs on different machines. Thus, in the event of an attack, it is easier to reconstruct the chronological sequence of actions on the various machines involved in the compromise. Data collected on several machines for statistical purposes won't make a great deal of sense if they are not synchronized.
zh-TW: 時間同步，在單機時代是多餘，但在網路時代卻很重要。使用者無權修改日期與時間，所以需要精準的時間以免混亂。尤有甚者，網路上的電腦時間同步後，有助於安排社群工作者透過網路全球串聯。受到攻擊時，容易依序恢復原來的運作。由多部機器收集來的統計資料，必須有同步的時間，才能發揮作用。

en: <emphasis>BACK TO BASICS</emphasis> NTP
zh-TW: <emphasis>基本</emphasis> NTP

en: <primary>NTP</primary><secondary>server</secondary>
zh-TW: <primary>NTP</primary><secondary>伺服器</secondary>

en: NTP (Network Time Protocol) allows a machine to synchronize with others fairly accurately, taking into consideration the delays induced by the transfer of information over the network and other possible offsets.
zh-TW: 網路時間協定 (Network Time Protocol, NTP) 可以讓機器間相當精準的同步，甚至把網路延遲及其他偏移值列入考量。

en: While there are numerous NTP servers on the Internet, the more popular ones may be overloaded. This is why we recommend using the <emphasis>pool.ntp.org</emphasis> NTP server, which is, in reality, a group of machines that have agreed to serve as public NTP servers. You could even limit use to a sub-group specific to a country, with, for example, <emphasis>us.pool.ntp.org</emphasis> for the United States, or <emphasis>ca.pool.ntp.org</emphasis> for Canada, etc.
zh-TW: 網際網路上很多 NTP 伺服器可用，受歡迎的其工作量可能負荷過重。所以建議使用 <emphasis>pool.ntp.org</emphasis> NTP 伺服器，它是一組公開的 NTP 伺服器。也可使用針對特定地區的次群組伺服器，如 <emphasis>us.pool.ntp.org</emphasis> 係供美國使用、<emphasis>ca.pool.ntp.org</emphasis> 供加拿大使用。

en: However, if you manage a large network, it is recommended that you install your own NTP server, which will synchronize with the public servers. In this case, all the other machines on your network can use your internal NTP server instead of increasing the load on the public servers. You will also increase homogeneity with your clocks, since all the machines will be synchronized on the same source, and this source is very close in terms of network transfer times.
zh-TW: 然而，管理大型網路時，還是應安裝與公共伺服器同步的自己 NTP 伺服器。同個網路上自己的機器，就能使用內部的 NTP 伺服器不必增加外部公共伺服器的負擔。以自己的時鐘增加網路內機器的同質化，同步擷取與共用資源，使用共同的網路交換時間。

en: For Workstations
zh-TW: 給工作站

en: Since work stations are regularly rebooted (even if only to save energy), synchronizing them by NTP at boot is enough. To do so, simply install the <emphasis role="pkg">ntpdate</emphasis> package. You can change the NTP server used if needed by modifying the <filename>/etc/default/ntpdate</filename> file.
zh-TW: 工作經常需要重新開機 (雖然祗是節省能源)，開機時以 NTP 同步就夠了。安裝 <emphasis role="pkg">ntpdate</emphasis> 套件就可以。需要更換 NTP 伺服器時，再修改 <filename>/etc/default/ntpdate</filename> 檔案即可。

en: For Servers
zh-TW: 供伺服器

en: Servers are only rarely rebooted, and it is very important for their system time to be correct. To permanently maintain correct time, you would install a local NTP server, a service offered in the <emphasis role="pkg">ntp</emphasis> package. In its default configuration, the server will synchronize with <emphasis>pool.ntp.org</emphasis> and provide time in response to requests coming from the local network. You can configure it by editing the <filename>/etc/ntp.conf</filename> file, the most significant alteration being the NTP server to which it refers. If the network has a lot of servers, it may be interesting to have one local time server which synchronizes with the public servers and is used as a time source by the other servers of the network.
zh-TW: 伺服器很少重開機，系統時間必須絕對精準。為了永久維持時間的正確性，必須安裝由 <emphasis role="pkg">ntp</emphasis> 套件提供的 NPT 伺服器。預設的組態方式係與 <emphasis>pool.ntp.org</emphasis> 同步，且回應在地網路的請求。可以編輯 <filename>/etc/ntp.conf</filename> 檔案改變原來的組態，NTP 伺服器依照該檔案的內容而變更。若有多個伺服器，最好有一個在地時間伺服器與公共的伺服器同步，並做為在地網路其他伺服器的同步的依據。

en: <primary>server</primary><secondary>NTP</secondary>
zh-TW: <primary>伺服器</primary><secondary>NTP</secondary>

en: <emphasis>GOING FURTHER</emphasis> GPS modules and other time sources
zh-TW: <emphasis>進一步</emphasis> GPS 模組與其他時間來源

en: If time synchronization is particularly crucial to your network, it is possible to equip a server with a GPS module (which will use the time from GPS satellites) or a DCF-77 module (which will sync time with the atomic clock near Frankfurt, Germany). In this case, the configuration of the NTP server is a little more complicated, and prior consultation of the documentation is an absolute necessity.
zh-TW: 如果網路對時間同步極為敏感，最好在伺服器安裝 GPS 模組 (which will use the time from GPS satellites) 或 DCF-77 模組 (which will sync time with the atomic clock near Frankfurt, Germany)。在這種情況下，NTP 伺服器的組態就有點複雜，必須參照文件辦理。

en: Rotating Log Files
zh-TW: 輪轉日誌檔

en: <primary>file</primary><secondary>logs, rotation</secondary>
zh-TW: <primary>檔案</primary><secondary>日誌，輪轉</secondary>

en: Log files can grow, fast, and it is necessary to archive them. The most common scheme is a rotating archive: the log file is regularly archived, and only the latest <replaceable>X</replaceable> archives are retained. <command>logrotate</command>, the program responsible for these rotations, follows directives given in the <filename>/etc/logrotate.conf</filename> file and all of the files in the <filename>/etc/logrotate.d/</filename> directory. The administrator may modify these files, if they wish to adapt the log rotation policy defined by Debian. The <citerefentry><refentrytitle>logrotate</refentrytitle> <manvolnum>1</manvolnum></citerefentry> man page describes all of the options available in these configuration files. You may want to increase the number of files retained in log rotation, or move the log files to a specific directory dedicated to archiving them rather than delete them. You could also send them by e-mail to archive them elsewhere.
zh-TW: 日誌檔成長的速度很快，需要典藏它。最常的做法是循環典藏：祗保留最新的 <replaceable>X</replaceable> 部份。<command>logrotate</command> 是負責循環的程式，根據 <filename>/etc/logrotate.conf</filename> 檔案內的組態，把日誌檔儲存在 <filename>/etc/logrotate.d/</filename> 資料夾內。管理者可以修改該等檔案，修改 Debian 預設的循環政策。<citerefentry><refentrytitle>logrotate</refentrytitle> <manvolnum>1</manvolnum></citerefentry> 手冊頁面描述該組態可用的選項。可以在循環的過程中，增加典藏的檔案數，或把檔案移至指定的資料夾而不是刪除它們。也可以電子郵件方式寄到別的地方。

en: The <command>logrotate</command> program is executed daily by the <command>cron</command> scheduling program (described in <xref linkend="sect.task-scheduling-cron-atd" />).
zh-TW: <command>logrotate</command> 程式每日執行 <command>cron</command> 排程的要求 (詳情見 <xref linkend="sect.task-scheduling-cron-atd" />)。

en: Sharing Administrator Rights
zh-TW: 共享管理員權限

en: <primary>account</primary><secondary>administrator account</secondary>
zh-TW: <primary>帳號</primary><secondary>管理員帳號</secondary>

en: <primary>root</primary>
zh-TW: <primary>根</primary>

en: Frequently, several administrators work on the same network. Sharing the root passwords is not very elegant, and opens the door for abuse due to the anonymity such sharing creates. The solution to this problem is the <command>sudo</command> program, which allows certain users to execute certain commands with special rights. In the most common use case, <command>sudo</command> allows a trusted user to execute any command as root. To do so, the user simply executes <command>sudo <replaceable>command</replaceable></command> and authenticates using their personal password.
zh-TW: 數個管理者共同在同個伺服器工作。共用同個根使用者密碼不是好主意，匿名引發的誤用很麻煩。解決方案是使用 <command>sudo</command> 程式，允許使用者對特定命令擁有專門的權力。在多數情況下，<command>sudo</command> 允許受信任的使用者以根的權限執行命令。使用者祗需執行 <command>sudo <replaceable>command</replaceable></command> 並以個人的密碼通過認證。

en: List of Mount Points
zh-TW: 掛載點清單

en: <primary>point, mount</primary>
zh-TW: <primary>點，掛載</primary>

en: <primary>mount point</primary>
zh-TW: <primary>掛載點</primary>

en: <emphasis>BACK TO BASICS</emphasis> Mounting and unmounting
zh-TW: <emphasis>基本</emphasis> 掛載與卸載

en: mount point: this is the location on the local filesystem where the device, remote system, or partition will be mounted.
zh-TW: 掛載點：這是把設備、遠端系統，或分區掛載於在地檔案系統的位置。

en: type: this field defines the filesystem used on the mounted device. <literal>ext4</literal>, <literal>ext3</literal>, <literal>vfat</literal>, <literal>ntfs</literal>, <literal>btrfs</literal>, <literal>xfs</literal> are a few examples.
zh-TW: 類型：這個欄位定義掛載設備使用的檔案系統。<literal>ext4</literal>、<literal>ext3</literal>、<literal>vfat</literal>、<literal>ntfs</literal>、<literal>btrfs</literal>、<literal>xfs</literal> 等。

en: <emphasis>BACK TO BASICS</emphasis> NFS, a network filesystem
zh-TW: <emphasis>基本</emphasis> NFS，網路檔案系統

en: NFS is a network filesystem; under Linux, it allows transparent access to remote files by including them in the local filesystem.
zh-TW: NFS 是一種 Linux  環境下的網路檔案系統，把遠端的檔案以透明方式納入在地的檔案系統內。

en: options: there are many of them, depending on the filesystem, and they are documented in the <command>mount</command> man page. The most common are
zh-TW: 選項：依檔案系統的不同，而有多種選項，詳情見 <command>mount</command> 手冊頁面。最常用的是

en: <literal>rw</literal> or <literal>ro</literal>, meaning, respectively, that the device will be mounted with read/write or read-only permissions.
zh-TW: <literal>rw</literal> 或 <literal>ro</literal>，表示該設備掛載後可以讀/寫，或祗有讀取的權限。

en: <literal>noauto</literal> deactivates automatic mounting on boot.
zh-TW: <literal>noauto</literal> 開機時關閉自動掛載。

en: <literal>nofail</literal> allows the boot to proceed even when the device is not present. Make sure to put this option for external drives that might be unplugged when you boot, because <command>systemd</command> really ensures that all mount points that must be automatically mounted are actually mounted before letting the boot process continue to its end. Note that you can combine this with <literal>x-systemd.device-timeout=5s</literal> to tell <command>systemd</command> to not wait more than 5 seconds for the device to appear (see <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
zh-TW: <literal>nofail</literal> 允許在啟動時處理設備，即使該設備不存在。確認啟動時，該外接磁碟機可能未插入，因為 <command>systemd</command> 將確認所有掛載點在啟動完成前必須自動掛載。可將此與 <literal>x-systemd.device-timeout=5s</literal> 併用，告訴 <command>systemd</command> 不必等 5 秒以上的時間，直接進入下個作業階段 (見 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>)。

en: <literal>user</literal> authorizes all users to mount this filesystem (an operation which would otherwise be restricted to the root user).
zh-TW: <literal>user</literal> 授權所有的使用者均可掛載此檔案系統 (若無此選項，則祗有根使用者才有此權限)。

en: <literal>defaults</literal> means the group of default options: <literal>rw</literal>, <literal>suid</literal>, <literal>dev</literal>, <literal>exec</literal>, <literal>auto</literal>, <literal>nouser</literal> and <literal>async</literal>, each of which can be individually disabled after <literal>defaults</literal> by adding <literal>nosuid</literal>, <literal>nodev</literal> and so on to block <literal>suid</literal>, <literal>dev</literal> and so on. Adding the <literal>user</literal> option reactivates it, since <literal>defaults</literal> includes <literal>nouser</literal>.
zh-TW: <literal>defaults</literal> 表示預設的選項群組為：<literal>rw</literal>、<literal>suid</literal>、<literal>dev</literal>、<literal>exec</literal>、<literal>auto</literal>、<literal>nouser</literal> 與 <literal>async</literal>，使用了 <literal>defaults</literal> 之後，還可以用 <literal>nosuid</literal> 命令、<literal>nodev</literal> 及其他類似的命令，中止 <literal>suid</literal>、<literal>dev</literal> 等作用。加入 <literal>user</literal> 選項可再啟用它，因為 <literal>defaults</literal> 包括 <literal>nouser</literal>。

en: Example <filename>/etc/fstab</filename> file
zh-TW: 範例 <filename>/etc/fstab</filename> 檔案

en: <emphasis>GOING FURTHER</emphasis> Auto-mounting
zh-TW: <emphasis>下一步</emphasis> 自動掛載

en: <command>locate</command> and <command>updatedb</command>
zh-TW: <command>locate</command> 與 <command>updatedb</command>

en: Compiling a Kernel
zh-TW: 編譯核心

en: <primary>compilation</primary><secondary>of a kernel</secondary>
zh-TW: <primary>編譯</primary><secondary>核心</secondary>

en: <primary>kernel</primary><secondary>compilation</secondary>
zh-TW: <primary>核心</primary><secondary>編譯</secondary>

en: The kernels provided by Debian include the largest possible number of features, as well as the maximum of drivers, in order to cover the broadest spectrum of existing hardware configurations. This is why some users prefer to recompile the kernel in order to only include what they specifically need. There are two reasons for this choice. First, it may be to optimize memory consumption, since the kernel code, even if it is never used, occupies memory for nothing (and never “goes down” on the swap space, since it is actual RAM that it uses), which can decrease overall system performance. A locally compiled kernel can also limit the risk of security problems since only a fraction of the kernel code is compiled and run.
zh-TW: Debian 的核心儘量納入所有的功能，以及最多的驅動程式，以便涵蓋現在的硬體組態。所以，有些使用者寧願自行編譯祗包括所需的核心。這麼做有兩個理由。第一，記憶體用量較小，核心程式碼，即使未用到，也佔有記憶體的空間 (而且永遠不 “離開” 置換記憶體，因為它用到實際的 RAM)，降低系統的整體效能。在地自行編譯的核心也限制了安全問題的範圍，因為祗編譯與執行部份核心碼。

en: <emphasis>NOTE</emphasis> Security updates
zh-TW: <emphasis>說明</emphasis> 安全更新

en: If you choose to compile your own kernel, you must accept the consequences: Debian cannot ensure security updates for your custom kernel. By keeping the kernel provided by Debian, you benefit from updates prepared by the Debian Project's security team.
zh-TW: 決定編譯自己的核心後，必須接受一個事實：Debian 不能確認客製化核心的安全更新。使用 Debian 的核心，可以使用 Debian 計畫提供的更新。

en: Recompilation of the kernel is also necessary if you want to use certain features that are only available as patches (and not included in the standard kernel version).
zh-TW: 使用祗在補丁內的功能 (不在標準的核心內) 時，就必須重新編譯核心。

en: <emphasis>GOING FURTHER</emphasis> The Debian Kernel Handbook
zh-TW: <emphasis>進一步</emphasis> The Debian Kernel Handbook

en: Introduction and Prerequisites
zh-TW: 簡介和先決條件

en: Unsurprisingly Debian manages the kernel in the form of a package, which is not how kernels have traditionally been compiled and installed. Since the kernel remains under the control of the packaging system, it can then be removed cleanly, or deployed on several machines. Furthermore, the scripts associated with these packages automate the interaction with the bootloader and the initrd generator.
zh-TW: Debian 以套件方式管理核心，與傳統的編譯安裝不同調。核心還是在套件系統的控制下，可以被完整移除，或布建在多個機器上。與該等套件有關的腳本自動與啟動程式和 initrd 產生器互動。

en: <emphasis>CULTURE</emphasis> The good old days of <emphasis role="pkg">kernel-package</emphasis>
zh-TW: <emphasis>文化</emphasis> <emphasis role="pkg">kernel-package</emphasis> 的美好歲月

en: Before the Linux build system gained the ability to build proper Debian packages, the recommended way to build such packages was to use <command>make-kpkg</command> from the <emphasis role="pkg">kernel-package</emphasis> package.
zh-TW: 以 Linux 布建系統能夠建立適當的 Debian 套件前，使用 <command>make-kpkg</command>，來自 <emphasis role="pkg">kernel-package</emphasis> 套件。

en: Getting the Sources
zh-TW: 取得原始碼

en: <primary>Linux kernel sources</primary>
zh-TW: <primary>Linux 核心原始碼</primary>

en: <primary>kernel</primary><secondary>sources</secondary>
zh-TW: <primary>核心</primary><secondary>原始碼</secondary>

en: <primary>source</primary><secondary>of the Linux kernel</secondary>
zh-TW: <primary>原始碼</primary><secondary> Linux 核心</secondary>

en: <emphasis>CULTURE</emphasis> Location of kernel sources
zh-TW: <emphasis>文化</emphasis> 核心原始碼的位置

en: Configuring the Kernel
zh-TW: 組態核心

en: <primary>kernel</primary><secondary>configuration</secondary>
zh-TW: <primary>核心</primary><secondary>組態</secondary>

en: <primary>configuration</primary><secondary>of the kernel</secondary>
zh-TW: <primary>組態</primary><secondary>核心</secondary>

en: The next step consists of configuring the kernel according to your needs. The exact procedure depends on the goals.
zh-TW: 下個步驟是根據需要組態核心。確切的程序視需要而訂。

en: Unless you need to change the configuration, you can stop here and skip to <xref linkend="sect.kernel-build" />. If you need to change it, on the other hand, or if you decide to reconfigure everything from scratch, you must take the time to configure your kernel. There are various dedicated interfaces in the kernel source directory that can be used by calling the <command>make <replaceable>target</replaceable></command> command, where <replaceable>target</replaceable> is one of the values described below.
zh-TW: 需要改變組態的話，就跳至 <xref linkend="sect.kernel-build" />。或者從基本開始重新組態，就需花時間組態核心。在核心原始碼的資料夾內有很多專屬介面，供呼叫 <command>make <replaceable>target</replaceable></command> 命令，讓 <replaceable>target</replaceable> 是下列的其中一個值。

en: When using one of those configuration interfaces, it is always a good idea to start from a reasonable default configuration. The kernel provides such configurations in <filename>arch/<replaceable>arch</replaceable>/configs/*_defconfig</filename> and you can put your selected configuration in place with a command like <command>make x86_64_defconfig</command> (in the case of a 64-bit PC) or <command>make i386_defconfig</command> (in the case of a 32-bit PC).
zh-TW: 使用這些組態介面時，建議從合理的預設組態開始。提供該等組態的核心在 <filename>arch/<replaceable>arch</replaceable>/configs/*_defconfig</filename>，然後可將選定的組態置於像 <command>make x86_64_defconfig</command> (64 位元電腦) 或 <command>make i386_defconfig</command> (32 位元電腦) 這樣的命令。

en: <emphasis>TIP</emphasis> Dealing with outdated <filename>.config</filename> files
zh-TW: <emphasis>秘訣</emphasis> 處理過時的 <filename>.config</filename> 檔案

en: When you provide a <filename>.config</filename> file that has been generated with another (usually older) kernel version, you will have to update it. You can do so with <command>make oldconfig</command>, it will interactively ask you the questions corresponding to the new configuration options. If you want to use the default answer to all those questions you can use <command>make olddefconfig</command>. With <command>make oldnoconfig</command>, it will assume a negative answer to all questions.
zh-TW: 使用其他 (通常是較舊的) 核心版本的 <filename>.config</filename> 檔案時，需要先更新它。可以使用 <command>make oldconfig</command> 命令，以互動方式詢問對新組態的選擇。可以用 <command>make olddefconfig</command> 命令使用問題預設的答案。以 <command>make oldnoconfig</command> 命令，可以對問題提供預設的負面答案。

en: Compiling and Building the Package
zh-TW: 編譯與建立套件

en: <emphasis>NOTE</emphasis> Clean up before rebuilding
zh-TW: <emphasis>說明</emphasis> 建立前先清除

en: Compiling External Modules
zh-TW: 編譯外部模組

en: <primary>kernel</primary><secondary>external modules</secondary>
zh-TW: <primary>核心</primary><secondary>外部模組</secondary>

en: <primary>modules</primary><secondary>external kernel modules</secondary>
zh-TW: <primary>模組</primary><secondary>外部核心模組</secondary>

en: <emphasis>ALTERNATIVE</emphasis> module-assistant
zh-TW: <emphasis>其他</emphasis> module-assistant

en: Applying a Kernel Patch
zh-TW: 使用核心補丁

en: <primary>kernel</primary><secondary>patch</secondary>
zh-TW: <primary>核心</primary><secondary>補丁</secondary>

en: <primary>patch of the kernel</primary>
zh-TW: <primary>核心的補丁</primary>

en: Some features are not included in the standard kernel due to a lack of maturity or to some disagreement with the kernel maintainers. Such features may be distributed as patches that anyone is then free to apply to the kernel sources.
zh-TW: 因為不夠成熟或核心維護者意見不一致，很多功能未列入標準的核心。這種功能就以補丁的型式發行，任何人都可以自由地把它維入核心原始碼。

en: Note that a given patch may not necessarily work with every version of the kernel; it is possible for <command>patch</command> to fail when applying them to kernel sources. An error message will be displayed and give some details about the failure; in this case, refer to the documentation available in the Debian package of the patch (in the <filename>/usr/share/doc/linux-patch-*/</filename> directory). In most cases, the maintainer indicates for which kernel versions their patch is intended.
zh-TW: 有些補丁不見得適用於每個核心版本；以 <command>patch</command> 可能無法應用於核心原始碼。將出現錯誤訊息且提示錯誤的原因；在此情況下，參照 Debian 補丁套件的文件 (位於 <filename>/usr/share/doc/linux-patch-*/</filename> 資料夾)。大部份的情況下，維護者會指出其補丁適用的核心版本。

en: Installing a Kernel
zh-TW: 安裝核心

en: <primary>installation</primary><secondary>of a kernel</secondary>
zh-TW: <primary>安裝</primary><secondary>核心</secondary>

en: <primary>kernel</primary><secondary>installation</secondary>
zh-TW: <primary>核心</primary><secondary>安裝</secondary>

en: Features of a Debian Kernel Package
zh-TW: Debian 核心套件的特色

en: Most of those tasks are offloaded to hook scripts in the <filename>/etc/kernel/*.d/</filename> directories. For instance, the integration with <command>grub</command> relies on <filename>/etc/kernel/postinst.d/zz-update-grub</filename> and <filename>/etc/kernel/postrm.d/zz-update-grub</filename> to call <command>update-grub</command> when kernels are installed or removed.
zh-TW: 大部份的這些工作卸載至 <filename>/etc/kernel/*.d/</filename> 資料夾內的腳本。例如，當已安裝或移除核心時，整合 <command>grub</command> 於 <filename>/etc/kernel/postinst.d/zz-update-grub</filename> 和 <filename>/etc/kernel/postrm.d/zz-update-grub</filename> 呼叫 <command>update-grub</command>。

en: Installing with <command>dpkg</command>
zh-TW: 與 <command>dpkg</command> 整合

en: The configuration steps described in this chapter are basic and can lead both to a server system or a workstation, and it can be massively duplicated in semi-automated ways. However, it is not enough by itself to provide a fully configured system. A few pieces are still in need of configuration, starting with low-level programs known as the “Unix services”.
zh-TW: 本章描述供伺服器系統或工作站的基本組態，可以用半自動的方式大量複製。然而，本身還不足以提供完整的組態系統。還有若干部份需要進一步的組態，從 “Unix 服務” 之類的低階程式開始。
