General recommendations (正體中文)

From ArchWiki

本條目或段落需要進行翻譯

註記: 本頁尚未翻譯完成! (討論)
翻譯狀態:本文章是 General recommendations 的翻譯版本。最近一次的翻譯時間:2025-1-1。點擊本連結查看英文頁面之後的變更。

本文為熱門文章以及重要資訊的詳細索引,旨在增進 Arch 系統的功能。讀者先閱讀安裝指南,安裝基本的 Arch Linux 系統,並理解#系統管理#套裝軟體管理所說明的觀念,再閱讀此頁面的其他段落和維基中的其他文章。

系統管理

本段落說明如何進行系統管理。更詳細的資訊請參閱核心工具系統管理

使用者與群組

新安裝的系統只有超級使用者帳號,也就是 "root"。使用 root 長時間登入是很危險的,更不用說在伺服器上開放 SSH 登入權限。您應該建立無權限帳號,用它執行大部分的工作,只在管理系統時使用 root 帳號。更詳細的資訊請參閱使用者與群組#管理使用者

使用者與群組是控制存取權的一項機制。管理員可以微調群組成員和所有權,賦予或拒絕使用者或服務對系統資源的存取權。請參閱使用者與群組,了解其細節以及潛在系統風險。

系統安全

關於強化系統安全的建議及最佳習慣,請參閱系統安全

需要以其他使用者身份 (例如 root) 執行命令或啟動互動式 Shell,可參考應用程式清單/系統安全#提升權限

服務管理

Arch Linux 使用 systemd,作為管理 Linux 系統和服務的 init 程式。為了能妥善管理 Arch Linux,使用者應當學習相關基本知識。

使用者可透過 systemctl 命令與 systemd 互動,詳見systemd#systemctl 基本用法

systemd 也提供記錄系統,使用 journalctl 命令。更多資訊請見 journal

系統維護

Arch 是滾動式發行系統,套裝軟體汰換極快,因此使用者必須花時間進行系統維護

套裝軟體管理

本段落提供關於套裝軟體管理的資訊。更詳細的資訊請見常見問題#套裝軟體管理 and 類別:套裝軟體管理

注意: 在更新系統之前,有些 Arch Linux 的更新項目一定要先手動處理。免費訂閱 Arch 郵件公告最新 RSS 摘要,或者每次更新前檢查 Arch 首頁的新聞。

pacman

pacman is the Arch Linux package manager: it is highly encouraged to become familiar with it before reading any other articles.

To enable downloading packages in parallel, see pacman#Enabling parallel downloads.

For long term handling of cached packages, see pacman#Cleaning the package cache.

See pacman/Tips and tricks for suggestions on how to improve your interaction with pacman and package management in general.

儲存庫

See the Official repositories article for details about the purpose of each officially maintained repository.

If you plan on using 32-bit applications, you will want to enable the multilib repository.

The Unofficial user repositories article lists several other unsupported repositories.

You may consider installing the pkgstats service.

鏡像

Visit the Mirrors article for steps on taking full advantage of using the fastest and most up to date mirrors of the official repositories. As explained in the article, a particularly good advice is to routinely check the Mirror Status page for a list of mirrors that have been recently synced. This can be automated with Reflector.

Arch 建置系統

Ports is a system initially used by BSD distributions consisting of build scripts that reside in a directory tree on the local system. Simply put, each port contains a script within a directory intuitively named after the installable third-party application.

The Arch build system offers the same functionality by providing build scripts called PKGBUILDs, which are populated with information for a given piece of software: integrity hashes, project URL, version, license and build instructions. These PKGBUILDs are parsed by makepkg, the actual program that generates packages that are cleanly manageable by pacman.

Every package in the repositories along with those present in the AUR are subject to recompilation with makepkg.

Arch 使用者儲存庫

While the Arch Build System allows the ability of building software available in the official repositories, the Arch User Repository (AUR) is the equivalent for user submitted packages. It is an unsupported repository of build scripts accessible through the web interface or through the Aurweb RPC interface.

開機

This section contains information pertaining to the boot process. An overview of the Arch boot process can be found at Arch boot process. See Category:Boot process for more.

自動辨識硬體

Hardware should be auto-detected by udev during the boot process by default. A potential improvement in boot time can be achieved by disabling module auto-loading and specifying required modules manually, as described in Kernel modules. Additionally, Xorg should be able to auto-detect required drivers using udev, but users have the option to configure the X server manually too.

微程式

Processors may have faulty behaviour, which the kernel can correct by updating the microcode on startup. See Microcode for details.

保留開機訊息

Once the login prompt appears, the messages from boot are cleared, leaving users unable to gather feedback from them. Disable clearing of boot messages to overcome this limitation.

啟動 Num Lock

Num Lock is a toggle key found in most keyboards. For activating Num Lock's number key-assignment during startup, see Activating numlock on bootup.

使用者圖形介面

This section provides orientation for users wishing to run graphical applications on their system. See Category:Graphical user interfaces for additional resources.

顯示伺服器

Xorg is the public, open-source implementation of the X Window System (commonly X11, or X). It is required for running applications with graphical user interfaces (GUIs).

Wayland is a newer, alternative display server protocol with several compositors to choose from. Its advantages over Xorg are enhanced security features, more efficient handling of modern graphics tasks and active development while retaining compatibility through Xwayland.

顯示器驅動

The default modesetting display driver will work with most video cards, but performance may be improved and additional features harnessed by installing the appropriate driver for AMD or NVIDIA products.

桌面環境

Although the display server provides the basic framework for building a graphical environment, additional components may be considered necessary for a complete user experience. Desktop environments such as KDE, GNOME, Xfce, Cinnamon, LXDE, bundle together a wide range of well-integrated applications, such as a window manager or compositor, panel/taskbar, file manager, terminal emulator, text editor, icons, and other utilities. Users with less experience may wish to install a desktop environment for a more familiar environment. See Category:Desktop environments for additional resources.

視窗管理員或組合器

A full-fledged desktop environment provides a complete and consistent graphical user interface, but tends to consume a good amount of system resources. Users seeking to maximize performance or otherwise simplify their environment may opt to install a window manager or compositor alone and hand-pick desired extras. Using Xorg, most desktop environments allow use of an alternative window manager as well. Dynamic, stacking, and tiling window managers differ in their handling of window placement.

顯示管理員

Most desktop environments include a display manager for automatically starting the graphical environment and managing user logins. Users without a desktop environment can install one separately. Alternatively you may start X at login as a simple alternative to a display manager.

使用者目錄

Well-known user directories like Downloads or Music are created by the xdg-user-dirs-update.service user service, that is provided by xdg-user-dirs and enabled by default upon install. If your desktop environment or window manager does not pull in the package, you can install it and run xdg-user-dirs-update manually as per XDG user directories#Creating default directories.

電源管理

This section may be of use to laptop owners or users otherwise seeking power management controls. See Category:Power management for more.

See Power management for more general overview.

ACPI 事件

Users can configure how the system reacts to ACPI events such as pressing the power button or closing a laptop's lid. For the recommended method using systemd, see Power management#ACPI events. For the old method, see acpid.

CPU 頻率調整

Modern processors can decrease their frequency and voltage to reduce heat and power consumption. Less heat leads to more quiet system and prolongs the life of hardware. See CPU frequency scaling for details.

筆記型電腦

For articles related to portable computing along with model-specific installation guides, please see Category:Laptops. For a general overview of laptop-related articles and recommendations, see Laptop.

待機與休眠

請參閱主文:電源管理/待機與休眠

多媒體

多媒體頁面列有額外的參考資料。

音效系統

ALSA is a kernel sound system that should work out the box (it just needs to be unmuted). Sound servers such as PipeWire and PulseAudio can offer additional features and support more complex audio configuration.

See Professional audio for advanced audio requirements.

網路

This section is confined to small networking procedures. See Network configuration for a full configuration guide and Category:Networking for related articles.

DNS 安全性

For better security while browsing the web, paying online, connecting to SSH services and similar tasks consider using DNSSEC-enabled DNS resolver that can validate signed DNS records, and an encrypted protocol such as DNS over TLS, DNS over HTTPS or DNSCrypt. See Domain name resolution for details.

設定防火牆

A firewall can provide an extra layer of protection on top of the Linux networking stack. While the stock Arch kernel is capable of using Netfilter's iptables and nftables, neither are enabled by default. It is highly recommended to set up some form of firewall. See Category:Firewalls for available guides.

網路分享

To share files among the machines in a network, follow the NFS or the SSHFS article.

Use Samba to join a Windows network. To configure the machine to use Active Directory for authentication, read Active Directory integration.

See also Category:Network sharing.

輸入裝置

This section contains popular input device configuration tips. See Category:Input devices for more.

鍵盤配置

Non-English or otherwise non-standard keyboards may not function as expected by default. The necessary steps to configure the keymap are different for virtual console and Xorg, they are described in Keyboard configuration in console and Keyboard configuration in Xorg respectively.

滑鼠按鍵

Owners of advanced or unusual mice may find that not all mouse buttons are recognized by default, or may wish to assign different actions for extra buttons. Instructions can be found in Mouse buttons.

筆記型電腦觸控板

Many laptops use Synaptics or ALPS "touchpad" pointing devices. For these, and several other touchpad models, you can use either the Synaptics input driver or libinput; see Touchpad Synaptics and libinput for installation and configuration details.

TrackPoints

See the TrackPoint article to configure your TrackPoint device.

最佳化

This section aims to summarize tweaks, tools and available options useful to improve system and application performance.

效能分析

Benchmarking is the act of measuring performance and comparing the results to another system's results or a widely accepted standard through a unified procedure.

提升性能

The Improving performance article gathers information and is a basic rundown about gaining performance in Arch Linux.

固態硬碟

The Solid state drive article covers many aspects of solid state drives, including configuring them to maximize their lifetimes, e.g. with TRIM.

系統服務

This section relates to daemons.

檔案索引與搜尋

Most distributions have a locate command available to be able to quickly search files. Arch Linux provides several alternatives, see locate for details.

Desktop search engines provide a similar service, while better integrated into desktop environments.

本機郵件寄送服務

A default setup does not provide a way to synchronize mail. A list of mail delivery agents is available in the Mail server article.

列印

CUPS is a standards-based, open source printing system developed by OpenPrinting for Linux. See Category:Printers for printer-specific articles.

外觀

This section contains frequently-sought "eye candy" tweaks for an aesthetically pleasing Arch experience. See Category:Eye candy for more.

字型

You may wish to install a set of TrueType fonts, as only unscalable bitmap fonts are included in a basic Arch system. There are several general-purpose font families providing large Unicode coverage and even metric compatibility with fonts from other operating systems.

A plethora of information on the subject can be found in the Fonts and Font configuration articles.

If spending a significant amount of time working from the virtual console (i.e. outside an X server), users may wish to change the console font to improve readability; see Linux console#Fonts.

GTK、Qt 主題

A big part of the applications with a graphical interface for Linux systems are based on the GTK or the Qt toolkits. See those articles and Uniform look for Qt and GTK applications for ideas to improve the appearance of your installed programs and adapt it to your liking.

增進控制台功能

This section applies to small modifications that improve console programs' practicality. See Category:Command-line shells for more.

增強 Tab 自動完成

It is recommended to properly set up extended tab completion right away, as instructed in the article of your chosen shell.

別名

Aliasing a command, or a group thereof, is a way of saving time when using the console. This is especially helpful for repetitive tasks that do not need significant alteration to their parameters between executions. Common time-saving aliases can be found in Bash#Aliases, which are easily portable to zsh as well.

其他 Shell

Bash is the shell installed by default in an Arch system. The live installation media, however, uses zsh with the grml-zsh-config addon package. See Command-line shell#List of shells for more alternatives.

Bash 附加功能

A list of miscellaneous Bash settings, history search and Readline macros is available in Bash#Tips and tricks.

彩色輸出

This section is covered in Color output in console.

壓縮檔案

Compressed files, or archives, are frequently encountered on a GNU/Linux system. Tar is one of the most commonly used archiving tools, and users should be familiar with its syntax (Arch Linux packages, for example, are simply zstd compressed tarballs). See Archiving and compression.

控制台命令提示字元

The console prompt (PS1) can be customized to a great extent. See Bash/Prompt customization or Zsh#Prompts if using Bash or Zsh, respectively.

Emacs shell

Emacs is known for featuring options beyond the duties of regular text editing, one of these being a full shell replacement. Consult Emacs#Colored output issues for a fix regarding garbled characters that may result from enabling colored output.

滑鼠支援

Using a mouse with the console for copy-paste operations can be preferred over GNU Screen's traditional copy mode. Refer to General purpose mouse for comprehensive directions. Note that you can already do this in terminal emulators with the clipboard.

工作階段管理

Using terminal multiplexers like tmux or GNU Screen, programs may be run under sessions composed of tabs and panes that can be detached at will, so when the user either kills the terminal emulator, terminates X, or logs off, the programs associated with the session will continue to run in the background as long as the terminal multiplexer server is active. Interacting with the programs requires reattaching to the session.

POSIX shell 工具

This article or section is a candidate for moving to Core utilities.

Notes: The topic is still better suited for the dedicated page. (Discuss in Talk:General recommendations (正體中文))

Many common packages already install most popular POSIX utilities as dependencies, but the posix metapackage can be installed to ensure all of them being always present.

Beside mandatory utilities, there are also metapackages for some of the optional categories:

Note: Not all optional utilities from given category are necessarily present in corresponding metapackage.