General recommendations (粵語)

From ArchWiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Translation Status: This article is a localized version of General recommendations. Last translation date: 2021-04-28. You can help to synchronize the translation, if there were changes in the English version.

Tango-preferences-desktop-locale.pngThis article or section needs to be translated.Tango-preferences-desktop-locale.png

Notes: Unfinished translations 未譯完架 (Discuss in Talk:General recommendations (粵語))

呢版列舉咗受歡迎、關於對 Arch 系統改善同增加功能嘅文章同重要資訊。讀者應讀咗 Installation guide (粵語) 先至基本噉裝咗 Arch Linux。你讀完#系統管理#軟件包管理先會明其他地方噏乜。

系統管理

呢部分講解點樣管理(個系統)。詳情﹕Core utilitiesCategory:System administration

用戶同用戶組

啱啱裝完嘅系統淨係會有超級用戶,即係 root。長時間用 root,甚至喺一個侍服器度用 SSH 開放 root,係非常危險嘅。你應整一個冇乜權限嘅用戶嚟做日常大部分工作,喺系統管理嘅情況下先好用 root。(詳情

用戶同用戶組係權限嘅控制方式;管理員可以調整擁有者同成員以畀或禁示啲用戶同系統服務嘅系統資源嘅存取權限。想知道更多(關於安全/危險性),請睇 Users and groups

權限提升

以下嘅命令行工具允許以第二個用戶(好似root)去行命令或開一個互動殼層

  • su — 畀你扮做另一個用戶,但係你需要知道個用戶嘅密碼。 root 冇需密碼就可以扮做其他用戶。
https://github.com/karelzak/util-linux || util-linuxbase所依頼之一)
  • sudo — 畀一個管理者委派某啲用戶(或用戶組),令佢哋可以以 root 或另一個用戶行部分(或所有)命令,同時留低佢哋行過乜嘢嘅記錄。預設為淨係得 root 可以用。
https://www.sudo.ws/sudo/ || sudo
  • pkexec(1) — 一個允許授權咗嘅用戶去扮其他用戶嘅 Polkit 應用程式。設定畀 Polkit 規則定咗。
https://gitlab.freedesktop.org/polkit/polkit/ || polkit
  • doas — 一個比 sudo 細啲同簡單啲嘅程式。
https://github.com/Duncaen/OpenDoas || opendoas

系統服務管理

Arch Linux 嘅 init 行程systemd,佢係一個畀 Linux 嘅系統同系統服務管理員。如果想維護你裝咗嘅 Arch Linux 系統,學下佢嘅基本用法都係一個唔錯嘅諗頭。用 systemctl 先可以同 systemd 互動。(詳情

系統維護

因為 Arch 用漸進式發行模式,有好快趣嘅軟體包更新速度,所以使用者要啲時間去 維護系統。讀 Security 就可以揾到關於強化系統嘅建議同技巧。

軟件包管理

呢個環節有關於軟件包管理嘅好好用嘅資料。睇埋﹕FAQ#Package managementCategory:Package management

Note: Arch Linux 有陣時要手動處理升級。訂閱 arch-announce 郵件列表,或近日新聞 RSS feed。你都可以每次更新之前睇睇 Arch 新聞

pacman

pacman is the Arch Linux package manager: all users are required to become familiar with it before reading any other articles.

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

Repositories

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.

Arch Build System

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 User Repository

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.

Booting

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 auto-recognition

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.

Microcode

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

Retaining boot messages

Once it concludes, the screen is cleared and the login prompt appears, leaving users unable to gather feedback from the boot process. Disable clearing of boot messages to overcome this limitation.

Num Lock activation

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.

Graphical user interface

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

Display server

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), and the majority of users will want to install it.

Wayland is a newer, alternative display server protocol and the Weston reference implementation is available.

顯示驅動器

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 Xorg provides the basic framework for building a graphical environment, additional components may be considered necessary for a complete user experience. Desktop environments such as GNOME, KDE, LXDE, and Xfce bundle together a wide range of X clients, such as a window manager, panel, 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.

Window managers

A full-fledged desktop environment provides a complete and consistent graphical user interface, but tends to consume a considerable amount of system resources. Users seeking to maximize performance or otherwise simplify their environment may opt to install a window manager alone and hand-pick desired extras. 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.

Display manager

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.

User directories

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.

Power management

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 events

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

CPU frequency scaling

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.

Laptops

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.

Suspend and hibernate

See main article: Power management/Suspend and hibernate.

多媒體

Category:Multimedia includes additional resources.

Sound system

ALSA is a kernel sound system that should work out the box (it just needs to be unmuted). Sound servers such as PulseAudio and PipeWire 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.

時鐘同步

The Network Time Protocol (NTP) is a protocol for synchronizing the clocks of computer systems over packet-switched, variable-latency data networks. See Time synchronization for implementations of such protocol.

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.

Keyboard layouts

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.

Mouse buttons

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.

Laptop touchpads

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

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.

Improving performance

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

Solid state drives

The Solid State Drives article covers many aspects of solid state drives, including configuring them to maximize their lifetimes.

系統服務

This section relates to daemons.

File index and search

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.

Local mail delivery

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

Printing

CUPS is a standards-based, open source printing system developed by Apple. 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 and Qt themes

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.

Console improvements

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

Tab-completion enhancements

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

Aliases

Aliasing a command, or a group thereof, is a way of saving time when using the console. This is specially 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.

Alternative shells

Bash is the shell that is 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 additions

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

Colored output

This section is covered in Color output in console.

Compressed files

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.

Console prompt

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.

Mouse support

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.

Session management

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.