https://wiki.archlinux.org/api.php?action=feedcontributions&user=Pdc&feedformat=atomArchWiki - User contributions [en]2024-03-28T13:50:45ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Core_dump&diff=795853Core dump2024-01-02T13:08:14Z<p>Pdc: /* Using PAM limits */ limits.conf#core recommends setting a soft limit</p>
<hr />
<div>[[Category:Development]]<br />
[[Category:Security]]<br />
[[ja:コアダンプ]]<br />
[[pt:Core dump]]<br />
[[ru:Core dump]]<br />
A [[wikipedia:Core_dump|core dump]] is a file containing a process's address space (memory) when the process terminates unexpectedly. Core dumps may be produced on-demand (such as by a [[#Making a core dump|debugger]]), or automatically upon termination. Core dumps are triggered by the kernel in response to program crashes, and may be passed to a helper program (such as {{man|8|systemd-coredump}}) for further processing. A core dump is not typically used by an average user, but developers could use it as a post-mortem snapshot of the program's state at the time of the crash, especially if the fault is hard to reliably reproduce.<br />
<br />
{{Warning|Core dumps should be shared only with trusted parties as they may contain sensitive data (such as passwords or cryptographic keys).}}<br />
<br />
== Disabling automatic core dumps ==<br />
<br />
Users may wish to disable automatic core dumps for a number of reasons:<br />
* Performance: generating core dumps for memory-heavy processes can waste system resources and delay the cleanup of memory.<br />
* Disk space: core dumps of memory-heavy processes may consume disk space equal to, if not greater, than the process's memory footprint if not compressed.<br />
* Security: core dumps, although typically readable only by root, may contain sensitive data (such as passwords or cryptographic keys), which are written to disk following a crash.<br />
<br />
=== Using sysctl ===<br />
<br />
[[sysctl]] can be used to set the {{ic|kernel.core_pattern}} to nothing to disable core dump handling. Create this file<br />
<br />
{{hc|/etc/sysctl.d/50-coredump.conf|2=<br />
kernel.core_pattern=/dev/null<br />
}}<br />
<br />
To apply the setting immediately, use {{ic|sysctl}}:<br />
<br />
# sysctl -p /etc/sysctl.d/50-coredump.conf<br />
<br />
=== Using systemd ===<br />
<br />
[[systemd]]'s default behavior is defined in {{ic|/usr/lib/sysctl.d/50-coredump.conf}}, which sets {{ic|kernel.core_pattern}} to call {{ic|systemd-coredump}}. It generates core dumps for all processes in {{ic|/var/lib/systemd/coredump}}. {{ic|systemd-coredump}} behavior can be overridden by creating a configuration snippet in the {{ic|/etc/systemd/coredump.conf.d/}} directory with the following content (See {{man|5|coredump.conf|DESCRIPTION}}, [https://bbs.archlinux.org/viewtopic.php?id=214207]):<br />
<br />
{{hc|/etc/systemd/coredump.conf.d/custom.conf|2=<br />
[Coredump]<br />
Storage=none<br />
ProcessSizeMax=0}}<br />
<br />
{{Note|Do not forget to include the {{ic|[Coredump]}} section name, otherwise this option will be ignored.}}<br />
<br />
Then reload the systemd manager configuration with [[daemon-reload]]. <br />
<br />
See {{man|8|systemd-coredump|Disabling coredump processing}}.<br />
<br />
=== Using PAM limits ===<br />
<br />
{{Accuracy|[[limits.conf#core]] recommends setting a soft limit so that core dumps can be temporarily enabled with {{ic|ulimit -c unlimited}}.}}<br />
<br />
The maximum core dump size for users logged in via [[PAM]] is enforced by [[limits.conf]]. Setting it to zero disables core dumps entirely. [https://www.cyberciti.biz/faq/linux-disable-core-dumps/]<br />
{{hc|/etc/security/limits.conf|<br />
* hard core 0}}<br />
<br />
=== Using ulimit ===<br />
<br />
[[Command-line shell]]s such as ''bash'' or ''zsh'' provide a builtin ''ulimit'' command which can be used to report or set resource limits of the shell and the processes started by the shell. See {{man|1|bash|SHELL BUILTIN COMMANDS}} or {{man|1|zshbuiltins}} for details.<br />
<br />
To disable core dumps in the current shell:<br />
<br />
$ ulimit -c 0<br />
<br />
If the system is setup to pipe coredumps into a program such as ''systemd-coredump'' using {{ic|kernel.core_pattern}}, Linux ignores the ''ulimit'' setting and only the {{ic|dumpable}} {{man|2|prctl}} can be used to disable coredump processing for selected processes.<br />
<br />
== Making a core dump ==<br />
<br />
To generate a core dump of an arbitrary process, first [[install]] the {{Pkg|gdb}} package. Then find the PID of the running process, for example with ''pgrep'':<br />
<br />
{{hc|$ pgrep -f ''firefox''|<br />
2071 firefox<br />
}}<br />
<br />
Attach to the process:<br />
<br />
$ gdb -p 2071<br />
<br />
Then at the {{ic|(gdb)}} prompt:<br />
<br />
(gdb) generate-core-file<br />
Saved corefile core.2071<br />
(gdb) quit<br />
<br />
Now you have a coredump file called {{ic|core.2071}}.<br />
<br />
=== Where do they go? ===<br />
<br />
The {{ic|kernel.core_pattern}} [[sysctl]] decides where automatic core dumps go. By default, core dumps are sent to ''systemd-coredump'' which can be configured in {{ic|/etc/systemd/coredump.conf}}. By default, all core dumps are stored in {{ic|/var/lib/systemd/coredump}} (due to {{ic|1=Storage=external}}) and they are compressed with {{ic|zstd}} (due to {{ic|1=Compress=yes}}). Additionally, various size limits for the storage can be configured.<br />
<br />
{{Note|The default value for {{ic|kernel.core_pattern}} is set in {{ic|/usr/lib/sysctl.d/50-coredump.conf}}. This file may be masked or overridden to use a different setting following normal {{man|5|sysctl.d}} rules.}}<br />
<br />
To retrieve a core dump from the journal, see {{man|1|coredumpctl}}.<br />
<br />
== Managing the core dump files ==<br />
<br />
Use ''coredumpctl'' to find the corresponding dump. Note that regular users can run ''coredumpctl'' without special privileges to manage core dumps of their processes.<br />
<br />
# coredumpctl list<br />
<br />
=== Cleanup of core dump files ===<br />
<br />
The core dump files stored in {{ic|/var/lib/systemd/coredump/}} will be automatically cleaned by {{ic|systemd-tmpfiles --clean}}, which is triggered daily with {{ic|systemd-tmpfiles-clean.timer}}. Core dumps are configured to persist for at least 3 days, see {{ic|systemd-tmpfiles --cat-config}}.<br />
<br />
== Analyzing a core dump ==<br />
<br />
First, you need to uniquely identify the relevant dump. This is possible by specifying a {{ic|PID}}, name of the executable, path to the executable or a [[journalctl]] predicate (see {{man|1|coredumpctl}} and {{man|1|journalctl}} for details). To see details of the core dumps:<br />
<br />
# coredumpctl info ''match''<br />
<br />
Pay attention to "Signal" row, that helps to identify crash cause. For the analysis one usually examine the backtrace using a debugger ({{man|1|gdb}} by default):<br />
<br />
# coredumpctl debug ''match''<br />
<br />
When ''gdb'' is started, use the {{ic|bt}} command to print the backtrace:<br />
<br />
(gdb) bt<br />
<br />
In many cases, the output will contain question marks as placeholders for missing debugging symbols. See [[Debugging/Getting traces]] for how to obtain them.<br />
<br />
== See also ==<br />
<br />
* [https://lcamtuf.coredump.cx/afl/ american fuzzy lop] - A tool for automated tests of the kernel and programs <br />
* [https://lwn.net/Articles/637151/ Filesystem fuzzing] - LWN article about testing filesystems for bugs</div>Pdchttps://wiki.archlinux.org/index.php?title=Bcachefs&diff=791592Bcachefs2023-10-31T16:37:16Z<p>Pdc: /* Installation */ The bcachefs-tools package is now in extra repo</p>
<hr />
<div>[[Category:File systems]]<br />
[[ja:Bcachefs]]<br />
[https://bcachefs.org/ Bcachefs] is a next-generation CoW filesystem that aims to provide features from [[Btrfs]] and [[ZFS]] with a cleaner codebase, more stability, greater speed and a GPL-compatible license.<br />
<br />
It is built upon [[Bcache]] and is mainly developed by Kent Overstreet.<br />
<br />
== Installation ==<br />
<br />
As of [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9e87705289667a6c5185c619ea32f3d39314eb1b kernel 6.7] Bcachefs has been merged into the upstream [[Kernel]] so the {{AUR|linux-git}} kernel may be [[install]]ed.<br />
<br />
The Bcachefs userspace tools are available from {{Pkg|bcachefs-tools}}.<br />
<br />
== Setup ==<br />
<br />
=== Single drive ===<br />
<br />
# bcachefs format /dev/sda<br />
# mount -t bcachefs /dev/sda /mnt<br />
<br />
=== Multiple drives ===<br />
<br />
Bcachefs stripes data by default, similar to RAID0. Redundancy is handled via the '''replicas''' option. 2 drives with {{ic|--replicas{{=}}2}} is equivalent to RAID1, 4 drives with {{ic|--replicas{{=}}2}} is equivalent to RAID10, etc.<br />
<br />
# bcachefs format /dev/sda /dev/sdb --replicas=''n''<br />
# mount -t bcachefs /dev/sda:/dev/sdb /mnt<br />
<br />
Heterogeneous drives are supported. If they are different sizes, larger stripes will be used on some, so that they all fill up at the same rate. If they are different speeds, reads for replicated data will be sent to the ones with the lowest IO latency. If some are more reliable than others (a hardware raid device, for example) you can set {{ic|--durability{{=}}2 ''device''}} to count each copy of data on that device as 2 replicas.<br />
<br />
=== SSD caching ===<br />
<br />
Bcachefs has 3 storage targets: background, foreground, and promote. Writes to the filesystem prioritize the foreground drives, which are then moved to the background over time. Reads are cached on the promote drives.<br />
<br />
{{Note|These are only priority guidelines for a single large pool. Writes will go directly to the background if the foreground is full, or to promote if they both are. Metadata will prefer the foreground, but can be written to any of them. Be careful when removing a cache drive, as it may still contain data. see [[#Removing a device]]}}<br />
<br />
A recommended configuration is to use an ssd group for the foreground and promote, and an hdd group for the background (a writeback cache).<br />
<br />
# bcachefs format \<br />
--label=ssd.ssd1 /dev/sda \<br />
--label=ssd.ssd2 /dev/sdb \<br />
--label=hdd.hdd1 /dev/sdc \<br />
--label=hdd.hdd2 /dev/sdd \<br />
--label=hdd.hdd3 /dev/sde \<br />
--label=hdd.hdd4 /dev/sdf \<br />
--replicas=2 \<br />
--foreground_target=ssd \<br />
--promote_target=ssd \<br />
--background_target=hdd<br />
# mount -t bcachefs /dev/sda:/dev/sdb:/dev/sdc:/dev/sdd:/dev/sde:/dev/sdf /mnt<br />
<br />
For a writethrough cache, do the same as above, but set {{ic|--durability{{=}}0 ''device''}} on each of the ssd devices.<br />
For a writearound cache, foreground target to the hdd group, and promote target to the ssd group.<br />
<br />
== Configuration ==<br />
<br />
{{Expansion|Missing details on which options should be used}}<br />
<br />
Most options can be set at either during {{ic|bcachefs format}}, at mount time ({{ic|1=mount -o option=value}}), or through sysfs ({{ic|echo X > /sys/fs/bcachefs/''UUID''/options/''option''}}). Setting the option during format or changing it through sysfs saves it in the filesystem's superblock, making it the default for those drives. Mount options override those defaults.<br />
<br />
{{Note|The filesystem must be mounted for sysfs to be available. All operations except fsck are possible on a live filesystem.}}<br />
<br />
* data_checksum, metadata_checksum (none, crc32c, crc64)<br />
* (foreground) compression, background_compression (none, lz4, gzip, zstd)<br />
* foreground_target, background_target, promote_target<br />
<br />
The following can also be set on a per directory or per file basis with {{ic|1=bcachefs setattr ''file'' --option=value}}<br />
<br />
* data_replicas<br />
* data_checksum<br />
* compression, background_compression<br />
* foreground_target, background_target, promote_target<br />
<br />
{{Note|Disk usage reporting currently shows uncompressed size. Compression is otherwise complete.}}<br />
<br />
=== Changing a device's group ===<br />
<br />
# echo ''group.drive_name'' > /sys/fs/bcachefs/''filesystem_uuid''/dev-''X''/label<br />
<br />
{{Note|This requires a remount to take effect.}}<br />
<br />
=== Adding a device ===<br />
<br />
# bcachefs device add --label=''group.drive_name'' /mnt /dev/''device''<br />
<br />
If this is the first drive in a group, you will need to change the target settings to make use of it. This example is for adding a cache drive.<br />
<br />
# echo ''new_group'' > /sys/fs/bcachefs/''filesystem_uuid''/options/promote_target<br />
# echo ''new_group'' > /sys/fs/bcachefs/''filesystem_uuid''/options/foreground_target<br />
# echo ''old_group'' > /sys/fs/bcachefs/''filesystem_uuid''/options/background_target<br />
<br />
{{Note|Only new writes will be striped across added devices. Existing ones will be unchanged until disk usage reaches a certain threshold, when the disk rebalance is triggered. It is not currently possible to manually trigger a rebalance/restripe.}}<br />
<br />
=== Removing a device ===<br />
<br />
First make sure there are at least 2 metadata replicas (Evacuate does not appear to work for metadata). If your data and metadata are already replicated, you may skip this step.<br />
<br />
# echo 2 > /sys/fs/bcachefs/''UUID''/options/metadata_replicas<br />
# bcachefs data rereplicate /mnt<br />
# bcachefs device set-state ''device'' readonly<br />
# bcachefs device evacuate ''device''<br />
<br />
To remove the device:<br />
<br />
# bcachefs device remove ''device''<br />
# bcachefs data rereplicate /mnt<br />
<br />
== Tips and tricks ==<br />
<br />
{{Expansion|Information on auto-mounting would be useful}}<br />
<br />
Check the [[journal]] for more useful error messages.<br />
<br />
== See also ==<br />
<br />
* [https://bcachefs.org/bcachefs-principles-of-operation.pdf Official Manual]<br />
* [https://www.patreon.com/bcachefs Kent Overstreet's Patreon page]<br />
* [[Wikipedia:Bcachefs]]</div>Pdchttps://wiki.archlinux.org/index.php?title=Mkinitcpio&diff=783132Mkinitcpio2023-07-14T17:02:37Z<p>Pdc: /* Configuration */ Older preset files set ALL_config, which disables loading of drop-ins</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Initramfs]]<br />
[[Category:Kernel]]<br />
[[Category:Arch projects]]<br />
[[Category:Commands]]<br />
[[de:Mkinitcpio]]<br />
[[fr:Mkinitcpio]]<br />
[[ja:Mkinitcpio]]<br />
[[pt:Mkinitcpio]]<br />
[[ru:Mkinitcpio]]<br />
[[zh-hans:Mkinitcpio]]<br />
{{Related articles start}}<br />
{{Related|Booster}}<br />
{{Related|Boot debugging}}<br />
{{Related|dracut}}<br />
{{Related|Kernel modules}}<br />
{{Related|mkinitcpio/Minimal initramfs}}<br />
{{Related|systemd}}<br />
{{Related|Unified kernel image}}<br />
{{Related articles end}}<br />
[https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio mkinitcpio] is a Bash script used to create an [[Wikipedia:Initial ramdisk|initial ramdisk]] environment. From the {{man|8|mkinitcpio}} man page:<br />
<br />
:The initial ramdisk is in essence a very small environment (early userspace) which loads various kernel modules and sets up necessary things before handing over control to {{ic|init}}. This makes it possible to have, for example, encrypted root file systems and root file systems on a software RAID array. ''mkinitcpio'' allows for easy extension with custom hooks, has autodetection at runtime, and many other features.<br />
<br />
Traditionally, the kernel was responsible for all hardware detection and initialization tasks early in the [[boot process]] before mounting the root file system and passing control to {{ic|init}}. However, as technology advances, these tasks have become increasingly complex. <br />
<br />
Nowadays, the root file system may be on a wide range of hardware, from SCSI to SATA to USB drives, controlled by a variety of drive controllers from different manufacturers. Additionally, the root file system may be encrypted or compressed; within a software RAID array or a logical volume group. The simple way to handle that complexity is to pass management into userspace: an initial ramdisk. See also: [https://web.archive.org/web/20150430223035/http://archlinux.me/brain0/2010/02/13/early-userspace-in-arch-linux/ /dev/brain0 » Blog Archive » Early Userspace in Arch Linux].<br />
<br />
''mkinitcpio'' has been developed by the Arch Linux developers and from community contributions. See the [https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio public Git repository].<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|mkinitcpio}} package, which is a dependency of the {{Pkg|linux}} package, so most users will already have it installed.<br />
<br />
Advanced users may wish to install the latest development version of ''mkinitcpio'' from Git with the {{AUR|mkinitcpio-git}} package.<br />
<br />
== Image creation and activation ==<br />
<br />
=== Automated generation ===<br />
<br />
Every time a kernel is installed or upgraded, a [[pacman hook]] automatically generates a ''.preset'' file saved in {{ic|/etc/mkinitcpio.d/}}. For example {{ic|linux.preset}} for the official stable {{Pkg|linux}} kernel package. A preset is simply a list of information required to create initial ramdisk images, instead of manually specifying the various parameters and the location of the output files.<br />
By default, it contains the instructions to create two images:<br />
<br />
# the ''default'' ramdisk image created following the directives specified in the mkinitcpio [[#Configuration]], and<br />
# the ''fallback'' ramdisk image, same as above except that the ''autodetect'' hook is skipped during creation, thus including a full range of modules which supports most systems.<br />
<br />
After creating the preset, the pacman hook calls the ''mkinitcpio'' script which generates the two images, using the information provided in the preset.<br />
<br />
{{Note|''.preset'' files are used to automatically regenerate the initramfs after a kernel update; be careful when editing them.}}<br />
<br />
=== Manual generation ===<br />
<br />
To run the script manually, refer to the {{man|8|mkinitcpio}} manual page for instructions. In particular, to (re-)generate the preset provided by a kernel package, use the {{ic|-p}}/{{ic|--preset}} option followed by the preset to utilize. For example, for the {{Pkg|linux}} package, use the command:<br />
<br />
# mkinitcpio -p linux<br />
<br />
To (re-)generate all existing presets, use the {{ic|-P}}/{{ic|--allpresets}} switch. This is typically used to regenerate all the initramfs images after a change of the global [[#Configuration]]:<br />
<br />
# mkinitcpio -P<br />
<br />
Users may create any number of initramfs images with a variety of different configurations. The desired image must be specified in the respective [[boot loader]] configuration file.<br />
<br />
=== Customized generation ===<br />
<br />
Users can generate an image using an alternative configuration file. For example, the following will generate an initial ramdisk image according to the directions in {{ic|/etc/mkinitcpio-custom.conf}} and save it as {{ic|/boot/initramfs-custom.img}}.<br />
<br />
# mkinitcpio --config /etc/mkinitcpio-custom.conf --generate /boot/initramfs-custom.img<br />
<br />
If generating an image for a kernel other than the one currently running, add the kernel release version to the command line. The installed kernel releases can be found in {{ic|/usr/lib/modules/}}, the syntax is consistent with the output of the command {{ic|uname -r}} for each kernel.<br />
<br />
# mkinitcpio --generate /boot/initramfs-custom2.img --kernel 5.7.12-arch1-1<br />
<br />
=== Unified kernel images ===<br />
<br />
As of version 31, ''mkinitpcio'' can also create [[unified kernel image]]s.<br />
<br />
== Configuration ==<br />
<br />
The primary configuration file for ''mkinitcpio'' is {{ic|/etc/mkinitcpio.conf}}. Drop-in configuration files are also supported, e.g. {{ic|/etc/mkinitcpio.conf.d/myhooks.conf}}. Additionally, preset definitions are provided by kernel packages in the {{ic|/etc/mkinitcpio.d}} directory (e.g. {{ic|/etc/mkinitcpio.d/linux.preset}}).<br />
<br />
Users can modify six variables within the configuration file, see {{man|5|mkinitcpio.conf}} for more details:<br />
<br />
; {{ic|MODULES}}: Kernel modules to be loaded before any boot hooks are run. <br />
; {{ic|BINARIES}}: Additional binaries to be included in the initramfs image.<br />
; {{ic|FILES}}: Additional files to be included in the initramfs image.<br />
; {{ic|HOOKS}}: Hooks are scripts that execute in the initial ramdisk.<br />
; {{ic|COMPRESSION}}: Used to compress the initramfs image.<br />
; {{ic|COMPRESSION_OPTIONS}}: Extra arguments to pass to the {{ic|COMPRESSION}} program. Usage of this setting is strongly discouraged. ''mkinitcpio'' will handle special requirements for compressors (e.g. passing {{ic|1=--check=crc32}} to xz), and misusage can easily lead to an unbootable system.<br />
<br />
{{Note|<br />
* Some hooks that may be required for your system like '''lvm2''', '''mdadm_udev''', and '''encrypt''' are '''NOT''' enabled by default. Read the [[#HOOKS]] section carefully for instructions.<br />
* Users with multiple hardware disk controllers that use the same node names but different kernel modules (e.g. two SCSI/SATA or two IDE controllers) should use [[persistent block device naming]] to ensure that the right devices are mounted. Otherwise, the root device location may change between boots, resulting in kernel panics.<br />
* Preset files created by ''mkinitcpio'' before Version 36 set the variable {{ic|ALL_config}}, which prevents drop-in configuration files from being loaded. To enable drop-in files, comment out the line {{ic|ALL_config{{=}}"/etc/mkinitcpio.conf"}} in older preset files.<br />
}}<br />
<br />
=== MODULES ===<br />
<br />
The {{ic|MODULES}} array is used to specify modules to load before anything else is done.<br />
<br />
Modules suffixed with a {{ic|?}} will not throw errors if they are not found. This might be useful for custom kernels that compile in modules which are listed explicitly in a hook or configuration file.<br />
<br />
{{Note|<br />
* If using '''reiser4''', it ''must'' be added to the {{ic|MODULES}} array.<br />
* When using the '''encrypt''' or '''sd-encrypt''' hook, the keyboard modules and/or filesystems needed to unlock the LUKS device during system boot need to be added to the {{ic|MODULES}} array when the target system differs from the one used to run ''mkinitcpio''. For example, if you use a keyfile on an ext2 file system but no ext2 file system is mounted at the time ''mkinitcpio'' runs, add {{ic|ext2}}. See [[dm-crypt/System configuration#cryptkey]] for more details.<br />
* If using a keyboard through a USB 3 hub and wish to use it to unlock a LUKS device, add {{ic|usbhid xhci_hcd}}.<br />
* If using displays connected to a docking station, you might need to add a module for your graphic card to make initrd output visible (e.g. {{ic|i915}} for most Intel cards).<br />
}}<br />
<br />
=== BINARIES and FILES ===<br />
<br />
These options allow users to add files to the image. Both {{ic|BINARIES}} and {{ic|FILES}} are added before hooks are run, and may be used to override files used or provided by a hook. {{ic|BINARIES}} are auto-located within a standard {{ic|PATH}} and are dependency-parsed, meaning any required libraries will also be added. {{ic|FILES}} are added ''as-is''. For example:<br />
<br />
FILES=(/etc/modprobe.d/modprobe.conf)<br />
<br />
BINARIES=(kexec)<br />
<br />
Note that as both {{ic|BINARIES}} and {{ic|FILES}} are [[Bash]] arrays, multiple entries can be added delimited with spaces.<br />
<br />
=== HOOKS ===<br />
<br />
{{Expansion|Document post hooks ({{man|8|mkinitcpio|ABOUT POST HOOKS}}).}}<br />
<br />
The {{ic|HOOKS}} array is the most important setting in the file. Hooks are small scripts which describe what will be added to the image. For some hooks, they will also contain a runtime component which provides additional behavior, such as starting a daemon, or assembling a stacked block device. Hooks are referred to by their name, and executed in the order they exist in the {{ic|HOOKS}} array of the configuration file.<br />
<br />
The default {{ic|HOOKS}} setting should be sufficient for most simple, single disk setups. For root devices which are stacked or multi-block devices such as [[LVM]], [[RAID]], or [[dm-crypt]], see the respective wiki pages for further necessary configuration.<br />
<br />
==== Build hooks ====<br />
<br />
Build hooks are found in {{ic|/usr/lib/initcpio/install/}}, custom build hooks can be placed in {{ic|/etc/initcpio/install/}}. These files are sourced by the bash shell during runtime of ''mkinitcpio'' and should contain two functions: {{ic|build}} and {{ic|help}}. The {{ic|build}} function describes the modules, files, and binaries which will be added to the image. An API, documented by {{man|8|mkinitcpio}}, serves to facilitate the addition of these items. The {{ic|help}} function outputs a description of what the hook accomplishes.<br />
<br />
For a list of all available hooks:<br />
<br />
$ mkinitcpio -L<br />
<br />
Use ''mkinitcpio'''s {{ic|-H}}/{{ic|--hookhelp}} option to output help for a specific hook, for example:<br />
<br />
$ mkinitcpio -H udev<br />
<br />
==== Runtime hooks ====<br />
<br />
Runtime hooks are found in {{ic|/usr/lib/initcpio/hooks/}}, custom runtime hooks can be placed in {{ic|/etc/initcpio/hooks/}}. For any runtime hook, there should always be a build hook of the same name, which calls {{ic|add_runscript}} to add the runtime hook to the image. These files are sourced by the busybox ash shell during early userspace. With the exception of cleanup hooks, they will always be run in the order listed in the {{ic|HOOKS}} setting. Runtime hooks may contain several functions:<br />
<br />
{{ic|run_earlyhook}}: Functions of this name will be run once the API file systems have been mounted and the kernel command line has been parsed. This is generally where additional daemons, such as udev, which are needed for the early boot process are started from.<br />
<br />
{{ic|run_hook}}: Functions of this name are run shortly after the early hooks. This is the most common hook point, and operations such as assembly of stacked block devices should take place here.<br />
<br />
{{ic|run_latehook}}: Functions of this name are run after the root device has been mounted. This should be used, sparingly, for further setup of the root device, or for mounting other file systems, such as {{ic|/usr}}.<br />
<br />
{{ic|run_cleanuphook}}: Functions of this name are run as late as possible, and in the reverse order of how they are listed in the {{ic|HOOKS}} array in the configuration file. These hooks should be used for any last minute cleanup, such as shutting down any daemons started by an early hook.<br />
<br />
{{Note|Runtime hooks are only used by busybox init. '''systemd''' hook triggers a systemd based init, which does not run any runtime hooks but uses systemd units instead.}}<br />
<br />
==== Common hooks ====<br />
<br />
A table of common hooks and how they affect image creation and runtime follows. Note that this table is not complete, as packages can provide custom hooks.<br />
<br />
{{Expansion|Add info about {{ic|hostdata}}, {{ic|memdisk}}, {{ic|sleep}} and {{ic|strip}}, find out if {{ic|dmraid}}, etc. work/are needed for systemd based initramfs.|section=Improvements for the Common hooks table and section about systemd hook}}<br />
<br />
{| class="wikitable"<br />
! busybox init !! systemd init !! [[#Build hooks|Build hook]] !! [[#Runtime hooks|Runtime hook]] (busybox init only)<br />
|-<br />
|colspan="2" {{C|'''base'''}} || Sets up all initial directories and installs base utilities and libraries. Always keep this hook as the first hook unless you know what you are doing, as it provides critical busybox init when not using '''systemd''' hook. <br/>Optional when using the '''systemd''' hook as it only provides a busybox recovery shell. {{Note|The recovery shell is not usable since the root account in the initramfs is [https://gitlab.archlinux.org/archlinux/packaging/packages/systemd/-/commit/292cdf8a2f7dd7c6c7d91d2b59617391935c837c locked]. See {{Bug|70408}}.}}<br />
| {{-}}<br />
|-<br />
| {{C|'''udev'''}} ||rowspan="3" {{C|'''systemd'''}} || Adds udevd, udevadm, and a small subset of udev rules to your image. || Starts the udev daemon and processes uevents from the kernel; creating device nodes. As it simplifies the boot process by not requiring the user to explicitly specify necessary modules, using it is recommended.<br />
|-<br />
| {{C|'''usr'''}} || Adds support for {{ic|/usr}} on a separate partition. See [[#/usr as a separate partition]] for details. || Mounts the {{ic|/usr}} partition after the real root has been mounted.<br />
|-<br />
|-<br />
| {{C|'''resume'''}} || {{-}} || Tries to resume from the "suspend to disk" state. See [[Hibernation]] for further configuration.<br />
|-<br />
| {{C|'''btrfs'''}} || {{Grey|–}} || Sets the required modules to enable [[Btrfs]] for using multiple devices with Btrfs. You need to have {{Pkg|btrfs-progs}} installed to use this. This hook is not required for using Btrfs on a single device. || Runs {{ic|btrfs device scan}} to assemble a multi-device Btrfs root file system when '''udev''' hook or '''systemd''' hook is not present. The {{Pkg|btrfs-progs}} package is required for this hook.<br />
|-<br />
|colspan="2" {{C|'''autodetect'''}} || Shrinks your initramfs to a smaller size by creating a whitelist of modules from a scan of sysfs. Be sure to verify included modules are correct and none are missing. This hook must be run before other subsystem hooks in order to take advantage of auto-detection. Any hooks placed before 'autodetect' will be installed in full. || {{-}}<br />
|-<br />
|colspan="2" {{C|'''modconf'''}} || Includes modprobe configuration files from {{ic|/etc/modprobe.d/}} and {{ic|/usr/lib/modprobe.d/}}. || {{-}}<br />
|-<br />
|colspan="2" {{C|'''kms'''}} || Adds GPU modules to provide [[Kernel mode setting#Installation|early KMS start]]. Additionally adds modules that are required by privacy screens built into the LCD panel of some laptops.|| {{-}}<br />
|-<br />
|colspan="2" {{C|'''block'''}} || Adds all block device modules, formerly separately provided by the ''fw'', ''mmc'', ''pata'', ''sata'', ''scsi'', ''usb'', and ''virtio'' hooks. || {{-}}<br />
|-<br />
| {{C|'''net'''}} || {{Grey|''not implemented''}} || Adds the necessary modules for a network device. You must have {{Pkg|mkinitcpio-nfs-utils}} installed to use this, see [[#Using net]] for details. || Provides handling for an NFS-based root file system.<br />
|-<br />
| {{C|'''dmraid'''}} || {{Grey|''?''}} || Provides support for fakeRAID root devices. You must have {{Pkg|dmraid}} installed to use this. Note that it is preferred to use [[mdadm]] with the '''mdadm_udev''' hook with fakeRAID if your controller supports it. See [[#Using RAID]] for details. || Locates and assembles fakeRAID block devices using {{ic|dmraid}}.<br />
|-<br />
|colspan="2" {{C|'''mdadm_udev'''}} || Provides support for assembling RAID arrays via udev. You must have {{Pkg|mdadm}} installed to use this. If you use this hook with a FakeRAID array, it is recommended to include {{ic|mdmon}} in {{ic|BINARIES}}. See [[#Using RAID]] for details. || {{-}}<br />
|-<br />
|colspan="2" {{C|'''keyboard'''}} || Adds the necessary modules for keyboard devices. Use this if you have an USB or serial keyboard and need it in early userspace (either for entering encryption passphrases or for use in an interactive shell). As a side effect, modules for some non-keyboard input devices might be added too, but this should not be relied on. Supersedes old ''usbinput'' hook.<br />
<br />
{{Note|For systems that are booted with different hardware configurations (e.g. laptops with external keyboard vs. internal keyboard or [[Wikipedia:Headless computer|headless systems]]), this hook needs to be placed before '''autodetect''' in order to be able to use the keyboard at boot time, for example to unlock an encrypted device when using the {{ic|encrypt}} hook.}}<br />
<br />
| {{-}}<br />
|-<br />
| {{C|'''keymap'''}} ||rowspan="2" {{C|'''sd-vconsole'''}} || Adds the specified [[Linux console/Keyboard configuration#Persistent configuration|keymap(s)]] from {{ic|/etc/vconsole.conf}} to the initramfs. If you use [[dm-crypt/Encrypting an entire system|system encryption]], especially full-disk encryption, make sure you add it before the {{ic|1=encrypt}} hook. || Loads the specified keymap(s) from {{ic|/etc/vconsole.conf}} during early userspace.<br />
|-<br />
| {{C|'''consolefont'''}} || Adds the specified [[Linux console#Persistent configuration|console font]] from {{ic|/etc/vconsole.conf}} to the initramfs. || Loads the specified console font from {{ic|/etc/vconsole.conf}} during early userspace.<br />
|-<br />
| {{C|'''encrypt'''}} || {{C|'''sd-encrypt'''}} || Adds the {{ic|dm_crypt}} kernel module and the {{ic|cryptsetup}} tool to the image. You must have {{Pkg|cryptsetup}} installed to use this. {{Note|Take notice of the remarks for the ''keyboard'' hook above to unlock an encrypted device during boot, and/or the filesystem remarks in [[#MODULES]] when you use a file to unlock.}} || Detects and unlocks an encrypted root partition. See [[#Runtime customization]] for further configuration.<br />
For '''sd-encrypt''' see [[dm-crypt/System configuration#Using systemd-cryptsetup-generator]].<br />
|-<br />
|colspan="2" {{C|'''lvm2'''}} || Adds the device mapper kernel module and the {{ic|lvm}} tool to the image. You must have {{Pkg|lvm2}} installed to use this. This is necessary if you have your root file system on [[LVM]]. || {{-}}<br />
|-<br />
|colspan="2" {{C|'''filesystems'''}} || This includes necessary file system modules into your image. This hook is '''required''' unless you specify your file system modules in {{ic|MODULES}}. || {{-}}<br />
|-<br />
|colspan="2" {{C|'''fsck'''}} || Adds the fsck binary and file system-specific helpers to allow running fsck against your root device (and {{ic|/usr}} if separate) prior to mounting. If added after the '''autodetect''' hook, only the helper specific to your root file system will be added. Usage of this hook is '''strongly''' recommended, and it is required with a separate {{ic|/usr}} partition. It is highly recommended that if you include this hook that you also include any necessary modules to ensure your keyboard will work in early userspace. <br/>The use of this hook requires the {{ic|rw}} parameter to be set on the [[kernel command line]] ([https://bbs.archlinux.org/viewtopic.php?pid=1307895#p1307895 discussion]). See [[fsck#Boot time checking]] for more details. || {{-}}<br />
|-<br />
|}<br />
<br />
=== COMPRESSION ===<br />
<br />
The kernel supports several formats for compression of the initramfs: {{Pkg|gzip}}, {{Pkg|bzip2}}, lzma, {{Pkg|xz}}, {{Pkg|lzo}}, {{Pkg|lz4}} and {{Pkg|zstd}}. mkinitcpio uses zstd compressed images by default, note that the zstd compression runs in multi-threading mode (with the {{ic|-T0}} option which spawns as many threads as detected cores).<br />
<br />
The provided {{ic|mkinitcpio.conf}} has the various {{ic|COMPRESSION}} options commented out. Uncomment one if you wish to switch to another compression method and make sure you have the corresponding compression utility installed. If none is specified, the zstd default method is used. If you wish to create an uncompressed image, specify {{ic|1=COMPRESSION='''cat'''}} in the configuration file or use {{ic|-z cat}} on the command line.<br />
<br />
{{Tip|With a compression ratio typically around 2.5 on the image in its high compression mode ({{ic|-9}}), lz4 achieves the fastest decompression speed at the cost of a slower single-threaded compression. For a slightly better compression, lzo is still fast to decompress. zstd offers a versatile solution, with multi-threaded compression and a wide range of compression levels through its options — see {{man|1|zstd|Operation modifiers}}. xz achieves the smallest size with a reduction factor around 5 in its high compression preset ({{ic|-9}}), at the cost of a much slower decompression speed.}}<br />
<br />
=== COMPRESSION_OPTIONS ===<br />
<br />
These are additional flags passed to the program specified by {{ic|COMPRESSION}}, such as:<br />
<br />
COMPRESSION_OPTIONS=(-9)<br />
<br />
This option can be left empty; ''mkinitcpio'' will ensure that any supported compression method has the necessary flags to produce a working image.<br />
<br />
{{Warning|Misuse of this option may lead to an '''unbootable system''' if the kernel is unable to unpack the resultant archive.}}<br />
<br />
With the default zstd compression, to save space for custom kernels (especially with a [[dual boot]] setup when using the EFI system partition as {{ic|/boot}}), the {{ic|--long}} option is very effective. However, systems with limited RAM may not be able to decompress initramfs using this option. The {{ic|-v}} option may also be desired to see details during the initramfs generation. For example:<br />
<br />
COMPRESSION_OPTIONS=(-v -5 --long)<br />
<br />
== Runtime customization ==<br />
<br />
{{Expansion|Which options work with the {{ic|systemd}} hook and which are {{ic|base}}-only?}}<br />
<br />
Runtime configuration options can be passed to {{ic|init}} and certain hooks via the kernel command line. Kernel command-line parameters are often supplied by the boot loader. The options discussed below can be appended to the kernel command line to alter default behavior. See [[Kernel parameters]] and [[Arch boot process]] for more information.<br />
<br />
=== init from base hook ===<br />
<br />
; {{ic|root}}: This is the most important parameter specified on the kernel command line, as it determines what device will be mounted as your proper root device. ''mkinitcpio'' is flexible enough to allow a wide variety of formats, for example: {{bc|1=<nowiki><br />
root=/dev/sda1 # /dev node<br />
root=LABEL=CorsairF80 # label<br />
root=UUID=ea1c4959-406c-45d0-a144-912f4e86b207 # UUID<br />
root=PARTUUID=14420948-2cea-4de7-b042-40f67c618660 # GPT partition UUID</nowiki><br />
}} {{Note|The following boot parameters alter the default behavior of {{ic|init}} in the initramfs environment. See {{ic|/usr/lib/initcpio/init}} for details. They will not work when {{ic|systemd}} hook is being used since the {{ic|init}} from {{ic|base}} hook is replaced.}}<br />
<br />
; {{ic|break}}: If {{ic|break}} or {{ic|1=break=premount}} is specified, {{ic|init}} pauses the boot process (after loading hooks, but before mounting the root file system) and launches an interactive shell which can be used for troubleshooting purposes. This shell can be launched after the root has been mounted by specifying {{ic|1=break=postmount}}. Normal boot continues after exiting from the shell.<br />
<br />
; {{ic|disablehooks}}: Disable hooks at runtime by adding {{ic|1=disablehooks=hook1[,hook2,...]}}. For example: {{bc|1=disablehooks=resume}}<br />
<br />
; {{ic|earlymodules}}: Alter the order in which modules are loaded by specifying modules to load early via {{ic|1=earlymodules=mod1[,mod2,...]}}. (This may be used, for example, to ensure the correct ordering of multiple network interfaces.)<br />
<br />
See [[Boot debugging]] and {{man|8|mkinitcpio}} for other parameters.<br />
<br />
=== Using RAID ===<br />
<br />
See [[RAID#Configure mkinitcpio]].<br />
<br />
=== Using net ===<br />
<br />
{{Note|NFSv4 is not yet supported {{Bug|28287}}.}}<br />
<br />
'''Required packages'''<br />
<br />
{{ic|net}} requires the {{Pkg|mkinitcpio-nfs-utils}} package.<br />
<br />
'''Kernel parameters''' <br />
<br />
Comprehensive and up-to-date information can be found in the official [https://docs.kernel.org/admin-guide/nfs/nfsroot.html kernel documentation].<br />
<br />
'''ip='''<br />
<br />
This parameter tells the kernel how to configure IP addresses of devices and also how to set up the IP routing table. It can take up to nine arguments separated by colons: {{ic|1=ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>:<dns0-ip>:<dns1-ip>:<ntp0-ip>}}.<br />
<br />
If this parameter is missing from the kernel command line, all fields are assumed to be empty, and the defaults mentioned in the [https://docs.kernel.org/admin-guide/nfs/nfsroot.html kernel documentation] apply. In general this means that the kernel tries to configure everything using autoconfiguration.<br />
<br />
The {{ic|<autoconf>}} parameter can appear alone as the value to the {{ic|ip}} parameter (without all the {{ic|:}} characters before). If the value is {{ic|1=ip=off}} or {{ic|1=ip=none}}, no autoconfiguration will take place, otherwise autoconfiguration will take place. The most common way to use this is {{ic|1=ip=dhcp}}.<br />
<br />
For parameters explanation, see the [https://docs.kernel.org/admin-guide/nfs/nfsroot.html kernel documentation].<br />
<br />
Examples:<br />
<br />
ip=127.0.0.1:::::lo:none --> Enable the loopback interface.<br />
ip=192.168.1.1:::::eth2:none --> Enable static eth2 interface.<br />
ip=:::::eth0:dhcp --> Enable dhcp protocol for eth0 configuration.<br />
<br />
{{Note|Make sure to use kernel device names (e.g. {{ic|eth0}}) for the {{ic|<device>}} parameter, the persistent names (e.g. {{ic|enp2s0}}) will not work. See [[Network configuration#Network interfaces]] for details.}}<br />
<br />
'''BOOTIF='''<br />
<br />
If you have multiple network cards, this parameter can include the MAC address of the interface you are booting from. This is often useful as interface numbering may change, or in conjunction with pxelinux IPAPPEND 2 or IPAPPEND 3 option. If not given, {{ic|eth0}} will be used.<br />
<br />
Example:<br />
<br />
BOOTIF=01-A1-B2-C3-D4-E5-F6 # Note the prepended "01-" and capital letters.<br />
<br />
'''nfsroot='''<br />
<br />
If the {{ic|nfsroot}} parameter is NOT given on the command line, the default {{ic|/tftpboot/%s}} will be used.<br />
<br />
nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]<br />
<br />
Run {{ic|mkinitcpio -H net}} for parameter explanation.<br />
<br />
=== Using LVM ===<br />
<br />
If your root device is on [[LVM]], see [[Install Arch Linux on LVM#Adding mkinitcpio hooks]].<br />
<br />
=== Using encrypted root ===<br />
<br />
If using an [[dm-crypt/Encrypting an entire system|encrypted root]] see [[dm-crypt/System configuration#mkinitcpio]] for detailed information on which hooks to include.<br />
<br />
=== /usr as a separate partition ===<br />
<br />
If you keep {{ic|/usr}} as a separate partition, you must adhere to the following requirements:<br />
<br />
* Add the {{ic|fsck}} hook, mark {{ic|/usr}} with a {{ic|passno}} of {{ic|2}} in {{ic|/etc/fstab}} to run the check on the partition at startup. While recommended for everyone, it is mandatory if you want your {{ic|/usr}} partition to be fsck'ed at boot-up. Without this hook, {{ic|/usr}} will never be fsck'd.<br />
* If not using the systemd hook, add the {{ic|usr}} hook. This will mount the {{ic|/usr}} partition after root is mounted.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Extracting the image ===<br />
<br />
If you are curious about what is inside the initramfs image, you can extract it and poke at the files inside of it. <br />
<br />
The initramfs image is an SVR4 CPIO archive, generated via the {{ic|find}} and {{ic|bsdcpio}} commands, optionally compressed with a compression scheme understood by the kernel. For more information on the compression schemes, see [[#COMPRESSION]].<br />
<br />
''mkinitcpio'' includes a utility called {{man|1|lsinitcpio}} which will list and/or extract the contents of initramfs images.<br />
<br />
You can list the files in the image with:<br />
<br />
# lsinitcpio /boot/initramfs-linux.img<br />
<br />
And to extract them all in the current directory:<br />
<br />
# lsinitcpio -x /boot/initramfs-linux.img<br />
<br />
You can also get a more human-friendly listing of the important parts in the image:<br />
<br />
# lsinitcpio -a /boot/initramfs-linux.img<br />
<br />
=== Recompressing a modified extracted image ===<br />
<br />
Invoke the {{ic|build_image}} function of the {{ic|/usr/bin/mkinitcpio}} script with parameters<br />
<br />
build_image ''outfile'' ''compression''<br />
<br />
It can be done by creating a new script with the contents of the {{ic|build_image}} function and running it with the above parameters.<br />
This will compress the contents present in the current directory in a file named {{ic|''outfile''}}.<br />
<br />
{{Warning|It is a good idea to rename the automatically generated {{ic|/boot/initramfs-linux.img}} before you overwrite it, so you can easily undo your changes. Be prepared for making a mistake that prevents your system from booting. If this happens, you will need to boot through the fallback, or a boot CD, to restore your original, run ''mkinitcpio'' to overwrite your changes, or fix them yourself and recompress the image.}}<br />
<br />
=== "/dev must be mounted" when it already is ===<br />
<br />
The test used by ''mkinitcpio'' to determine if {{ic|/dev}} is mounted is to see if {{ic|/dev/fd/}} is there. If everything else looks fine, it can be "created" manually by:<br />
<br />
# ln -s /proc/self/fd /dev/<br />
<br />
(Obviously, {{ic|/proc}} must be mounted as well. ''mkinitcpio'' requires that anyway, and that is the next thing it will check.)<br />
<br />
=== Possibly missing firmware for module XXXX ===<br />
<br />
When initramfs are being rebuilt after a kernel update, you might get warnings:<br />
<br />
==> WARNING: Possibly missing firmware for module: '<nowiki/>''module_name''<nowiki/>'<br />
<br />
If these messages appear when generating a ''default'' initramfs image, then, as the warning says, installing additional firmware may be required. Most common firmware files can be acquired by [[install]]ing the {{Pkg|linux-firmware}} package. For other packages providing firmware see the table below or try searching for the module name in the [[official repositories]] or [[AUR]].<br />
<br />
Otherwise, if the messages only appear when generating the ''fallback'' initramfs image you have the following options:<br />
<br />
* You can safely ignore the warnings, if you know that you do not use the affected hardware.<br />
* If you want to suppress the warnings, you can install the missing firmware. The meta-package {{AUR|mkinitcpio-firmware}} contains most optional firmwares. Alternatively, manually install the needed packages:<br />
:{| class="wikitable"<br />
|-<br />
! Module !! Package<br />
|-<br />
| aic94xx || {{AUR|aic94xx-firmware}}<br />
|-<br />
| ast || {{AUR|ast-firmware}}<br />
|-<br />
| bfa || {{Pkg|linux-firmware-qlogic}}<br />
|-<br />
| bnx2x || {{Pkg|linux-firmware-bnx2x}}<br />
|-<br />
| liquidio || {{Pkg|linux-firmware-liquidio}}<br />
|-<br />
| mlxsw_spectrum || {{Pkg|linux-firmware-mellanox}}<br />
|-<br />
| nfp || {{Pkg|linux-firmware-nfp}}<br />
|-<br />
| qed || {{Pkg|linux-firmware-qlogic}}<br />
|-<br />
| qla1280 || {{Pkg|linux-firmware-qlogic}}<br />
|-<br />
| qla2xxx || {{Pkg|linux-firmware-qlogic}}<br />
|-<br />
| wd719x || {{AUR|wd719x-firmware}}<br />
|-<br />
| xhci_pci || {{AUR|upd72020x-fw}}<br />
|}<br />
* If you want to get rid of the warnings, but do not want to waste your system space on unneeded firmware packages, you can disable fallback initramfs generation altogether:<br />
*# Change {{ic|1=PRESETS=('default' 'fallback')}} line to {{ic|1=PRESETS=('default')}} in all ''.preset'' files in {{ic|/etc/mkinitcpio.d/}}.<br />
*# Remove fallback initramfs images: {{ic|# rm /boot/*-fallback.img}}.<br />
*# Update your [[boot loader]] configuration.<br />
:{{Warning|Disabling fallback initramfs generation will deprive you of another option to boot into the system in case a default initramfs fails. Before proceeding, make sure you have a bootable [[USB flash installation medium|installation medium]] for rescue purposes on hand.}}<br />
<br />
=== No PS/2 controller found ===<br />
<br />
On some motherboards (mostly ancient ones, but also a few new ones), the i8042 controller cannot be automatically detected. It is rare, but some people will surely be without keyboard. You can detect this situation in advance. If you have a PS/2 port and get {{ic|i8042: PNP: No PS/2 controller found. Probing ports directly}} message, add '''atkbd''' to the {{ic|MODULES}} array.<br />
<br />
=== Standard rescue procedures ===<br />
<br />
With an improper initial ram-disk a system often is unbootable. So follow a system rescue procedure like below:<br />
<br />
==== Boot succeeds on one machine and fails on another ====<br />
<br />
''mkinitcpio'''s {{ic|autodetect}} hook filters unneeded [[kernel modules]] in the primary initramfs scanning {{ic|/sys}} and the modules loaded at the time it is run. If you transfer your {{ic|/boot}} directory to another machine and the boot sequence fails during early userspace, it may be because the new hardware is not detected due to missing kernel modules. Note that USB 2.0 and 3.0 need different kernel modules. <br />
<br />
To fix, first try choosing the [[#Image creation and activation|fallback]] image from your [[boot loader]], as it is not filtered by {{ic|autodetect}}. Once booted, run ''mkinitcpio'' on the new machine to rebuild the primary image with the correct modules. If the fallback image fails, try booting into an Arch Linux live CD/USB, chroot into the installation, and run ''mkinitcpio'' on the new machine. As a last resort, try [[#MODULES|manually]] adding modules to the initramfs.<br />
<br />
== See also ==<br />
<br />
* Linux Kernel documentation on [https://docs.kernel.org/filesystems/ramfs-rootfs-initramfs.html#what-is-rootfs initramfs, "What is rootfs?"]<br />
* Linux Kernel documentation on [https://docs.kernel.org/admin-guide/initrd.html initrd]<br />
* Wikipedia article on [[wikipedia:initrd|initrd]]</div>Pdchttps://wiki.archlinux.org/index.php?title=Network_configuration&diff=776105Network configuration2023-04-22T19:47:36Z<p>Pdc: /* Network managers */ dhcpcd man page is in Section 8</p>
<hr />
<div>[[Category:Network configuration]]<br />
[[es:Network configuration]]<br />
[[fi:Network configuration]]<br />
[[it:Network configuration]]<br />
[[ja:ネットワーク設定]]<br />
[[pt:Network configuration]]<br />
[[ru:Network configuration]]<br />
[[zh-hans:Network configuration]]<br />
{{Related articles start}}<br />
{{Related|Network Debugging}}<br />
{{Related|Firewalls}}<br />
{{Related|Internet sharing}}<br />
{{Related|Router}}<br />
{{Related articles end}}<br />
<br />
This article describes how to configure network connections on [[Wikipedia:OSI layer 3|OSI layer 3]] and above. Medium-specifics are handled in the [[/Ethernet]] and [[/Wireless]] subpages.<br />
<br />
== Check the connection ==<br />
<br />
To troubleshoot a network connection, go through the following conditions and ensure that you meet them:<br />
<br />
# Your [[#Network interfaces|network interface]] is listed and enabled. Otherwise, check the device driver – see [[/Ethernet#Device driver]] or [[/Wireless#Device driver]].<br />
# You are connected to the network. The cable is plugged in or you are [[/Wireless|connected to the wireless LAN]].<br />
# Your network interface has an [[#IP addresses|IP address]].<br />
# Your [[#Routing table|routing table]] is correctly set up.<br />
# You can [[#Ping|ping]] a local IP address (e.g. your default gateway).<br />
# You can [[#Ping|ping]] a public IP address (e.g. {{ic|9.9.9.9}}, which is a DNS server operated by the Quad9 Foundation and is a convenient address to test with).<br />
# [[Domain name resolution#Resolve a domain name using NSS|Check if you can resolve domain names]] (e.g. {{ic|archlinux.org}}).<br />
<br />
=== Ping ===<br />
<br />
[[Wikipedia:Ping (networking utility)|ping]] is used to test if you can reach a host.<br />
<br />
{{hc|$ ping www.example.com|2=<br />
PING www.example.com (93.184.216.34): 56(84) data bytes<br />
64 bytes from 93.184.216.34: icmp_seq=0 ttl=56 time=11.632 ms<br />
64 bytes from 93.184.216.34: icmp_seq=1 ttl=56 time=11.726 ms<br />
64 bytes from 93.184.216.34: icmp_seq=2 ttl=56 time=10.683 ms<br />
...<br />
}}<br />
<br />
For every reply received, the ''ping'' utility will print a line like the above until you interrupt ({{ic|Ctrl+c}}) it interactively. For more information see the {{man|8|ping}} manual. Note that computers can be configured not to respond to ICMP echo requests. [https://unix.stackexchange.com/questions/412446/how-to-disable-ping-response-icmp-echo-in-linux-all-the-time]<br />
<br />
If you receive an error message (see [[Wikipedia:Ping (networking utility)#Error indications|ping error indications]]) or no reply, this may be related to incomplete configuration, but also your default gateway or your Internet Service Provider (ISP). You can run a [[traceroute]] to further diagnose the route to the host.<br />
<br />
== Network management ==<br />
<br />
To set up a network connection, go through the following steps:<br />
<br />
# Ensure your [[#Network interfaces|network interface]] is listed and enabled.<br />
# Connect to the network. Plug in the Ethernet cable or [[/Wireless|connect to the wireless LAN]].<br />
# Configure your network connection:<br />
#* [[#Static IP address|static IP address]]<br />
#* dynamic IP address: use [[#DHCP|DHCP]]<br />
<br />
{{Note|The installation image uses<br />
* [[systemd-networkd]], which is configured as a DHCP client for [https://gitlab.archlinux.org/archlinux/archiso/-/blob/master/configs/releng/airootfs/etc/systemd/network/20-ethernet.network Ethernet], [https://gitlab.archlinux.org/archlinux/archiso/-/blob/master/configs/releng/airootfs/etc/systemd/network/20-wlan.network WLAN] and [https://gitlab.archlinux.org/archlinux/archiso/-/blob/master/configs/releng/airootfs/etc/systemd/network/20-wwan.network WWAN] network interfaces, and <br />
* [[systemd-resolved]] configured for system-wide [[DNS]], see [[systemd-resolved#DNS]].}}<br />
<br />
=== iproute2 ===<br />
<br />
[[Wikipedia:iproute2|iproute2]] is a dependency of the {{Pkg|base}} [[meta package]] and provides the {{man|8|ip}} command-line interface, used to manage [[#Network interfaces|network interfaces]], [[#IP addresses|IP addresses]] and the [[#Routing table|routing table]]. Be aware that configuration made using {{ic|ip}} will be lost after a reboot. For persistent configuration, you can use a [[network manager]] or automate ''ip'' commands using scripts and [[systemd#Writing unit files|systemd units]]. Also note that {{ic|ip}} commands can generally be abbreviated, for clarity they are however spelled out in this article.<br />
<br />
{{Note|Arch Linux has deprecated {{Pkg|net-tools}} in favor of {{Pkg|iproute2}}.[https://archlinux.org/news/deprecation-of-net-tools/] See also [https://dougvitale.wordpress.com/2011/12/21/deprecated-linux-networking-commands-and-their-replacements/ Deprecated Linux networking commands and their replacements].}}<br />
<br />
=== Network interfaces ===<br />
<br />
By default [[udev]] assigns names to your [[Wikipedia:Network interface controller|network interface controllers]] using [https://systemd.io/PREDICTABLE_INTERFACE_NAMES/ Predictable Network Interface Names], which prefixes interfaces names with {{ic|en}} (wired/[[Wikipedia:Ethernet|Ethernet]]), {{ic|wl}} (wireless/[[Wikipedia:Wireless LAN|WLAN]]), or {{ic|ww}} ([[Wikipedia:Wireless WAN|WWAN]]). See {{man|7|systemd.net-naming-scheme}}.<br />
<br />
{{Tip|To change interface names, see [[#Change interface name]] and [[#Revert to traditional interface names]].}}<br />
<br />
==== Listing network interfaces ====<br />
<br />
Both wired and wireless interface names can be found via {{ic|ls /sys/class/net}} or {{ic|ip link}}. Note that {{ic|lo}} is the [[Wikipedia:Loopback#Virtual loopback interface|virtual loopback interface]] and not used in making network connections.<br />
<br />
Wireless device names can also be retrieved using {{ic|iw dev}}. See also [[/Wireless#Get the name of the interface]].<br />
<br />
If your network interface is not listed, make sure your device driver was loaded successfully. See [[/Ethernet#Device driver]] or [[/Wireless#Device driver]].<br />
<br />
==== Enabling and disabling network interfaces ====<br />
<br />
Network interfaces can be enabled or disabled using {{ic|ip link set ''interface'' up{{!}}down}}, see {{man|8|ip-link}}.<br />
<br />
To check the status of the interface {{ic|enp2s0}}:<br />
<br />
{{hc|$ ip link show dev enp2s0|<br />
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state DOWN mode DEFAULT qlen 1000<br />
...<br />
}}<br />
<br />
The {{ic|UP}} in {{ic|<BROADCAST,MULTICAST,UP,LOWER_UP>}} is what indicates the interface is up, not the later {{ic|state DOWN}}.<br />
<br />
{{Note|If your default route is through interface {{ic|enp2s0}}, taking it down will also remove the route, and bringing it back up will not automatically re-establish the default route. See [[#Routing table]] for re-establishing it.}}<br />
<br />
=== Static or dynamic IP address? ===<br />
<br />
{{Style|Too convoluted.}}<br />
<br />
If you are using a Wi-FI or a router, for example, at home, you will most likely be using a dynamic IP address. The IP address is assigned by the Wi-Fi or router and it is what your computer should be configured to use. Or, if you are at home and your computer is connected to your ISP's modem, for example, a cable modem, that will also be using a dynamic IP address. Dynamic IP addresses can change each time you turn your computer on. In a work environment you may have a static IP address or a dynamic IP address. At home you can configure your router to always assign your computer the same IP address in which case you are using a static IP address. When you are using a dynamic IP address you will need to use DHCP so that it can set up your network interface with the correct IP address. In addition to configuring your IP address, DHCP can also configure your routing (how to get from where you are to wherever on the network you are going) as well as your name servers, which convert the host name, for example, google.com, into its IP address, that number with dots in it.<br />
<br />
=== Static IP address ===<br />
<br />
A static IP address can be configured with most standard [[#Network managers|network managers]] and also [[dhcpcd]].<br />
<br />
To manually configure a static IP address, add an IP address as described in [[#IP addresses]], set up your [[#Routing table|routing table]] and [[Domain name resolution|configure your DNS servers]].<br />
<br />
=== IP addresses ===<br />
<br />
[[Wikipedia:IP address|IP addresses]] are managed using {{man|8|ip-address}}.<br />
<br />
List IP addresses:<br />
<br />
$ ip address show<br />
<br />
Add an IP address to an interface:<br />
<br />
# ip address add ''address/prefix_len'' broadcast + dev ''interface''<br />
<br />
:Note that:<br />
<br />
:* the address is given in [[Wikipedia:Classless Inter-Domain Routing#CIDR notation|CIDR notation]] to also supply a [[Wikipedia:Subnetwork|subnet mask]]<br />
:* {{ic|+}} is a special symbol that makes {{ic|ip}} derive the [[Wikipedia:Broadcast address|broadcast address]] from the IP address and the subnet mask<br />
<br />
:{{Note|Make sure manually assigned IP addresses do not conflict with DHCP assigned ones.}}<br />
<br />
Delete an IP address from an interface:<br />
<br />
# ip address del ''address/prefix_len'' dev ''interface''<br />
<br />
Delete all addresses matching a criteria, e.g. of a specific interface:<br />
<br />
# ip address flush dev ''interface''<br />
<br />
{{Tip|IP addresses can be calculated with [http://jodies.de/ipcalc ipcalc] ({{Pkg|ipcalc}}).}}<br />
<br />
=== Routing table ===<br />
<br />
The [[Wikipedia:Routing table|routing table]] is used to determine if you can reach an IP address directly or what gateway (router) you should use. If no other route matches the IP address, the [[Wikipedia:Default gateway|default gateway]] is used.<br />
<br />
The routing table is managed using {{man|8|ip-route}}.<br />
<br />
''PREFIX'' is either a CIDR notation or {{ic|default}} for the default gateway.<br />
<br />
List IPv4 routes:<br />
<br />
$ ip route show<br />
<br />
List IPv6 routes:<br />
<br />
$ ip -6 route<br />
<br />
Add a route:<br />
<br />
# ip route add ''PREFIX'' via ''address'' dev ''interface''<br />
<br />
Delete a route:<br />
<br />
# ip route del ''PREFIX'' via ''address'' dev ''interface''<br />
<br />
=== DHCP ===<br />
<br />
A [[Wikipedia:Dynamic Host Configuration Protocol|Dynamic Host Configuration Protocol]] (DHCP) server provides clients with a dynamic or static IP address, the subnet mask, the default gateway IP address and optionally also with DNS name servers.<br />
<br />
To use DHCP you need a DHCP server in your network and a DHCP client:<br />
<br />
{| class="wikitable"<br />
! Client !! Package !! [[Archiso]] !! Note !! Systemd units<br />
|-<br />
| [[dhcpcd]] || {{Pkg|dhcpcd}} || {{Yes}} || DHCP, DHCPv6, ZeroConf, static IP || {{ic|dhcpcd.service}}, {{ic|dhcpcd@''interface''.service}}<br />
|-<br />
| [https://www.isc.org/downloads/dhcp/ ISC dhclient] || {{Pkg|dhclient}} || {{Yes}} || DHCP, DHCPv6, BOOTP, static IP || {{ic|dhclient@''interface''.service}}<br />
|}<br />
<br />
{{Note|<br />
* ISC has ended development on the ISC DHCP client as of early 2022. This client implementation is no longer maintained and should not be used in production any longer.<br />
* You should not run two DHCP clients simultaneously.<br />
* Instead of directly using a standalone DHCP client you can also use a [[#Network managers|network manager]], some of which have a built-in DHCP client.<br />
* Alternatively, [[iwd]] has a built-in DHCP client that can be used with some configuration: [[iwd#Enable built-in network configuration]].<br />
}}<br />
<br />
{{Tip|<br />
* You can check if a DHCP server is running with {{Pkg|dhcping}}.<br />
* While waiting for an IP to be assigned you can run something like {{ic|watch -n 1 ping -c 1 archlinux.org}} to confirm that the network is connected.<br />
}}<br />
<br />
==== Servers ====<br />
<br />
{| class="wikitable"<br />
! Server !! DHCPv4 !! DHCPv6 !! IPv6 Router Advertisement !! GUI !! Interfaces !! Storage backend(s) !! Note<br />
|-<br />
| [[dhcpd]] || {{Yes}} || {{Yes}} || {{No}} || [https://github.com/Akkadius/glass-isc-dhcp Glass-ISC-DHCP] || ? || File || Superseded by Kea.<br />
|-<br />
| [[dnsmasq]] || {{Yes}} || {{Yes}} || {{Yes}} || {{No}} || ? || File || Also DNS, PXE and TFTP.<br />
|-<br />
| {{Pkg|kea}} || {{Yes}} || {{Yes}} || {{No}} || [https://github.com/isc-projects/stork Stork] || REST, RADIUS, NETCONF || File, MySQL, PostgreSQL, Cassandra || Also DNS. Supersedes dhcpd.<br />
|-<br />
| [[systemd-networkd]] || {{Yes}} || {{No|https://github.com/systemd/systemd/issues/16039}} || {{Yes}} || {{No}} || ? || File || Installed with systemd.<br />
|}<br />
<br />
=== Network managers ===<br />
<br />
A network manager lets you manage network connection settings in so called network profiles to facilitate switching networks.<br />
<br />
{{Note|There are many solutions to choose from, but remember that all of them are mutually exclusive; you should not run two daemons simultaneously.}}<br />
<br />
{| class="wikitable"<br />
! Network manager || GUI || [[Archiso]] [https://gitlab.archlinux.org/archlinux/archiso/-/blob/master/configs/releng/packages.x86_64] || CLI tools || [[Wikipedia:Point-to-Point Protocol|PPP]] support <br>(e.g. [[Mobile broadband modem|3G modem]]) || [[#DHCP|DHCP client]] || systemd units <br />
|-<br />
! [[ConnMan]]<br />
| {{Y|8 unofficial}} || {{No}} || {{man|1|connmanctl}} || {{Yes}} (with {{AUR|ofono}}) || internal || {{ic|connman.service}}<br />
|-<br />
! [[dhcpcd]]<br />
| {{Y|8 unofficial}} || {{Yes}} || {{man|8|dhcpcd}} || {{Yes}} (with {{Pkg|ppp}}) || internal || {{ic|dhcpcd.service}}, {{ic|netctl-auto@''interface''.service}}<br />
|-<br />
! [[netctl]]<br />
| {{Y|2 unofficial}} || {{No}} || {{man|1|netctl}}, wifi-menu || {{Yes}} || [[dhcpcd]] or {{Pkg|dhclient}} || {{ic|netctl-ifplugd@''interface''.service}}, {{ic|netctl-auto@''interface''.service}}<br />
|-<br />
! [[NetworkManager]]<br />
| {{Yes}} || {{No|https://gitlab.archlinux.org/archlinux/archiso/-/issues/187}} || {{man|1|nmcli}}, {{man|1|nmtui}} || {{Yes}} || internal or {{Pkg|dhclient}} || {{ic|NetworkManager.service}}<br />
|-<br />
! [[systemd-networkd]]<br />
| {{No}} || {{Yes}} ({{Pkg|base}}) || {{man|1|networkctl}} || {{No|https://github.com/systemd/systemd/issues/481}} || internal || {{ic|systemd-networkd.service}}, {{ic|systemd-resolved.service}}<br />
|}<br />
<br />
== Set the hostname ==<br />
<br />
{{Style|The {{ic|''myhostname''}} pseudo-variable may cause confusion since that name is also used by {{man|8|nss-myhostname}}.|section=myhostname → yourhostname}}<br />
<br />
A [[Wikipedia:Hostname|hostname]] is a unique name created to identify a machine on a network, configured in {{ic|/etc/hostname}}—see {{man|5|hostname}} and {{man|7|hostname}} for details. The file can contain the system's domain name, if any. To set the hostname, [[textedit|edit]] {{ic|/etc/hostname}} to include a single line with {{ic|''myhostname''}}:<br />
<br />
{{hc|/etc/hostname|<br />
''myhostname''<br />
}}<br />
<br />
{{Tip|For advice on choosing a hostname, see [[RFC:1178|RFC 1178]].}}<br />
<br />
Alternatively, using {{man|1|hostnamectl}}:<br />
<br />
# hostnamectl set-hostname ''myhostname''<br />
<br />
To temporarily set the hostname (until reboot), use {{man|1|hostname}} from {{Pkg|inetutils}}:<br />
<br />
# hostname ''myhostname''<br />
<br />
To set the "pretty" hostname and other machine metadata, see {{man|5|machine-info}}.<br />
<br />
=== Local network hostname resolution ===<br />
<br />
To make your machine accessible in your LAN via its hostname you can:<br />
<br />
* edit the {{ic|/etc/hosts}} file for every device in your LAN, see {{man|5|hosts}}<br />
* set up a [[DNS server]] to resolve your hostname and make the LAN devices use it (e.g. via [[#DHCP]])<br />
* or the easy way: use a [[Wikipedia:Zero-configuration networking|Zero-configuration networking]] service:<br />
** Hostname resolution via Microsoft's [[Wikipedia:NetBIOS#Name service|NetBIOS]]. Provided by [[Samba]] on Linux. It only requires the {{ic|nmb.service}}. Computers running Windows, macOS, or Linux with {{ic|nmb}} running, will be able to find your machine.<br />
** Hostname resolution via [[Wikipedia:Multicast DNS|mDNS]]. Provided by either {{ic|nss_mdns}} with [[Avahi]] (see [[Avahi#Hostname resolution]] for setup details) or [[systemd-resolved]]. Computers running macOS, or Linux with Avahi or systemd-resolved running, will be able to find your machine. The older Win32 API does not support mDNS, which may prevent some older Windows applications from accessing your device.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Change interface name ===<br />
<br />
{{Note|When changing the naming scheme, do not forget to update all network-related configuration files and custom systemd unit files to reflect the change.}}<br />
<br />
You can change the device name by defining the name manually with an {{man|5|systemd.link}} file. For example:<br />
<br />
{{hc|/etc/systemd/network/10-net0.link|2=<br />
[Match]<br />
PermanentMACAddress=aa:bb:cc:dd:ee:ff<br />
<br />
[Link]<br />
Name=net0<br />
}}<br />
<br />
Alternatively, a udev rule can be used:<br />
<br />
{{hc|/etc/udev/rules.d/10-network.rules|2=<br />
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="aa:bb:cc:dd:ee:ff", NAME="net0"<br />
}}<br />
<br />
These rules will be applied automatically at boot. To apply the change immediately, do a manual trigger of the udev rule on the {{ic|net}} subsystem:<br />
<br />
# udevadm trigger --verbose --subsystem-match=net --action=add<br />
<br />
If you want to run a [[udev#Testing rules before loading|test]] on the changes made, {{ic|udevadm --debug test /sys/class/net/*}} can be of help.<br />
<br />
{{Note|<br />
* The priority of {{ic|Name}} is lower than {{ic|NamePolicy}}, so make sure the latter is unset/empty or the name will not be changed. {{ic|99-default.link}} sets {{ic|NamePolicy}}, requiring the custom config to be ordered before it, i.e. to have a numerical prefix.<br />
* The network interface must be down before changing its name. [https://github.com/systemd/systemd/issues/26601]<br />
* To get the MAC address of each card, run {{ic|ip link}}.<br />
* Make sure to use the lower-case hex values in your udev rules. It does not like upper-case.<br />
}}<br />
<br />
If the network card has a dynamic MAC, you can use {{ic|Path}} (which can be checked using {{ic|networkctl status ''interface_name''}}):<br />
<br />
{{hc|/etc/systemd/network/10-net1.link|2=<br />
[Match]<br />
Path=pci-0000:01:00.0<br />
<br />
[Link]<br />
Name=net1<br />
}}<br />
<br />
Or, use a udev rule with {{ic|DEVPATH}}:<br />
<br />
{{hc|/etc/udev/rules.d/10-network.rules|2=<br />
SUBSYSTEM=="net", DEVPATH=="/devices/pci*/*1c.0/*/net/*", NAME="net1"<br />
}}<br />
<br />
To get the {{ic|DEVPATH}} of all currently-connected devices, see where the symlinks in {{ic|/sys/class/net/}} lead. For example:<br />
<br />
{{hc|file /sys/class/net/*|<br />
/sys/class/net/enp0s20f0u4u1: symbolic link to ../../devices/pci0000:00/0000:00:14.0/usb2/2-4/2-4.1/2-4.1:1.0/net/enp0s20f0u4u1<br />
/sys/class/net/enp0s31f6: symbolic link to ../../devices/pci0000:00/0000:00:1f.6/net/enp0s31f6<br />
/sys/class/net/lo: symbolic link to ../../devices/virtual/net/lo<br />
/sys/class/net/wlp4s0: symbolic link to ../../devices/pci0000:00/0000:00:1c.6/0000:04:00.0/net/wlp4s0<br />
}}<br />
<br />
The device path should match both the new and old device name, since the rule may be executed more than once on bootup. For example, in the given rule, {{ic|"/devices/pci*/*1c.0/*/net/en*"}} would be wrong since it will stop matching once the name is changed to {{ic|net1}}. Only the system-default rule will fire the second time around, causing the name to be changed back.<br />
<br />
If you are using a USB network device (e.g. Android phone tethering) that has a dynamic MAC address and you want to be able to use different USB ports, you could use a rule that matched depending on vendor and model ID instead:<br />
<br />
{{hc|/etc/systemd/network/20-net2.link|2=<br />
[Match]<br />
Property=ID_VENDOR_ID=12ab ID_MODEL_ID=3cd4<br />
<br />
[Link]<br />
Name=net2<br />
}}<br />
<br />
or<br />
<br />
{{hc|/etc/udev/rules.d/10-network.rules|2=<br />
SUBSYSTEM=="net", ACTION=="add", ATTRS{idVendor}=="12ab", ATTRS{idProduct}=="3cd4", NAME="net2"<br />
}}<br />
<br />
{{Note|When choosing the static names '''it should be avoided to use names in the format of "eth''X''" and "wlan''X''"''', because this may lead to race conditions between the kernel and udev during boot. Instead, it is better to use interface names that are not used by the kernel as default, e.g.: {{ic|net0}}, {{ic|net1}}, {{ic|wifi0}}, {{ic|wifi1}}. For further details please see the [https://systemd.io/PREDICTABLE_INTERFACE_NAMES/ systemd] documentation.}}<br />
<br />
=== Revert to traditional interface names ===<br />
<br />
If you would prefer to retain traditional interface names such as {{ic|eth0}}, [https://systemd.io/PREDICTABLE_INTERFACE_NAMES/ Predictable Network Interface Names] can be disabled by changing the default {{ic|NamePolicy}} for udev's {{ic|net_setup_link}} built-in:<br />
<br />
{{hc|/etc/systemd/network/99-default.link.d/traditional-naming.conf|2=<br />
[Link]<br />
NamePolicy=keep kernel<br />
}}<br />
<br />
Alternatively, {{ic|net_setup_link}} can be completely disabled by masking the corresponding udev rule:<br />
<br />
# ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules<br />
<br />
or by adding {{ic|1=net.ifnames=0}} to the [[kernel parameters]].<br />
<br />
{{Warning|{{man|5|systemd.link}} relies on {{ic|net_setup_link}} to work. Prefer to use the first approach unless you fully understand what you're doing.}}<br />
<br />
=== Set device MTU and queue length ===<br />
<br />
You can change the device [[wikipedia:Maximum transmission unit|MTU]] and queue length by defining manually with a {{man|5|systemd.link}} config. For example:<br />
<br />
{{hc|/etc/systemd/network/30-mtu.link|2=<br />
[Match]<br />
Type=wlan<br />
<br />
[Link]<br />
MTUBytes=1500<br />
TransmitQueueLength=2000<br />
}}<br />
<br />
Or through a udev rule:<br />
<br />
{{hc|/etc/udev/rules.d/10-network.rules|2=<br />
ACTION=="add", SUBSYSTEM=="net", KERNEL=="wl*", ATTR{mtu}="1500", ATTR{tx_queue_len}="2000"<br />
}}<br />
<br />
{{ic|MTUBytes}}: Using a value larger than 1500 (so called [[Wikipedia:jumbo frame|jumbo frame]]s) can significantly speed up your network transfers. Note that all network interfaces, including switches in the local network, must support the same MTU in order to use jumbo frames. For PPPoE, the MTU should not be larger than 1492. You can also set MTU via {{man|5|systemd.netdev}}.<br />
<br />
{{ic|TransmitQueueLength}}: Small value for slower devices with a high latency like modem links and ISDN. High value is recommended for server connected over the high-speed internet connections that perform large data transfers.<br />
<br />
=== Bonding or LAG ===<br />
<br />
See [[netctl#Bonding|netctl]] or [[systemd-networkd#Bonding a wired and wireless interface|systemd-networkd]], or [[Wireless bonding]].<br />
<br />
=== IP address aliasing ===<br />
<br />
IP aliasing is the process of adding more than one IP address to a network interface. With this, one node on a network can have multiple connections to a network, each serving a different purpose. Typical uses are virtual hosting of Web and FTP servers, or reorganizing servers without having to update any other machines (this is especially useful for nameservers).<br />
<br />
==== Example ====<br />
<br />
To manually set an alias, for some NIC, use {{Pkg|iproute2}} to execute<br />
<br />
# ip addr add 192.168.2.101/24 dev enp2s0 label enp2s0:1<br />
<br />
To remove a given alias execute<br />
<br />
# ip addr del 192.168.2.101/24 dev enp2s0:1<br />
<br />
Packets destined for a subnet will use the primary alias by default. If the destination IP is within a subnet of a secondary alias, then the source IP is set respectively. Consider the case where there is more than one NIC, the default routes can be listed with {{ic|ip route}}.<br />
<br />
=== Promiscuous mode ===<br />
<br />
Toggling [[wikipedia:Promiscuous mode|promiscuous mode]] will make a (wireless) NIC forward all traffic it receives to the OS for further processing. This is opposite to "normal mode" where a NIC will drop frames it is not intended to receive. It is most often used for advanced network troubleshooting and [[wikipedia:Packet sniffing|packet sniffing]].<br />
<br />
{{hc|/etc/systemd/system/promiscuous@.service|<nowiki><br />
[Unit]<br />
Description=Set %i interface in promiscuous mode<br />
After=network.target<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/ip link set dev %i promisc on<br />
RemainAfterExit=yes<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
If you want to enable promiscuous mode on interface {{ic|enp2s0}}, [[enable]] {{ic|promiscuous@enp2s0.service}}.<br />
<br />
=== Investigate sockets ===<br />
<br />
''ss'' is a utility to investigate network ports and is part of the {{Pkg|iproute2}} package. It has a similar functionality to the [https://archlinux.org/news/deprecation-of-net-tools/ deprecated] netstat utility. <br />
<br />
Common usage includes:<br />
<br />
Display all TCP Sockets with service names:<br />
$ ss -at<br />
<br />
Display all TCP Sockets with port numbers:<br />
$ ss -atn<br />
<br />
Display all UDP Sockets:<br />
$ ss -au<br />
<br />
For more information see {{man|8|ss}}.<br />
<br />
== Troubleshooting ==<br />
<br />
=== The TCP window scaling problem ===<br />
<br />
TCP packets contain a "window" value in their headers indicating how much data the other host may send in return. This value is represented with only 16 bits, hence the window size is at most 64KiB. TCP packets are cached for a while (they have to be reordered), and as memory is (or used to be) limited, one host could easily run out of it.<br />
<br />
Back in 1992, as more and more memory became available, [[RFC:1323]] was written to improve the situation: Window Scaling. The "window" value, provided in all packets, will be modified by a Scale Factor defined once, at the very beginning of the connection. That 8-bit Scale Factor allows the Window to be up to 32 times higher than the initial 64KiB.<br />
<br />
It appears that some broken routers and firewalls on the Internet are rewriting the Scale Factor to 0 which causes misunderstandings between hosts. The Linux kernel 2.6.17 introduced a new calculation scheme generating higher Scale Factors, virtually making the aftermaths of the broken routers and firewalls more visible.<br />
<br />
The resulting connection is at best very slow or broken.<br />
<br />
==== How to diagnose the problem ====<br />
<br />
First of all, let us make it clear: this problem is odd. In some cases, you will not be able to use TCP connections (HTTP, FTP, ...) at all and in others, you will be able to communicate with some hosts (very few).<br />
<br />
When you have this problem, the output from [[dmesg]] is okay, logs are clean and {{ic|ip addr}} will report normal status... and actually everything appears normal.<br />
<br />
If you cannot browse any website, but you can ping some random hosts, chances are great that you are experiencing this problem: ping uses ICMP and is not affected by TCP problems.<br />
<br />
You can try to use [[Wireshark]]. You might see successful UDP and ICMP communications but unsuccessful TCP communications (only to foreign hosts).<br />
<br />
==== Ways of fixing it ====<br />
<br />
===== Bad =====<br />
<br />
To fix it the bad way, you can change the {{ic|tcp_rmem}} value, on which Scale Factor calculation is based. Although it should work for most hosts, it is not guaranteed, especially for very distant ones.<br />
<br />
# echo "4096 87380 174760" > /proc/sys/net/ipv4/tcp_rmem<br />
<br />
===== Good =====<br />
<br />
Simply disable Window Scaling. Since Window Scaling is a nice TCP feature, it may be uncomfortable to disable it, especially if you cannot fix the broken router. There are several ways to disable Window Scaling, and it seems that the most bulletproof way (which will work with most kernels) is to add the following line to {{ic|/etc/sysctl.d/99-disable_window_scaling.conf}} (see also [[sysctl]]):<br />
<br />
net.ipv4.tcp_window_scaling = 0<br />
<br />
===== Best =====<br />
<br />
This problem is caused by broken routers/firewalls, so let us change them. Some users have reported that the broken router was their very own DSL router.<br />
<br />
==== More about it ====<br />
<br />
This section is based on the LWN article [https://lwn.net/Articles/92727/ TCP window scaling and broken routers] and an archived Kernel Trap article: [https://web.archive.org/web/20120426135627/http://kerneltrap.org:80/node/6723 Window Scaling on the Internet].<br />
<br />
There are also several relevant threads on the LKML.<br />
<br />
=== Connected second PC unable to use bridged LAN ===<br />
<br />
First PC have two LAN. Second PC have one LAN and connected to first PC. Lets go second PC to give all access to LAN after bridged interface:<br />
<br />
{{Expansion|Explain what the settings actually do.}}<br />
<br />
# sysctl net.bridge.bridge-nf-filter-pppoe-tagged=0<br />
# sysctl net.bridge.bridge-nf-filter-vlan-tagged=0<br />
# sysctl net.bridge.bridge-nf-call-ip6tables=0<br />
# sysctl net.bridge.bridge-nf-call-iptables=0<br />
# sysctl net.bridge.bridge-nf-call-arptables=0<br />
<br />
=== localhost is resolved over the network ===<br />
<br />
{{man|8|nss-myhostname}} (an [[Name Service Switch|NSS]] module provided by [[systemd]] and enabled by default in {{ic|/etc/nsswitch.conf}}) provides {{ic|localhost}} and the local hostname resolution to an IP address. Some software may, however, still instead read {{ic|/etc/hosts}} directly; see [https://lists.debian.org/debian-devel/2013/07/msg00809.html] [https://bugzilla.mozilla.org/show_bug.cgi?id=87717#c55] for examples.<br />
<br />
To prevent such software from unsafely resolving localhost over the network, add entries for {{ic|localhost}} to the {{man|5|hosts}} file:<br />
<br />
{{hc|/etc/hosts|<br />
127.0.0.1 localhost<br />
::1 localhost<br />
}}<br />
<br />
{{Note|Report any software affected by this issue in {{Bug|56684}}. This may help in getting {{ic|localhost}} entries added to the default {{ic|/etc/hosts}}.}}<br />
<br />
To allow resolving the local hostname, additionally add it to the {{man|5|hosts}} file:<br />
<br />
{{hc|/etc/hosts|<br />
127.0.0.1 localhost<br />
::1 localhost<br />
127.0.1.1 ''myhostname''<br />
}}<br />
<br />
For a system with a permanent IP address, replace {{ic|127.0.1.1}} with that permanent IP address. For a system with a [[Wikipedia:Fully qualified domain name|fully qualified domain name]], insert the fully qualified domain name before the hostname (see the following link for [https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_hostname_resolution the reasoning]). For example:<br />
<br />
{{hc|/etc/hosts|<br />
127.0.0.1 localhost<br />
::1 localhost<br />
203.0.113.45 host1.fqdomain.example host1<br />
}}<br />
<br />
{{Note|The order of hostnames/aliases that follow the IP address in {{ic|/etc/hosts}} is significant. The first string is considered the canonical hostname and may be appended with parent domains, where domain components are separated by a dot. All following strings on the same line are considered aliases. See {{man|5|hosts}} for more info.}}<br />
<br />
As a result the system resolves to both entries: <br />
<br />
{{hc|$ getent hosts|<br />
127.0.0.1 localhost<br />
127.0.0.1 localhost<br />
127.0.1.1 ''myhostname''<br />
}}<br />
<br />
== See also ==<br />
<br />
* [https://www.tldp.org/LDP/nag2/index.html Linux Network Administrators Guide]<br />
* [https://www.debian.org/doc/manuals/debian-reference/ch05.en.html Debian Reference: Network setup]<br />
* [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/ RHEL7: Networking Guide]<br />
* [https://blog.packagecloud.io/eng/2016/06/22/monitoring-tuning-linux-networking-stack-receiving-data/ Monitoring and tuning the Linux Networking Stack: Receiving data]<br />
* [https://blog.packagecloud.io/eng/2017/02/06/monitoring-tuning-linux-networking-stack-sending-data/ Monitoring and tuning the Linux Networking Stack: Sending data]<br />
* [https://blog.yadutaf.fr/2017/07/28/tracing-a-packet-journey-using-linux-tracepoints-perf-ebpf/ Tracing a packet journey using tracepoints, perf and eBPF]</div>Pdchttps://wiki.archlinux.org/index.php?title=Network_configuration&diff=774285Network configuration2023-03-31T13:17:50Z<p>Pdc: /* Servers */ Fix package for systemd-networkd</p>
<hr />
<div>[[Category:Network configuration]]<br />
[[es:Network configuration]]<br />
[[fi:Network configuration]]<br />
[[it:Network configuration]]<br />
[[ja:ネットワーク設定]]<br />
[[pt:Network configuration]]<br />
[[ru:Network configuration]]<br />
[[zh-hans:Network configuration]]<br />
{{Related articles start}}<br />
{{Related|Network Debugging}}<br />
{{Related|Firewalls}}<br />
{{Related|Internet sharing}}<br />
{{Related|Router}}<br />
{{Related articles end}}<br />
<br />
This article describes how to configure network connections on [[Wikipedia:OSI layer 3|OSI layer 3]] and above. Medium-specifics are handled in the [[/Ethernet]] and [[/Wireless]] subpages.<br />
<br />
== Check the connection ==<br />
<br />
To troubleshoot a network connection, go through the following conditions and ensure that you meet them:<br />
<br />
# Your [[#Network interfaces|network interface]] is listed and enabled. Otherwise, check the device driver – see [[/Ethernet#Device driver]] or [[/Wireless#Device driver]].<br />
# You are connected to the network. The cable is plugged in or you are [[/Wireless|connected to the wireless LAN]].<br />
# Your network interface has an [[#IP addresses|IP address]].<br />
# Your [[#Routing table|routing table]] is correctly set up.<br />
# You can [[#Ping|ping]] a local IP address (e.g. your default gateway).<br />
# You can [[#Ping|ping]] a public IP address (e.g. {{ic|9.9.9.9}}, which is a DNS server operated by the Quad9 Foundation and is a convenient address to test with).<br />
# [[Domain name resolution#Resolve a domain name using NSS|Check if you can resolve domain names]] (e.g. {{ic|archlinux.org}}).<br />
<br />
=== Ping ===<br />
<br />
[[Wikipedia:Ping (networking utility)|ping]] is used to test if you can reach a host.<br />
<br />
{{hc|$ ping www.example.com|2=<br />
PING www.example.com (93.184.216.34): 56(84) data bytes<br />
64 bytes from 93.184.216.34: icmp_seq=0 ttl=56 time=11.632 ms<br />
64 bytes from 93.184.216.34: icmp_seq=1 ttl=56 time=11.726 ms<br />
64 bytes from 93.184.216.34: icmp_seq=2 ttl=56 time=10.683 ms<br />
...<br />
}}<br />
<br />
For every reply received, the ''ping'' utility will print a line like the above until you interrupt ({{ic|Ctrl+c}}) it interactively. For more information see the {{man|8|ping}} manual. Note that computers can be configured not to respond to ICMP echo requests. [https://unix.stackexchange.com/questions/412446/how-to-disable-ping-response-icmp-echo-in-linux-all-the-time]<br />
<br />
If you receive an error message (see [[Wikipedia:Ping (networking utility)#Error indications|ping error indications]]) or no reply, this may be related to incomplete configuration, but also your default gateway or your Internet Service Provider (ISP). You can run a [[traceroute]] to further diagnose the route to the host.<br />
<br />
== Network management ==<br />
<br />
To set up a network connection, go through the following steps:<br />
<br />
# Ensure your [[#Network interfaces|network interface]] is listed and enabled.<br />
# Connect to the network. Plug in the Ethernet cable or [[/Wireless|connect to the wireless LAN]].<br />
# Configure your network connection:<br />
#* [[#Static IP address|static IP address]]<br />
#* dynamic IP address: use [[#DHCP|DHCP]]<br />
<br />
{{Note|The installation image uses<br />
* [[systemd-networkd]], which is configured as a DHCP client for [https://gitlab.archlinux.org/archlinux/archiso/-/blob/master/configs/releng/airootfs/etc/systemd/network/20-ethernet.network Ethernet], [https://gitlab.archlinux.org/archlinux/archiso/-/blob/master/configs/releng/airootfs/etc/systemd/network/20-wlan.network WLAN] and [https://gitlab.archlinux.org/archlinux/archiso/-/blob/master/configs/releng/airootfs/etc/systemd/network/20-wwan.network WWAN] network interfaces, and <br />
* [[systemd-resolved]] configured for system-wide [[DNS]], see [[systemd-resolved#DNS]].}}<br />
<br />
=== iproute2 ===<br />
<br />
[[Wikipedia:iproute2|iproute2]] is a dependency of the {{Pkg|base}} [[meta package]] and provides the {{man|8|ip}} command-line interface, used to manage [[#Network interfaces|network interfaces]], [[#IP addresses|IP addresses]] and the [[#Routing table|routing table]]. Be aware that configuration made using {{ic|ip}} will be lost after a reboot. For persistent configuration, you can use a [[network manager]] or automate ''ip'' commands using scripts and [[systemd#Writing unit files|systemd units]]. Also note that {{ic|ip}} commands can generally be abbreviated, for clarity they are however spelled out in this article.<br />
<br />
{{Note|Arch Linux has deprecated {{Pkg|net-tools}} in favor of {{Pkg|iproute2}}.[https://archlinux.org/news/deprecation-of-net-tools/] See also [https://dougvitale.wordpress.com/2011/12/21/deprecated-linux-networking-commands-and-their-replacements/ Deprecated Linux networking commands and their replacements].}}<br />
<br />
=== Network interfaces ===<br />
<br />
By default [[udev]] assigns names to your [[Wikipedia:Network interface controller|network interface controllers]] using [https://systemd.io/PREDICTABLE_INTERFACE_NAMES/ Predictable Network Interface Names], which prefixes interfaces names with {{ic|en}} (wired/[[Wikipedia:Ethernet|Ethernet]]), {{ic|wl}} (wireless/[[Wikipedia:Wireless LAN|WLAN]]), or {{ic|ww}} ([[Wikipedia:Wireless WAN|WWAN]]). See {{man|7|systemd.net-naming-scheme}}.<br />
<br />
{{Tip|To change interface names, see [[#Change interface name]] and [[#Revert to traditional interface names]].}}<br />
<br />
==== Listing network interfaces ====<br />
<br />
Both wired and wireless interface names can be found via {{ic|ls /sys/class/net}} or {{ic|ip link}}. Note that {{ic|lo}} is the [[Wikipedia:Loopback#Virtual loopback interface|virtual loopback interface]] and not used in making network connections.<br />
<br />
Wireless device names can also be retrieved using {{ic|iw dev}}. See also [[/Wireless#Get the name of the interface]].<br />
<br />
If your network interface is not listed, make sure your device driver was loaded successfully. See [[/Ethernet#Device driver]] or [[/Wireless#Device driver]].<br />
<br />
==== Enabling and disabling network interfaces ====<br />
<br />
Network interfaces can be enabled or disabled using {{ic|ip link set ''interface'' up{{!}}down}}, see {{man|8|ip-link}}.<br />
<br />
To check the status of the interface {{ic|enp2s0}}:<br />
<br />
{{hc|$ ip link show dev enp2s0|<br />
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state DOWN mode DEFAULT qlen 1000<br />
...<br />
}}<br />
<br />
The {{ic|UP}} in {{ic|<BROADCAST,MULTICAST,UP,LOWER_UP>}} is what indicates the interface is up, not the later {{ic|state DOWN}}.<br />
<br />
{{Note|If your default route is through interface {{ic|enp2s0}}, taking it down will also remove the route, and bringing it back up will not automatically re-establish the default route. See [[#Routing table]] for re-establishing it.}}<br />
<br />
=== Static or dynamic IP address? ===<br />
<br />
{{Style|Too convoluted.}}<br />
<br />
If you are using a Wi-FI or a router, for example, at home, you will most likely be using a dynamic IP address. The IP address is assigned by the Wi-Fi or router and it is what your computer should be configured to use. Or, if you are at home and your computer is connected to your ISP's modem, for example, a cable modem, that will also be using a dynamic IP address. Dynamic IP addresses can change each time you turn your computer on. In a work environment you may have a static IP address or a dynamic IP address. At home you can configure your router to always assign your computer the same IP address in which case you are using a static IP address. When you are using a dynamic IP address you will need to use DHCP so that it can set up your network interface with the correct IP address. In addition to configuring your IP address, DHCP can also configure your routing (how to get from where you are to wherever on the network you are going) as well as your name servers, which convert the host name, for example, google.com, into its IP address, that number with dots in it.<br />
<br />
=== Static IP address ===<br />
<br />
A static IP address can be configured with most standard [[#Network managers|network managers]] and also [[dhcpcd]].<br />
<br />
To manually configure a static IP address, add an IP address as described in [[#IP addresses]], set up your [[#Routing table|routing table]] and [[Domain name resolution|configure your DNS servers]].<br />
<br />
=== IP addresses ===<br />
<br />
[[Wikipedia:IP address|IP addresses]] are managed using {{man|8|ip-address}}.<br />
<br />
List IP addresses:<br />
<br />
$ ip address show<br />
<br />
Add an IP address to an interface:<br />
<br />
# ip address add ''address/prefix_len'' broadcast + dev ''interface''<br />
<br />
:Note that:<br />
<br />
:* the address is given in [[Wikipedia:Classless Inter-Domain Routing#CIDR notation|CIDR notation]] to also supply a [[Wikipedia:Subnetwork|subnet mask]]<br />
:* {{ic|+}} is a special symbol that makes {{ic|ip}} derive the [[Wikipedia:Broadcast address|broadcast address]] from the IP address and the subnet mask<br />
<br />
:{{Note|Make sure manually assigned IP addresses do not conflict with DHCP assigned ones.}}<br />
<br />
Delete an IP address from an interface:<br />
<br />
# ip address del ''address/prefix_len'' dev ''interface''<br />
<br />
Delete all addresses matching a criteria, e.g. of a specific interface:<br />
<br />
# ip address flush dev ''interface''<br />
<br />
{{Tip|IP addresses can be calculated with [http://jodies.de/ipcalc ipcalc] ({{Pkg|ipcalc}}).}}<br />
<br />
=== Routing table ===<br />
<br />
The [[Wikipedia:Routing table|routing table]] is used to determine if you can reach an IP address directly or what gateway (router) you should use. If no other route matches the IP address, the [[Wikipedia:Default gateway|default gateway]] is used.<br />
<br />
The routing table is managed using {{man|8|ip-route}}.<br />
<br />
''PREFIX'' is either a CIDR notation or {{ic|default}} for the default gateway.<br />
<br />
List IPv4 routes:<br />
<br />
$ ip route show<br />
<br />
List IPv6 routes:<br />
<br />
$ ip -6 route<br />
<br />
Add a route:<br />
<br />
# ip route add ''PREFIX'' via ''address'' dev ''interface''<br />
<br />
Delete a route:<br />
<br />
# ip route del ''PREFIX'' via ''address'' dev ''interface''<br />
<br />
=== DHCP ===<br />
<br />
A [[Wikipedia:Dynamic Host Configuration Protocol|Dynamic Host Configuration Protocol]] (DHCP) server provides clients with a dynamic or static IP address, the subnet mask, the default gateway IP address and optionally also with DNS name servers.<br />
<br />
To use DHCP you need a DHCP server in your network and a DHCP client:<br />
<br />
{| class="wikitable"<br />
! Client !! Package !! [[Archiso]] !! Note !! Systemd units<br />
|-<br />
| [[dhcpcd]] || {{Pkg|dhcpcd}} || {{Yes}} || DHCP, DHCPv6, ZeroConf, static IP || {{ic|dhcpcd.service}}, {{ic|dhcpcd@''interface''.service}}<br />
|-<br />
| [https://www.isc.org/downloads/dhcp/ ISC dhclient] || {{Pkg|dhclient}} || {{Yes}} || DHCP, DHCPv6, BOOTP, static IP || {{ic|dhclient@''interface''.service}}<br />
|}<br />
<br />
{{Note|<br />
* ISC has ended development on the ISC DHCP client as of early 2022. This client implementation is no longer maintained and should not be used in production any longer.<br />
* You should not run two DHCP clients simultaneously.<br />
* Instead of directly using a standalone DHCP client you can also use a [[#Network managers|network manager]], some of which have a built-in DHCP client.<br />
* Alternatively, [[iwd]] has a built-in DHCP client that can be used with some configuration: [[iwd#Enable built-in network configuration]].<br />
}}<br />
<br />
{{Tip|<br />
* You can check if a DHCP server is running with {{Pkg|dhcping}}.<br />
* While waiting for an IP to be assigned you can run something like {{ic|watch -n 1 ping -c 1 archlinux.org}} to confirm that the network is connected.<br />
}}<br />
<br />
==== Servers ====<br />
<br />
{| class="wikitable"<br />
! Server !! Package !! IPv4 !! IPv6 !! GUI !! Interfaces !! Storage backend(s) !! Note<br />
|-<br />
| [[dhcpd]] || {{Pkg|dhcp}} || {{Yes}} || {{Yes}} || [https://github.com/Akkadius/glass-isc-dhcp Glass-ISC-DHCP] || ? || File || Superseded by Kea.<br />
|-<br />
| [[dnsmasq]] || {{Pkg|dnsmasq}} || {{Yes}} || {{Yes}} || {{No}} || ? || File || Also DNS, PXE and TFTP.<br />
|-<br />
| [https://www.isc.org/kea/ Kea] || {{Pkg|kea}} || {{Yes}} || {{Yes}} || [https://github.com/isc-projects/stork Stork] || REST, RADIUS, NETCONF || File, MySQL, PostgreSQL, Cassandra || Also DNS. Supersedes dhcpd.<br />
|-<br />
| [[systemd-networkd]] || {{Pkg|systemd}} || {{Yes}} || {{No}} || {{No}} || ? || File || Installed with systemd.<br />
|}<br />
<br />
=== Network managers ===<br />
<br />
A network manager lets you manage network connection settings in so called network profiles to facilitate switching networks.<br />
<br />
{{Note|There are many solutions to choose from, but remember that all of them are mutually exclusive; you should not run two daemons simultaneously.}}<br />
<br />
{| class="wikitable"<br />
! Network manager || GUI || [[Archiso]] [https://gitlab.archlinux.org/archlinux/archiso/-/blob/master/configs/releng/packages.x86_64] || CLI tools || [[Wikipedia:Point-to-Point Protocol|PPP]] support <br>(e.g. [[Mobile broadband modem|3G modem]]) || [[#DHCP|DHCP client]] || systemd units <br />
|-<br />
! [[ConnMan]]<br />
| {{Y|8 unofficial}} || {{No}} || {{man|1|connmanctl}} || {{Yes}} (with {{AUR|ofono}}) || internal || {{ic|connman.service}}<br />
|-<br />
! [[dhcpcd]]<br />
| {{Y|8 unofficial}} || {{Yes}} || {{man|1|dhcpcd}} || {{Yes}} (with {{Pkg|ppp}}) || internal || {{ic|dhcpcd.service}}, {{ic|netctl-auto@''interface''.service}}<br />
|-<br />
! [[netctl]]<br />
| {{Y|2 unofficial}} || {{No}} || {{man|1|netctl}}, wifi-menu || {{Yes}} || [[dhcpcd]] or {{Pkg|dhclient}} || {{ic|netctl-ifplugd@''interface''.service}}, {{ic|netctl-auto@''interface''.service}}<br />
|-<br />
! [[NetworkManager]]<br />
| {{Yes}} || {{No|https://gitlab.archlinux.org/archlinux/archiso/-/issues/187}} || {{man|1|nmcli}}, {{man|1|nmtui}} || {{Yes}} || internal or {{Pkg|dhclient}} || {{ic|NetworkManager.service}}<br />
|-<br />
! [[systemd-networkd]]<br />
| {{No}} || {{Yes}} ({{Pkg|base}}) || {{man|1|networkctl}} || {{No|https://github.com/systemd/systemd/issues/481}} || internal || {{ic|systemd-networkd.service}}, {{ic|systemd-resolved.service}}<br />
|}<br />
<br />
== Set the hostname ==<br />
<br />
{{Style|The {{ic|''myhostname''}} pseudo-variable may cause confusion since that name is also used by {{man|8|nss-myhostname}}.|section=myhostname → yourhostname}}<br />
<br />
A [[Wikipedia:Hostname|hostname]] is a unique name created to identify a machine on a network, configured in {{ic|/etc/hostname}}—see {{man|5|hostname}} and {{man|7|hostname}} for details. The file can contain the system's domain name, if any. To set the hostname, [[textedit|edit]] {{ic|/etc/hostname}} to include a single line with {{ic|''myhostname''}}:<br />
<br />
{{hc|/etc/hostname|<br />
''myhostname''<br />
}}<br />
<br />
{{Tip|For advice on choosing a hostname, see [[RFC:1178|RFC 1178]].}}<br />
<br />
Alternatively, using {{man|1|hostnamectl}}:<br />
<br />
# hostnamectl set-hostname ''myhostname''<br />
<br />
To temporarily set the hostname (until reboot), use {{man|1|hostname}} from {{Pkg|inetutils}}:<br />
<br />
# hostname ''myhostname''<br />
<br />
To set the "pretty" hostname and other machine metadata, see {{man|5|machine-info}}.<br />
<br />
=== Local network hostname resolution ===<br />
<br />
To make your machine accessible in your LAN via its hostname you can:<br />
<br />
* edit the {{ic|/etc/hosts}} file for every device in your LAN, see {{man|5|hosts}}<br />
* set up a [[DNS server]] to resolve your hostname and make the LAN devices use it (e.g. via [[#DHCP]])<br />
* or the easy way: use a [[Wikipedia:Zero-configuration networking|Zero-configuration networking]] service:<br />
** Hostname resolution via Microsoft's [[Wikipedia:NetBIOS#Name service|NetBIOS]]. Provided by [[Samba]] on Linux. It only requires the {{ic|nmb.service}}. Computers running Windows, macOS, or Linux with {{ic|nmb}} running, will be able to find your machine.<br />
** Hostname resolution via [[Wikipedia:Multicast DNS|mDNS]]. Provided by either {{ic|nss_mdns}} with [[Avahi]] (see [[Avahi#Hostname resolution]] for setup details) or [[systemd-resolved]]. Computers running macOS, or Linux with Avahi or systemd-resolved running, will be able to find your machine. The older Win32 API does not support mDNS, which may prevent some older Windows applications from accessing your device.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Change interface name ===<br />
<br />
{{Note|When changing the naming scheme, do not forget to update all network-related configuration files and custom systemd unit files to reflect the change.}}<br />
<br />
You can change the device name by defining the name manually with an {{man|5|systemd.link}} file. For example:<br />
<br />
{{hc|/etc/systemd/network/10-net0.link|2=<br />
[Match]<br />
PermanentMACAddress=aa:bb:cc:dd:ee:ff<br />
<br />
[Link]<br />
Name=net0<br />
}}<br />
<br />
Alternatively, a udev rule can be used:<br />
<br />
{{hc|/etc/udev/rules.d/10-network.rules|2=<br />
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="aa:bb:cc:dd:ee:ff", NAME="net0"<br />
}}<br />
<br />
These rules will be applied automatically at boot. To apply the change immediately, do a manual trigger of the udev rule on the {{ic|net}} subsystem:<br />
<br />
# udevadm trigger --verbose --subsystem-match=net --action=add<br />
<br />
If you want to run a [[udev#Testing rules before loading|test]] on the changes made, {{ic|udevadm --debug test /sys/class/net/*}} can be of help.<br />
<br />
{{Note|<br />
* The priority of {{ic|Name}} is lower than {{ic|NamePolicy}}, so make sure the latter is unset/empty or the name will not be changed. {{ic|99-default.link}} sets {{ic|NamePolicy}}, requiring the custom config to be ordered before it, i.e. to have a numerical prefix.<br />
* The network interface must be down before changing its name. [https://github.com/systemd/systemd/issues/26601]<br />
* To get the MAC address of each card, run {{ic|ip link}}.<br />
* Make sure to use the lower-case hex values in your udev rules. It does not like upper-case.<br />
}}<br />
<br />
If the network card has a dynamic MAC, you can use {{ic|Path}} (which can be checked using {{ic|networkctl status ''interface_name''}}):<br />
<br />
{{hc|/etc/systemd/network/10-net1.link|2=<br />
[Match]<br />
Path=pci-0000:01:00.0<br />
<br />
[Link]<br />
Name=net1<br />
}}<br />
<br />
Or, use a udev rule with {{ic|DEVPATH}}:<br />
<br />
{{hc|/etc/udev/rules.d/10-network.rules|2=<br />
SUBSYSTEM=="net", DEVPATH=="/devices/pci*/*1c.0/*/net/*", NAME="net1"<br />
}}<br />
<br />
To get the {{ic|DEVPATH}} of all currently-connected devices, see where the symlinks in {{ic|/sys/class/net/}} lead. For example:<br />
<br />
{{hc|file /sys/class/net/*|<br />
/sys/class/net/enp0s20f0u4u1: symbolic link to ../../devices/pci0000:00/0000:00:14.0/usb2/2-4/2-4.1/2-4.1:1.0/net/enp0s20f0u4u1<br />
/sys/class/net/enp0s31f6: symbolic link to ../../devices/pci0000:00/0000:00:1f.6/net/enp0s31f6<br />
/sys/class/net/lo: symbolic link to ../../devices/virtual/net/lo<br />
/sys/class/net/wlp4s0: symbolic link to ../../devices/pci0000:00/0000:00:1c.6/0000:04:00.0/net/wlp4s0<br />
}}<br />
<br />
The device path should match both the new and old device name, since the rule may be executed more than once on bootup. For example, in the given rule, {{ic|"/devices/pci*/*1c.0/*/net/enp*"}} would be wrong since it will stop matching once the name is changed to {{ic|net1}}. Only the system-default rule will fire the second time around, causing the name to be changed back.<br />
<br />
If you are using a USB network device (e.g. Android phone tethering) that has a dynamic MAC address and you want to be able to use different USB ports, you could use a rule that matched depending on vendor and model ID instead:<br />
<br />
{{hc|/etc/systemd/network/20-net2.link|2=<br />
[Match]<br />
Property=ID_VENDOR_ID=12ab ID_MODEL_ID=3cd4<br />
<br />
[Link]<br />
Name=net2<br />
}}<br />
<br />
or<br />
<br />
{{hc|/etc/udev/rules.d/10-network.rules|2=<br />
SUBSYSTEM=="net", ACTION=="add", ATTRS{idVendor}=="12ab", ATTRS{idProduct}=="3cd4", NAME="net2"<br />
}}<br />
<br />
{{Note|When choosing the static names '''it should be avoided to use names in the format of "eth''X''" and "wlan''X''"''', because this may lead to race conditions between the kernel and udev during boot. Instead, it is better to use interface names that are not used by the kernel as default, e.g.: {{ic|net0}}, {{ic|net1}}, {{ic|wifi0}}, {{ic|wifi1}}. For further details please see the [https://systemd.io/PREDICTABLE_INTERFACE_NAMES/ systemd] documentation.}}<br />
<br />
=== Revert to traditional interface names ===<br />
<br />
If you would prefer to retain traditional interface names such as {{ic|eth0}}, [https://systemd.io/PREDICTABLE_INTERFACE_NAMES/ Predictable Network Interface Names] can be disabled by changing the default {{ic|NamePolicy}} for udev's {{ic|net_setup_link}} built-in:<br />
<br />
{{hc|/etc/systemd/network/99-default.link.d/traditional-naming.conf|2=<br />
[Link]<br />
NamePolicy=keep kernel<br />
}}<br />
<br />
Alternatively, {{ic|net_setup_link}} can be completely disabled by masking the corresponding udev rule:<br />
<br />
# ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules<br />
<br />
or by adding {{ic|1=net.ifnames=0}} to the [[kernel parameters]].<br />
<br />
{{Warning|{{man|5|systemd.link}} relies on {{ic|net_setup_link}} to work. Prefer to use the first approach unless you fully understand what you're doing.}}<br />
<br />
=== Set device MTU and queue length ===<br />
<br />
You can change the device [[wikipedia:Maximum transmission unit|MTU]] and queue length by defining manually with a {{man|5|systemd.link}} config. For example:<br />
<br />
{{hc|/etc/systemd/network/30-mtu.link|2=<br />
[Match]<br />
Type=wlan<br />
<br />
[Link]<br />
MTUBytes=1500<br />
TransmitQueueLength=2000<br />
}}<br />
<br />
Or through a udev rule:<br />
<br />
{{hc|/etc/udev/rules.d/10-network.rules|2=<br />
ACTION=="add", SUBSYSTEM=="net", KERNEL=="wl*", ATTR{mtu}="1500", ATTR{tx_queue_len}="2000"<br />
}}<br />
<br />
{{ic|MTUBytes}}: Using a value larger than 1500 (so called [[Wikipedia:jumbo frame|jumbo frame]]s) can significantly speed up your network transfers. Note that all network interfaces, including switches in the local network, must support the same MTU in order to use jumbo frames. For PPPoE, the MTU should not be larger than 1492. You can also set MTU via {{man|5|systemd.netdev}}.<br />
<br />
{{ic|TransmitQueueLength}}: Small value for slower devices with a high latency like modem links and ISDN. High value is recommended for server connected over the high-speed internet connections that perform large data transfers.<br />
<br />
=== Bonding or LAG ===<br />
<br />
See [[netctl#Bonding|netctl]] or [[systemd-networkd#Bonding a wired and wireless interface|systemd-networkd]], or [[Wireless bonding]].<br />
<br />
=== IP address aliasing ===<br />
<br />
IP aliasing is the process of adding more than one IP address to a network interface. With this, one node on a network can have multiple connections to a network, each serving a different purpose. Typical uses are virtual hosting of Web and FTP servers, or reorganizing servers without having to update any other machines (this is especially useful for nameservers).<br />
<br />
==== Example ====<br />
<br />
To manually set an alias, for some NIC, use {{Pkg|iproute2}} to execute<br />
<br />
# ip addr add 192.168.2.101/24 dev enp2s0 label enp2s0:1<br />
<br />
To remove a given alias execute<br />
<br />
# ip addr del 192.168.2.101/24 dev enp2s0:1<br />
<br />
Packets destined for a subnet will use the primary alias by default. If the destination IP is within a subnet of a secondary alias, then the source IP is set respectively. Consider the case where there is more than one NIC, the default routes can be listed with {{ic|ip route}}.<br />
<br />
=== Promiscuous mode ===<br />
<br />
Toggling [[wikipedia:Promiscuous mode|promiscuous mode]] will make a (wireless) NIC forward all traffic it receives to the OS for further processing. This is opposite to "normal mode" where a NIC will drop frames it is not intended to receive. It is most often used for advanced network troubleshooting and [[wikipedia:Packet sniffing|packet sniffing]].<br />
<br />
{{hc|/etc/systemd/system/promiscuous@.service|<nowiki><br />
[Unit]<br />
Description=Set %i interface in promiscuous mode<br />
After=network.target<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/ip link set dev %i promisc on<br />
RemainAfterExit=yes<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
If you want to enable promiscuous mode on interface {{ic|enp2s0}}, [[enable]] {{ic|promiscuous@enp2s0.service}}.<br />
<br />
=== Investigate sockets ===<br />
<br />
''ss'' is a utility to investigate network ports and is part of the {{Pkg|iproute2}} package. It has a similar functionality to the [https://archlinux.org/news/deprecation-of-net-tools/ deprecated] netstat utility. <br />
<br />
Common usage includes:<br />
<br />
Display all TCP Sockets with service names:<br />
$ ss -at<br />
<br />
Display all TCP Sockets with port numbers:<br />
$ ss -atn<br />
<br />
Display all UDP Sockets:<br />
$ ss -au<br />
<br />
For more information see {{man|8|ss}}.<br />
<br />
== Troubleshooting ==<br />
<br />
=== The TCP window scaling problem ===<br />
<br />
TCP packets contain a "window" value in their headers indicating how much data the other host may send in return. This value is represented with only 16 bits, hence the window size is at most 64KiB. TCP packets are cached for a while (they have to be reordered), and as memory is (or used to be) limited, one host could easily run out of it.<br />
<br />
Back in 1992, as more and more memory became available, [[RFC:1323]] was written to improve the situation: Window Scaling. The "window" value, provided in all packets, will be modified by a Scale Factor defined once, at the very beginning of the connection. That 8-bit Scale Factor allows the Window to be up to 32 times higher than the initial 64KiB.<br />
<br />
It appears that some broken routers and firewalls on the Internet are rewriting the Scale Factor to 0 which causes misunderstandings between hosts. The Linux kernel 2.6.17 introduced a new calculation scheme generating higher Scale Factors, virtually making the aftermaths of the broken routers and firewalls more visible.<br />
<br />
The resulting connection is at best very slow or broken.<br />
<br />
==== How to diagnose the problem ====<br />
<br />
First of all, let us make it clear: this problem is odd. In some cases, you will not be able to use TCP connections (HTTP, FTP, ...) at all and in others, you will be able to communicate with some hosts (very few).<br />
<br />
When you have this problem, the output from [[dmesg]] is okay, logs are clean and {{ic|ip addr}} will report normal status... and actually everything appears normal.<br />
<br />
If you cannot browse any website, but you can ping some random hosts, chances are great that you are experiencing this problem: ping uses ICMP and is not affected by TCP problems.<br />
<br />
You can try to use [[Wireshark]]. You might see successful UDP and ICMP communications but unsuccessful TCP communications (only to foreign hosts).<br />
<br />
==== Ways of fixing it ====<br />
<br />
===== Bad =====<br />
<br />
To fix it the bad way, you can change the {{ic|tcp_rmem}} value, on which Scale Factor calculation is based. Although it should work for most hosts, it is not guaranteed, especially for very distant ones.<br />
<br />
# echo "4096 87380 174760" > /proc/sys/net/ipv4/tcp_rmem<br />
<br />
===== Good =====<br />
<br />
Simply disable Window Scaling. Since Window Scaling is a nice TCP feature, it may be uncomfortable to disable it, especially if you cannot fix the broken router. There are several ways to disable Window Scaling, and it seems that the most bulletproof way (which will work with most kernels) is to add the following line to {{ic|/etc/sysctl.d/99-disable_window_scaling.conf}} (see also [[sysctl]]):<br />
<br />
net.ipv4.tcp_window_scaling = 0<br />
<br />
===== Best =====<br />
<br />
This problem is caused by broken routers/firewalls, so let us change them. Some users have reported that the broken router was their very own DSL router.<br />
<br />
==== More about it ====<br />
<br />
This section is based on the LWN article [https://lwn.net/Articles/92727/ TCP window scaling and broken routers] and an archived Kernel Trap article: [https://web.archive.org/web/20120426135627/http://kerneltrap.org:80/node/6723 Window Scaling on the Internet].<br />
<br />
There are also several relevant threads on the LKML.<br />
<br />
=== Connected second PC unable to use bridged LAN ===<br />
<br />
First PC have two LAN. Second PC have one LAN and connected to first PC. Lets go second PC to give all access to LAN after bridged interface:<br />
<br />
{{Expansion|Explain what the settings actually do.}}<br />
<br />
# sysctl net.bridge.bridge-nf-filter-pppoe-tagged=0<br />
# sysctl net.bridge.bridge-nf-filter-vlan-tagged=0<br />
# sysctl net.bridge.bridge-nf-call-ip6tables=0<br />
# sysctl net.bridge.bridge-nf-call-iptables=0<br />
# sysctl net.bridge.bridge-nf-call-arptables=0<br />
<br />
=== localhost is resolved over the network ===<br />
<br />
{{man|8|nss-myhostname}} (an [[Name Service Switch|NSS]] module provided by [[systemd]] and enabled by default in {{ic|/etc/nsswitch.conf}}) provides {{ic|localhost}} and the local hostname resolution to an IP address. Some software may, however, still instead read {{ic|/etc/hosts}} directly; see [https://lists.debian.org/debian-devel/2013/07/msg00809.html] [https://bugzilla.mozilla.org/show_bug.cgi?id=87717#c55] for examples.<br />
<br />
To prevent such software from unsafely resolving localhost over the network, add entries for {{ic|localhost}} to the {{man|5|hosts}} file:<br />
<br />
{{hc|/etc/hosts|<br />
127.0.0.1 localhost<br />
::1 localhost<br />
}}<br />
<br />
{{Note|Report any software affected by this issue in {{Bug|56684}}. This may help in getting {{ic|localhost}} entries added to the default {{ic|/etc/hosts}}.}}<br />
<br />
To allow resolving the local hostname, additionally add it to the {{man|5|hosts}} file:<br />
<br />
{{hc|/etc/hosts|<br />
127.0.0.1 localhost<br />
::1 localhost<br />
127.0.1.1 ''myhostname''<br />
}}<br />
<br />
For a system with a permanent IP address, replace {{ic|127.0.1.1}} with that permanent IP address. For a system with a [[Wikipedia:Fully qualified domain name|fully qualified domain name]], insert the fully qualified domain name before the hostname (see the following link for [https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_hostname_resolution the reasoning]). For example:<br />
<br />
{{hc|/etc/hosts|<br />
127.0.0.1 localhost<br />
::1 localhost<br />
203.0.113.45 host1.fqdomain.example host1<br />
}}<br />
<br />
{{Note|The order of hostnames/aliases that follow the IP address in {{ic|/etc/hosts}} is significant. The first string is considered the canonical hostname and may be appended with parent domains, where domain components are separated by a dot. All following strings on the same line are considered aliases. See {{man|5|hosts}} for more info.}}<br />
<br />
As a result the system resolves to both entries: <br />
<br />
{{hc|$ getent hosts|<br />
127.0.0.1 localhost<br />
127.0.0.1 localhost<br />
127.0.1.1 ''myhostname''<br />
}}<br />
<br />
== See also ==<br />
<br />
* [https://www.tldp.org/LDP/nag2/index.html Linux Network Administrators Guide]<br />
* [https://www.debian.org/doc/manuals/debian-reference/ch05.en.html Debian Reference: Network setup]<br />
* [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/ RHEL7: Networking Guide]<br />
* [https://blog.packagecloud.io/eng/2016/06/22/monitoring-tuning-linux-networking-stack-receiving-data/ Monitoring and tuning the Linux Networking Stack: Receiving data]<br />
* [https://blog.packagecloud.io/eng/2017/02/06/monitoring-tuning-linux-networking-stack-sending-data/ Monitoring and tuning the Linux Networking Stack: Sending data]<br />
* [https://blog.yadutaf.fr/2017/07/28/tracing-a-packet-journey-using-linux-tracepoints-perf-ebpf/ Tracing a packet journey using tracepoints, perf and eBPF]</div>Pdchttps://wiki.archlinux.org/index.php?title=Sudo&diff=758767Sudo2022-12-03T16:04:01Z<p>Pdc: /* Editing files */ Remove commas: it's a restrictive clause</p>
<hr />
<div>[[Category:Security]]<br />
[[Category:Commands]]<br />
[[de:sudo]]<br />
[[es:Sudo]]<br />
[[fa:sudo]]<br />
[[fr:Sudo]]<br />
[[ja:Sudo]]<br />
[[pt:Sudo]]<br />
[[ru:Sudo]]<br />
[[uk:Sudo]]<br />
[[zh-hans:Sudo]]<br />
{{Related articles start}}<br />
{{Related|Users and groups}}<br />
{{Related|su}}<br />
{{Related|doas}}<br />
{{Related articles end}}<br />
[https://www.sudo.ws/sudo/ Sudo] allows a system administrator to delegate authority to give certain users—or groups of users—the ability to run commands as root or another user while providing an audit trail of the commands and their arguments.<br />
<br />
Sudo is an alternative to [[su]] for running commands as root. Unlike [[su]], which launches a root shell that allows all further commands root access, sudo instead grants temporary privilege elevation to a single command. By enabling root privileges only when needed, sudo usage reduces the likelihood that a typo or a bug in an invoked command will ruin the system.<br />
<br />
Sudo can also be used to run commands as other users; additionally, sudo logs all commands and failed access attempts for security auditing.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|sudo}} package.<br />
<br />
== Usage ==<br />
<br />
To begin using {{ic|sudo}} as a non-privileged user, it must be properly configured. See [[#Configuration]].<br />
<br />
To use ''sudo'', simply prefix a command and its arguments with {{ic|sudo}} and a space:<br />
<br />
$ sudo ''cmd''<br />
<br />
For example, to use pacman:<br />
<br />
$ sudo pacman -Syu<br />
<br />
See {{man|8|sudo}} for more information.<br />
<br />
== Configuration ==<br />
<br />
{{Expansion|Create an intro discussing {{ic|Defaults}}, perhaps with a table that lists common settings}}<br />
<br />
=== Defaults skeleton ===<br />
<br />
{{man|5|sudoers|SUDOERS OPTIONS}} lists all the options that can be used with the {{ic|Defaults}} command in the {{ic|/etc/sudoers}} file.<br />
<br />
See [https://gist.github.com/AladW/7eca9799b9ea624eca31] for a list of options (parsed from the version 1.8.7 source code) in a format optimized for {{ic|sudoers}}.<br />
<br />
See {{man|5|sudoers}} for more information, such as configuring the password timeout.<br />
<br />
=== View current settings ===<br />
<br />
Run {{ic|sudo -ll}} to print out the current sudo configuration, or {{ic|sudo -lU ''user''}} for a specific user.<br />
<br />
=== Using visudo ===<br />
<br />
The configuration file for sudo is {{ic|/etc/sudoers}}. It should '''always''' be edited with the {{man|8|visudo}} command. ''visudo'' locks the {{ic|sudoers}} file, saves edits to a temporary file, and checks it for syntax errors before copying it to {{ic|/etc/sudoers}}.<br />
<br />
{{Warning|<br />
* It is imperative that {{ic|sudoers}} be free of syntax errors! Any error makes sudo unusable. '''Always''' edit it with ''visudo'' to prevent errors.<br />
* {{man|8|visudo}} warns that configuring ''visudo'' to honor the user environment variables for their editor of choice may be a security hole, since it allows the user with ''visudo'' privileges to run arbitrary commands as root without logging simply by setting that variable to something else.<br />
}}<br />
<br />
The default editor for ''visudo'' is ''vi''. The {{Pkg|sudo}} package is compiled with {{ic|--with-env-editor}} and honors the use of the {{ic|SUDO_EDITOR}}, {{ic|VISUAL}} and {{ic|EDITOR}} variables. {{ic|EDITOR}} is not used when {{ic|VISUAL}} is set.<br />
<br />
To establish [[nano]] as the ''visudo'' editor for the duration of the current shell session, export {{ic|1=EDITOR=nano}}; to use a different editor just once simply set the variable before calling ''visudo'':<br />
<br />
# EDITOR=nano visudo<br />
<br />
Alternatively you may edit a copy of the {{ic|/etc/sudoers}} file and check it using {{ic|visudo -c ''/copy/of/sudoers''}}. This might come in handy in case you want to circumvent locking the file with ''visudo''.<br />
<br />
To change the editor permanently, see [[Environment variables#Per user]]. To change the editor of choice permanently system-wide only for ''visudo'', add the following to {{ic|/etc/sudoers}} (assuming [[nano]] is your preferred editor):<br />
<br />
# Reset environment by default<br />
Defaults env_reset<br />
# Set default EDITOR to restricted version of nano, and do not allow visudo to use EDITOR/VISUAL.<br />
Defaults editor=/usr/bin/rnano, !env_editor<br />
<br />
=== Example entries ===<br />
<br />
To allow a user to gain full root privileges when they precede a command with {{ic|sudo}}, add the following line:<br />
<br />
USER_NAME ALL=(ALL:ALL) ALL<br />
<br />
To allow a user to run all commands as any user but only on the machine with hostname {{ic|HOST_NAME}}:<br />
<br />
USER_NAME HOST_NAME=(ALL:ALL) ALL<br />
<br />
To allow members of group [[wheel]] sudo access:<br />
<br />
%wheel ALL=(ALL:ALL) ALL<br />
<br />
{{Tip|When creating new administrators, it is often desirable to enable sudo access for the {{ic|wheel}} group and [[Users and groups#Group management|add the user to it]], since by default [[Polkit#Administrator identities|Polkit]] treats the members of the {{ic|wheel}} group as administrators. If the user is not a member of {{ic|wheel}}, software using Polkit may ask to authenticate using the root password instead of the user password.}}<br />
<br />
To disable asking for a password for user {{ic|USER_NAME}}:<br />
<br />
{{Warning|This will allow any process running with your user name to use sudo without asking for permission.}}<br />
<br />
Defaults:USER_NAME !authenticate<br />
<br />
Enable explicitly defined commands only for user {{ic|USER_NAME}} on host {{ic|HOST_NAME}}:<br />
<br />
USER_NAME HOST_NAME=/usr/bin/halt,/usr/bin/poweroff,/usr/bin/reboot,/usr/bin/pacman -Syu<br />
<br />
{{Note|The most customized option should go at the end of the file, as the later lines overrides the previous ones. In particular such a line should be after the {{ic|%wheel}} line if your user is in this group.}}<br />
<br />
Enable explicitly defined commands only for user {{ic|USER_NAME}} on host {{ic|HOST_NAME}} without password:<br />
<br />
USER_NAME HOST_NAME= NOPASSWD: /usr/bin/halt,/usr/bin/poweroff,/usr/bin/reboot,/usr/bin/pacman -Syu<br />
<br />
A detailed {{ic|sudoers}} example is available at {{ic|/usr/share/doc/sudo/examples/sudoers}}. Otherwise, see the {{man|5|sudoers}} for detailed information.<br />
<br />
=== Sudoers default file permissions ===<br />
<br />
The owner and group for the {{ic|sudoers}} file must both be 0. The file permissions must be set to 0440. These permissions are set by default, but if you accidentally change them, they should be changed back immediately or sudo will fail.<br />
<br />
# chown -c root:root /etc/sudoers<br />
# chmod -c 0440 /etc/sudoers<br />
<br />
== Tips and tricks ==<br />
<br />
=== Disable password prompt timeout ===<br />
<br />
A common annoyance is a long-running process that runs on a background terminal somewhere that runs with normal permissions and elevates only when needed. This leads to a sudo password prompt which goes unnoticed and times out, at which point the process dies and the work done is lost or, at best, cached. Common advice is to enable passwordless sudo, or extend the timeout of sudo remembering a password. Both of these have negative security implications. The '''prompt''' timeout can also be disabled and since that does not serve any reasonable security purpose it should be the solution here:<br />
<br />
Defaults passwd_timeout=0<br />
<br />
=== Add terminal bell to the password prompt ===<br />
<br />
To draw attention to a sudo prompt in a background terminal, users can simply make it echo a [[Wikipedia:Bell character|bell character]]:<br />
<br />
Defaults passprompt="^G[sudo] password for %p: "<br />
<br />
Note the {{ic|^G}} is a literal bell character. E.g. in [[vim]], insert using the sequence {{ic|Ctrl+v}} {{ic|Ctrl+g}}, or in [[nano]], {{ic|Alt+v}} {{ic|Ctrl+g}}.<br />
<br />
=== Passing aliases ===<br />
<br />
Aliases in [[Zsh]] and [[Bash]] are normally only expanded for the first word in a command. This means that your aliases will not normally get expanded when running the {{ic|sudo}} command. One way to make the next word expand is to make an alias for sudo ending with a space. Add the following to your [[Command-line shell#Configuration files|shell's configuration file]]:<br />
<br />
alias sudo='sudo '<br />
<br />
{{man|1|zshmisc|ALIASING}} describes how this works:<br />
: If the replacement text ends with a space, the next word in the shell input is always eligible for purposes of alias expansions.<br />
<br />
As well as {{man|1|bash|ALIASES}}:<br />
: If the last character of the alias value is a blank, then the next command word following the alias is also checked for alias expansion.<br />
<br />
=== Disable per-terminal sudo ===<br />
<br />
{{Warning|This will let any process use your sudo session.}}<br />
<br />
If you are annoyed by sudo's defaults that require you to enter your password every time you open a new terminal, set {{ic|timestamp_type}} to {{ic|global}}:<br />
<br />
Defaults timestamp_type=global<br />
<br />
=== Reduce the number of times you have to type a password ===<br />
<br />
If you are annoyed that you have to re-enter your password every 5 minutes (default), you can change this by setting a longer value for {{ic|timestamp_timeout}} (in minutes):<br />
<br />
Defaults timestamp_timeout=10<br />
<br />
If you are using a lot of sudo commands on a row, it is more logical to refresh the timeout every time you use sudo than<br />
to increase {{ic|timestamp_timeout}}. Refreshing the timeout can be done with {{ic|sudo -v}} (whereas {{ic|sudo -K}} revokes immediately).<br />
<br />
You might want to automate this by adding the following to your {{ic|.bashrc}}:<br />
<br />
alias sudo='sudo -v; sudo '<br />
<br />
It is also possible to use a bash function; for more details see [https://unix.stackexchange.com/questions/584725/expand-certain-aliases-from-within-sudo-bash-function stackexchange].<br />
<br />
=== Environment variables ===<br />
<br />
If you have a lot of environment variables, or you export your proxy settings via {{ic|1=export http_proxy="..."}}, when using sudo these variables do not get passed to the root account unless you run sudo with the {{ic|-E}} option.<br />
<br />
$ sudo -E pacman -Syu<br />
<br />
The recommended way of preserving environment variables is to append them to {{ic|env_keep}}:<br />
<br />
{{hc|/etc/sudoers|2=<br />
Defaults env_keep += "ftp_proxy http_proxy https_proxy no_proxy"<br />
}}<br />
<br />
=== Root password ===<br />
<br />
Users can configure sudo to ask for the root password instead of the user password by adding {{ic|targetpw}} (target user, defaults to root) or {{ic|rootpw}} to the Defaults line in {{ic|/etc/sudoers}}:<br />
Defaults targetpw<br />
<br />
To prevent exposing your root password to users, you can restrict this to a specific group:<br />
Defaults:%wheel targetpw<br />
%wheel ALL=(ALL) ALL<br />
<br />
=== Disable root login ===<br />
<br />
Users may wish to disable the root login. Without root, attackers must first guess a user name configured as a sudoer as well as the user password. See for example [[OpenSSH#Deny]].<br />
<br />
{{Warning|<br />
* Be careful, you may lock yourself out by disabling root login. Sudo is not automatically installed and its default configuration allows neither passwordless root access nor root access with your own password. Ensure a user is properly configured as a sudoer ''before'' disabling the root account!<br />
* If you have changed your sudoers file to use rootpw as default, then do not disable root login with any of the following commands!<br />
* If you are already locked out, see [[Password recovery]] for help.<br />
}}<br />
<br />
The account can be locked via {{ic|passwd}}:<br />
<br />
# passwd -l root<br />
<br />
A similar command unlocks root.<br />
<br />
$ sudo passwd -u root<br />
<br />
Alternatively, edit {{ic|/etc/shadow}} and replace the root's encrypted password with "!":<br />
<br />
root:!:12345::::::<br />
<br />
To enable root login again:<br />
<br />
$ sudo passwd root<br />
<br />
{{Tip|To get to an interactive root prompt, even after disabling the ''root'' account, use {{ic|sudo -i}}.}}<br />
<br />
==== kdesu ====<br />
<br />
kdesu may be used under [[KDE]] to launch GUI applications with root privileges. It is possible that by default kdesu will try to use su even if the root account is disabled. Fortunately one can tell kdesu to use sudo instead of su. Create/edit the file {{ic|~/.config/kdesurc}}:<br />
<br />
[super-user-command]<br />
super-user-command=sudo<br />
<br />
or use the following command:<br />
<br />
$ kwriteconfig5 --file kdesurc --group super-user-command --key super-user-command sudo<br />
<br />
=== Harden with sudo example ===<br />
<br />
Let us say you create 3 users: admin, devel, and archie. The user "admin" is used for journalctl, systemctl, mount, kill, and iptables; "devel" is used for installing packages, and editing configuration files; and "archie" is the user you log in with. To let "archie" reboot, shutdown, and use netctl we would do the following:<br />
<br />
Edit {{ic|/etc/pam.d/su}} and {{ic|/etc/pam.d/su-l}}. Require user be in the wheel group, but do not put anyone in it.<br />
<br />
#%PAM-1.0<br />
auth sufficient pam_rootok.so<br />
# Uncomment the following line to implicitly trust users in the "wheel" group.<br />
#auth sufficient pam_wheel.so trust use_uid<br />
# Uncomment the following line to require a user to be in the "wheel" group.<br />
auth required pam_wheel.so use_uid<br />
auth required pam_unix.so<br />
account required pam_unix.so<br />
session required pam_unix.so<br />
<br />
Limit SSH login to the 'ssh' group. Only "archie" will be part of this group.<br />
<br />
# groupadd -r ssh<br />
# gpasswd -a archie ssh<br />
# echo 'AllowGroups ssh' >> /etc/ssh/sshd_config<br />
<br />
[[Restart]] {{ic|sshd.service}}.<br />
<br />
Add users to other groups.<br />
<br />
# for g in power network ;do ;gpasswd -a archie $g ;done<br />
# for g in network power storage ;do ;gpasswd -a admin $g ;done<br />
<br />
Set permissions on configs so devel can edit them.<br />
<br />
# chown -R devel:root /etc/{http,openvpn,cups,zsh,vim,screenrc}<br />
<br />
Cmnd_Alias POWER = /usr/bin/shutdown -h now, /usr/bin/halt, /usr/bin/poweroff, /usr/bin/reboot<br />
Cmnd_Alias STORAGE = /usr/bin/mount -o nosuid\,nodev\,noexec, /usr/bin/umount<br />
Cmnd_Alias SYSTEMD = /usr/bin/journalctl, /usr/bin/systemctl<br />
Cmnd_Alias KILL = /usr/bin/kill, /usr/bin/killall<br />
Cmnd_Alias PKGMAN = /usr/bin/pacman<br />
Cmnd_Alias NETWORK = /usr/bin/netctl<br />
Cmnd_Alias FIREWALL = /usr/bin/iptables, /usr/bin/ip6tables<br />
Cmnd_Alias SHELL = /usr/bin/zsh, /usr/bin/bash<br />
%power ALL = (root) NOPASSWD: POWER<br />
%network ALL = (root) NETWORK<br />
%storage ALL = (root) STORAGE<br />
root ALL = (ALL) ALL<br />
admin ALL = (root) SYSTEMD, KILL, FIREWALL<br />
devel ALL = (root) PKGMAN<br />
archie ALL = (devel) SHELL, (admin) SHELL <br />
<br />
With this setup, you will almost never need to login as the root user.<br />
<br />
"archie" can connect to their home WiFi.<br />
<br />
$ sudo netctl start home<br />
$ sudo poweroff<br />
<br />
"archie" can not use netctl as any other user.<br />
<br />
$ sudo -u admin -- netctl start home<br />
<br />
When "archie" needs to use journalctl or kill run away process they can switch to that user.<br />
<br />
$ sudo -i -u devel<br />
$ sudo -i -u admin<br />
<br />
But "archie" cannot switch to the root user.<br />
<br />
$ sudo -i -u root<br />
<br />
If "archie" want to start a gnu-screen session as admin they can do it like this:<br />
<br />
$ sudo -i -u admin<br />
[admin]$ chown admin:tty `echo $TTY`<br />
[admin]$ screen<br />
<br />
=== Configure sudo using drop-in files in /etc/sudoers.d ===<br />
<br />
''sudo'' parses files contained in the directory {{ic|/etc/sudoers.d/}}. This means that instead of editing {{ic|/etc/sudoers}}, you can change settings in standalone files and drop them in that directory. This has two advantages:<br />
<br />
* There is no need to edit a {{ic|sudoers.pacnew}} file;<br />
* If there is a problem with a new entry, you can remove the offending file instead of editing {{ic|/etc/sudoers}} (but see the warning below).<br />
<br />
The format for entries in these drop-in files is the same as for {{ic|/etc/sudoers}} itself. To edit them directly, use {{ic|visudo -f /etc/sudoers.d/''somefile''}}. See {{man|5|sudoers|Including other files from within sudoers}} for details.<br />
<br />
The files in {{ic|/etc/sudoers.d/}} directory are parsed in lexicographical order, file names containing {{ic|.}} or {{ic|~}} are skipped. To avoid sorting problems, the file names should begin with two digits, e.g. {{ic|01_foo}}.<br />
<br />
{{Note|The order of entries in the drop-in files is important: make sure that the statements do not override themselves.}}<br />
<br />
{{Warning|The files in {{ic|/etc/sudoers.d/}} are just as fragile as {{ic|/etc/sudoers}} itself: any improperly formatted file will prevent {{ic|sudo}} from working. Hence, for the same reason it is strongly advised to use {{ic|visudo}}}}<br />
<br />
=== Editing files ===<br />
<br />
{{ic|sudo}} offers the {{ic|-e}} option ({{man|8|sudo|e}}), which is used to edit files.<br />
<br />
This is useful for editing files which can be edited by root only while still running the editor as a normal user and using that user’s configuration.<br />
<br />
To edit a file, set {{ic|SUDO_EDITOR}} to the name of the editor and pass the file name to {{ic|sudo -e}}. For example:<br />
<br />
$ SUDO_EDITOR=vim sudo -e /etc/file<br />
<br />
If multiple names are passed to {{ic|sudo}}, all files are opened in the editor in a single invocation. A feature useful for merging files:<br />
<br />
$ SUDO_EDITOR=vimdiff sudo -e /etc/file /etc/file.pacnew<br />
<br />
=== Enable insults ===<br />
<br />
Users can enable the insults easter egg in sudo by adding the following line in the {{ic|sudoers}} file with {{ic|visudo}}.<br />
<br />
{{hc|1=/etc/sudoers|2=<br />
Defaults insults<br />
}}<br />
<br />
Upon entering an incorrect password this will replace {{ic|Sorry, try again.}} message with humorous insults.<br />
<br />
== Troubleshooting ==<br />
<br />
=== SSH problem without TTY ===<br />
<br />
{{Merge|#Configuration}}<br />
<br />
SSH does not allocate a tty by default when running a remote command. Without an allocated tty, sudo cannot prevent the password from being displayed. You can use ssh's {{ic|-t}} option to force it to allocate a tty.<br />
<br />
The {{ic|Defaults}} option {{ic|requiretty}} only allows the user to run sudo if they have a tty.<br />
<br />
# Disable "ssh hostname sudo <cmd>", because it will show the password in clear text. You have to run "ssh -t hostname sudo <cmd>".<br />
#<br />
#Defaults requiretty<br />
<br />
=== Permissive umask ===<br />
<br />
{{Merge|#Configuration}}<br />
<br />
Sudo will union the user's [[umask]] value with its own umask (which defaults to 0022). This prevents sudo from creating files with more open permissions than the user's umask allows. While this is a sane default if no custom umask is in use, this can lead to situations where a utility run by sudo may create files with different permissions than if run by root directly. If errors arise from this, sudo provides a means to fix the umask, even if the desired umask is more permissive than the umask that the user has specified. Adding this (using {{ic|visudo}}) will override sudo's default behavior:<br />
<br />
Defaults umask = 0022<br />
Defaults umask_override<br />
<br />
This sets sudo's umask to root's default umask (0022) and overrides the default behavior, always using the indicated umask regardless of what umask the user as set.</div>Pdchttps://wiki.archlinux.org/index.php?title=Luakit&diff=748336Luakit2022-09-25T15:04:18Z<p>Pdc: /* See also */ Home page has moved</p>
<hr />
<div>[[Category:Web browser]]<br />
[[ja:Luakit]]<br />
[https://luakit.github.io/ Luakit] is an extremely fast, lightweight and flexible web browser using the webkit engine.<br />
It is customizable through lua scripts and fully usable with keyboard shortcuts.<br />
It uses GTK 3 and WebKit2GTK.<br />
<br />
{{Warning|This page has been updated, but Luakit is in rapid development nowadays, and discrepancies may occur. Also, there is much more to document than found here.}}<br />
<br />
== Installation ==<br />
<br />
Install the {{pkg|luakit}} package or {{AUR|luakit-git}} for the development version as the official website recommends.<br />
<br />
== Basic usage ==<br />
<br />
{{Style|Do we really need to duplicate upstream or internal documentation?}}<br />
<br />
{{note|Shortcuts are listed in a special page accessible with the {{ic|:binds}} command.}}<br />
<br />
Press {{ic|:}} to access the command prompt. You can do nearly everything from there.<br />
Use {{ic|Tab}} to autocomplete commands.<br />
<br />
Use the {{ic|:help}} command to get information on the available keyboard shortcuts and what they do. (To see how the action for a particular keyboard shortcut is implemented in Lua, click anywhere in its help text.)<br />
<br />
To quit, use the {{ic|:quit}} command, or press {{ic|Shift+z}} followed by {{ic|Shift+q}}.<br />
You can also close the browser while remembering the session (i.e. restoring the tabs) by using the {{ic|:writequit}} command instead, or pressing {{ic|Shift+z}} twice.<br />
<br />
=== Browsing ===<br />
<br />
* Press {{ic|o}} to open a prompt with the {{ic|:open}} command and enter the URI you want. Press {{ic|Shift+o}} to edit the current URI.<br />
* If it is not a recognized URI, Luakit will use the default search engine. See [[#Custom search engines]].<br />
* Specify which search engine to use by prefixing the entry with the appropriate keywork (e.g. {{ic|:open google foobar}} will search ''foobar'' on Google).<br />
* Use common shortcuts to navigate. For [[emacs]] and [[vim]] ''aficionados'', some of their regular shortcuts are provided. You can use the mouse as well.<br />
* Use {{ic|f}} to display the index of all visible links. Enter the appropriate number or a part of the string to open the link.<br />
* Use {{ic|Shift+f}} instead to open link in a new tab.<br />
* Press {{ic|Ctrl+t}} to open a new tab, {{ic|Ctrl+w}} to close it. Press {{ic|t}} to prompt for an URI to be opened in a new tab, and {{ic|Shift+t}} to edit the current URI in a new tab.<br />
* Press {{ic|w}} to prompt for an URI to be opened in a new window, and {{ic|Shift+w}} to edit the current URI in a new window.<br />
* Switch from one tab to another by pressing {{ic|g}} followed by {{ic|t}} or {{ic|Shift+t}}, or use {{ic|Ctrl+PageUp}} and {{ic|Ctrl+PageDown}}.<br />
* You can switch to a specific tab with {{ic|Alt+''number''}}.<br />
* Use {{ic|Shift+h}} to go back in the browser history.<br />
* Use {{ic|Shift+l}} to go forward in the browser history.<br />
* Reorder the tabs with {{ic|<}} and {{ic|>}}.<br />
* Reload the page with {{ic|r}}, stop the loading with {{ic|Ctrl+c}}.<br />
* Re-open last closed tab with {{ic|u}}.<br />
* Open downloads page by pressing {{ic|g}} followed by {{ic|d}} (or {{ic|Shift+d}} for a new tab).<br />
* Copy URI to primary selection with {{ic|y}}.<br />
* View page source code with {{ic|:viewsource}}. Return to normal view with {{ic|:viewsource!}}.<br />
* View image source by pressing {{ic|;}} followed by {{ic|i}} (or {{ic|Shift+i}} for new tab).<br />
* Inspect elements with {{ic|:inspect}}. Repeat to open in a new window. Disable inspector with {{ic|:inspect!}}.<br />
<br />
=== Input fields ===<br />
<br />
Many webpages have editable elements like dropdown lists, checkboxes, text fields and so on. While they work perfectly with the mouse, you may encounter some troubles using the ''follow'' commands.<br />
In such a case, pressing the arrow keys may help.<br />
Alternatively, the {{ic|g}} {{ic|i}} shortcut can be used to focus input.<br />
<br />
=== Bookmarks ===<br />
<br />
If enabled (default configuration), bookmarks can be used from within Luakit.<br />
<br />
* The {{ic|:bookmarks}} command opens the bookmarks page. (Shortcut: {{ic|g}} followed by {{ic|b}}, or {{ic|Shift+b}} for a new tab).<br />
* The {{ic|:bookmark [''URI'' [''tags'']]}} command adds the URI specified (or the current tab's URI, if omitted) to the bookmarks by specified tags. Starting from version 2012-09-13-r1, bookmarks page will be opened (new tab) in new bookmark editing mode before saving. (Shortcut: {{ic|Shift+b}}).<br />
<br />
== Configuration ==<br />
<br />
Configuration is done in {{ic|~/.config/luakit/userconf.lua}}. It is not<br />
necessary anymore to copy and modify {{ic|rc.lua}}. Some settings can also be<br />
modified with the {{ic|:settings}} command, unless you set them in {{ic|userconf.lua}} with:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
local settings = require "settings"<br />
settings.example = "some value"<br />
}}<br />
<br />
=== Key bindings ===<br />
<br />
Most bindings will require some knowledge of Luakit, but you can at least do<br />
simple things rebinding:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
local modes = require "modes"<br />
<br />
-- Creates new bindings from old ones.<br />
modes.remap_binds("normal", -- This is the mode in which the bindings are active.<br />
{<br />
-- new old removes the old binding (defaults to false)<br />
{"O", "t", true},<br />
-- define as many as you wish<br />
{"Control-=", "zi"},<br />
...<br />
})<br />
}}<br />
<br />
To bind keys to commands, you can use the following template:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
modes.add_binds("normal", {<br />
-- {"<key>",<br />
-- "<description>",<br />
-- function (w) w:enter_cmd("<command>") end}<br />
{"O", "Open URL in a new tab.",<br />
function (w) w:enter_cmd(":tabopen ") end},<br />
...<br />
})<br />
}}<br />
<br />
For inspiration, see {{ic|/usr/share/luakit/lib/binds.lua}}, where the default<br />
bindings are defined.<br />
<br />
=== Homepage ===<br />
<br />
Set your homepage as follows:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
settings.window.home_page = "www.example.com"<br />
}}<br />
<br />
=== Custom search engines ===<br />
<br />
To search with the default search engine, press {{ic|o}} and type the phrases. To search with a different engine, type its name after {{ic|o}} and then the phrases.<br />
<br />
You can virtually add any search engine you want. Make a search on the website you want and copy paste the URI to the Luakit configuration by replacing the searched terms with an {{ic|%s}}. Example:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<nowiki><br />
local engines = settings.window.search_engines<br />
engines.aur = "https://aur.archlinux.org/packages?K=%s"<br />
engines.aw = "https://wiki.archlinux.org/index.php/Special:Search?fulltext=Search&search=%s"<br />
engines.googleseceng = "https://www.google.com/search?name=f&hl=en&q=%s"<br />
</nowiki>}}<br />
<br />
The variable is used as a keyword for the {{ic|:open}} command in Luakit.<br />
<br />
Set the defaut search engine by using this same keyword:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
engines.default = search_engines.aur<br />
}}<br />
<br />
Instead of strings, you can defined search engines as functions that return a<br />
string. For instance, here is a Wikipedia search engine that lets you specify<br />
a language (defaulting to English):<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
engines.wikipedia = function (arg)<br />
local l, s = arg:match("^(%a%a):%s*(.+)")<br />
if l then<br />
return "https://" .. l .. ".wikipedia.org/wiki/Special:Search?search=" .. s<br />
else<br />
return "https://en.wikipedia.org/wiki/Special:Search?search=" .. arg<br />
end<br />
end,<br />
}}<br />
<br />
If called as {{ic|:open wikipedia arch linux}}, this will open the Arch Linux<br />
page on the English Wikipedia; with {{ic|:open wikipedia fr: arch linux}},<br />
this will use the French Wikipedia instead.<br />
<br />
=== Download location ===<br />
<br />
To specify download location:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
require "downloads"<br />
downloads.default_dir = os.getenv("HOME") .. "/mydir"<br />
}}<br />
<br />
Default location is {{ic|$XDG_DOWNLOAD_DIR}} if it exists, {{ic|$HOME/downloads}} otherwise.<br />
<br />
=== Adblock ===<br />
<br />
Adblock is loaded by default, but you need to:<br />
<br />
* Fetch an adblock-compatible list, like [https://easylist-downloads.adblockplus.org/easylist.txt Easylist], and save it to {{ic|~/.local/share/luakit/adblock}}.<br />
* Restart Luakit to load the extension.<br />
* Use {{ic|:adblock-list-enable ''number''}} command within Luakit to turn Adblock's list(s) you downloaded on Adblock itself becomes enabled on startup.<br />
Full info on enabled lists and AdBlock state can be found using {{ic|:adblock}} or {{ic|g}} {{ic|Shift+a}} at {{ic|luakit://adblock/}} internal page, if the {{ic|adblock_chrome}} module is enabled, which is not a mandatory part.<br />
<br />
{{Note|For Adblock to run in '''normal''' mode, {{ic|easylist.txt}} and any others must be placed in {{ic|~/.local/share/luakit/adblock}}}}<br />
<br />
=== Bookmarks management ===<br />
<br />
==== Sync ====<br />
<br />
Starting from version 2012.09.13, Luakit bookmarks are stored in an SQLite database: {{ic|~/.local/share/luakit/bookmarks.db}}.<br />
<br />
You can put a symbolic link in place of the default file to store your bookmarks anywhere on your machine.<br />
This way if your are using a cloud sync application like Dropbox, you can keep your bookmarks synchronized between your different computers.<br />
<br />
==== Converting plain text bookmarks to SQLite format ====<br />
<br />
Bookmarks were stored in a simple plain text file: {{ic|~/.local/share/luakit/bookmarks}}. Each line is a bookmark. It is composed of 2 fields, the ''link'' and the ''group'' which are separated by a ''tab'' character.<br />
<br />
{{Warning|If spaces are inserted instead of tabulation character, the link will not be properly bookmarked.}}<br />
<br />
{{Note|Groups and links are alphabetically sorted, so there is no need to do it manually.}}<br />
<br />
To use bookmarks with the latest Luakit release, the file must be converted.<br />
A sample Lua script will do that:<br />
<br />
{{hc|bookmarks_plain_to_sqlite.lua|<nowiki><br />
local usage = [[Usage: luakit -c bookmarks_plain_to_sqlite.lua [bookmark plaintext path] [bookmark db path]<br />
]]<br />
<br />
local old_db_path, new_db_path = unpack(uris)<br />
<br />
if not old_db_path or not new_db_path then<br />
io.stdout:write(usage)<br />
luakit.quit(1)<br />
end<br />
<br />
-- One-pass file read into 'data' var.<br />
old_db = assert(io.open(old_db_path, "r"))<br />
local data = old_db:read("*all")<br />
assert(old_db:close())<br />
<br />
-- Init new_db, otherwise sqlite queries will fail.<br />
new_db = sqlite3{ filename = new_db_path }<br />
new_db:exec("CREATE TABLE IF NOT EXISTS bookmarks (id INTEGER PRIMARY KEY, uri TEXT NOT NULL, title TEXT NOT NULL, desc TEXT NOT NULL, tags TEXT NOT NULL, created INTEGER, modified INTEGER )")<br />
<br />
-- Fill<br />
local url,tag<br />
<br />
for line in data:gmatch("[^\n]*\n?") do<br />
<br />
if string.len(line) > 1 then<br />
<br />
print ("["..line.."]")<br />
<br />
-- Get url and tag (if present) from first line.<br />
_, _, url, tag = string.find(line, "([^\n\t]+)\t*([^\n]*)\n?")<br />
<br />
-- Optional yet convenient output.<br />
io.write(url)<br />
io.write("\t")<br />
io.write(tag)<br />
io.write("\n")<br />
<br />
-- DB insertion. Nothing will be overwritten. If URL and/or tag already exists, then a double is created.<br />
new_db:exec("INSERT INTO bookmarks VALUES (NULL, ?, ?, ?, ?, ?, ?)", <br />
{<br />
url, "", "", tag or "",<br />
os.time(), os.time()<br />
})<br />
end<br />
end<br />
<br />
print("Import finished.")<br />
print("\nVacuuming database...")<br />
new_db:exec "VACUUM"<br />
print("Vacuum done.")<br />
<br />
luakit.quit(0)<br />
</nowiki>}}<br />
<br />
As stated at beginning of the script, it must be ran with Luakit:<br />
<br />
$ luakit -c bookmarks_plain_to_sqlite.lua ''path/to/plaintext/bookmark'' ''path/to/db''<br />
<br />
The old plaintext bookmarks will be left unchanged. If the DB bookmarks do not exist, the file will be created. If it exists, do not worry, none of the previous bookmarks will be touched. However, this behaviour implies that you might get some doubles.<br />
<br />
==== Import from Firefox ====<br />
<br />
{{Note|This works only for Luakit versions before 2012.03.25! For newer version, you can first run this script, then convert the generted plain text bookmarks to the SQLite format as described at [[#Converting plain text bookmarks to SQLite format]].}}<br />
<br />
To import bookmarks from Firefox, first they must be exported to an HTML file using its bookmarks manager. After that the XML file can be converted to a Luakit format.<br />
<br />
The following one-line awk command will do that:<br />
<br />
{{bc|<nowiki><br />
$ cat bookmarks.html | awk '<br />
{gsub(/\"/," ")}<br />
/<\/H3>/{FS=">";gsub(/</,">");og=g;g=$(NF-2);FS=" "}<br />
/<DL>/{x++;if(x>= 3)gl[x-3]=g}<br />
/<\/DL>/{x--;if(x==2)g=og"2"}<br />
/HREF/{gsub(/</," ");gsub(/>/," ");if(g!=""){if(og!=g){printf "\n";og=g};printf "%s\t",$4;if(x>=3){for(i=0;i<=x-4;i++){printf "%s-",gl[i]}printf "%s\n",gl[x-3]}else{printf "\n"}}}'<br />
</nowiki>}}<br />
<br />
The more readable version of the script:<br />
<br />
{{hc|ff2lk.awk|<nowiki><br />
# Notes: 'folders' for Firefox bookmarks mean 'groups' for Luakit.<br />
<br />
# Put spaces where it is needed to delimit words properly.<br />
{gsub(/\"/," ")}<br />
<br />
# Since the folder name may have spaces, delimiter must be ">" here.<br />
/<\/H3>/ {<br />
FS=">"<br />
gsub(/</,">")<br />
oldgroup=group<br />
group=$(NF-2)<br />
FS=" "<br />
}<br />
<br />
# Each time a <DL> is encountered, it means we step into a subfolder.<br />
# 'count' is the depth level.<br />
# Base level starts at 2 (Firefox fault).<br />
# 'groupline' is an array of all parent folders.<br />
/<DL>/ {<br />
count++<br />
if ( count >= 3 )<br />
groupline[count-3]=group<br />
}<br />
<br />
# On </DL>, we step out.<br />
# If if return to the base level (i.e. not in a folder), then we give 'group' a fake name different<br />
# from 'oldgroup' to make sure a line will be skipped (see below).<br />
/<\/DL>/ {<br />
count--<br />
if( count == 2 )<br />
group=oldgroup"ROOT"<br />
}<br />
<br />
# The bookmark name.<br />
# If oldgroup is different than group, (i.e. folder changed) then we skip a line.<br />
# If we are in a folder, then we print the group name, i.e. all parents plus the current folder<br />
# separated by an hyphen.<br />
/HREF/ {<br />
gsub(/</," ")<br />
gsub(/>/," ")<br />
if (group != "")<br />
{<br />
if(oldgroup != group)<br />
{<br />
printf "\n"<br />
oldgroup=group<br />
}<br />
printf "%s\t",$4<br />
if ( count >= 3 )<br />
{<br />
for ( i=0 ; i <= count-4 ; i++ )<br />
{printf "%s-" , groupline[i]}<br />
printf "%s" , groupline[count-3]<br />
}<br />
printf "\n"<br />
}<br />
}</nowiki><br />
}}<br />
<br />
Run it with<br />
<br />
$ awk -f ff2lk.awk bookmarks.html >> bookmarks<br />
<br />
==== Export bookmarks ====<br />
<br />
The following script let you export Luakit bookmarks from its SQLite format to a plain text file. The resulting file may be suitable for other web browsers, or may be easily parsed by import scripts.<br />
<br />
{{hc|bookmarks_sqlite_to_plain.lua|<nowiki><br />
-- USER CONFIG<br />
<br />
local sep = " "<br />
<br />
-- END OF USER CONFIG<br />
<br />
local usage = [[Usage: luakit -c bookmarks_sqlite_to_plain.lua [bookmark db path] [bookmark plain path]<br />
<br />
DB scheme is<br />
<br />
bookmarks (<br />
id INTEGER PRIMARY KEY,<br />
uri TEXT NOT NULL,<br />
title TEXT NOT NULL,<br />
desc TEXT NOT NULL,<br />
tags TEXT NOT NULL,<br />
created INTEGER,<br />
modified INTEGER<br />
);<br />
]]<br />
<br />
local old_db_path, new_db_path = unpack(uris)<br />
<br />
if not old_db_path or not new_db_path then<br />
io.stdout:write(usage)<br />
luakit.quit(1)<br />
end<br />
<br />
-- One-pass file read into 'data' var.<br />
new_db = assert(io.open(new_db_path, "w"))<br />
<br />
-- Open old_db<br />
old_db = sqlite3{ filename = old_db_path }<br />
<br />
-- Load all db values to a string variable.<br />
local rows = old_db:exec [[ SELECT * FROM bookmarks ]]<br />
<br />
-- Iterate over all entries.<br />
-- Note: it could be faster to use one single concatenation for all entries, but<br />
-- it would be much more code and not so flexible. It is desirable to focus on<br />
-- clarity. After all, only a few hundred lines are handled.<br />
for _, b in ipairs(rows) do<br />
<br />
-- Change %q for %s to remove double quotes if needed.<br />
-- You can toggle the desired fields with comments.<br />
local outputstr = <br />
string.format("%q%s", b.uri or "", sep) .. <br />
string.format("%q%s", b.title or "", sep) ..<br />
string.format("%q%s", b.desc or "", sep) ..<br />
string.format("%q%s- ", b.tags or "", sep) ..<br />
((b.created or "" ) .. sep) ..<br />
((b.modified or "" ) .. sep) ..<br />
"\n"<br />
<br />
-- Write entry to file.<br />
new_db:write(outputstr)<br />
end<br />
<br />
<br />
print("Export done.")<br />
<br />
assert(new_db:close())<br />
<br />
luakit.quit(0)</nowiki><br />
}}<br />
<br />
As stated at beginning of the script, it must be ran with Luakit:<br />
<br />
$ luakit -c bookmarks_plain_to_sqlite.lua ''path/to/plaintext/bookmarks'' ''path/to/database''<br />
<br />
=== Tor ===<br />
<br />
Once [[Tor]] has been setup, simply run:<br />
<br />
$ torsocks luakit --nounique<br />
<br />
{{warning|To be sure of anonymity, you also need to change settings within Luakit, such as disabling Flash and changing the useragent string.}}<br />
<br />
=== Custom CSS ===<br />
<br />
Locate the {{ic|styles}} sub-directory within luakit's data storage directory.<br />
Normally, this is located at {{ic|~/.local/share/luakit/styles/}}. Create the<br />
directory if it does not already exist.<br />
Move any CSS rules to a new file within that directory. The filename must end in {{ic|.css}}.<br />
Make sure you specify which sites your stylesheet should apply to. The way to<br />
do this is to use {{ic|@-moz-document}} rules. The Stylish wiki page [https://github.com/stylish-userstyles/stylish/wiki/Applying-styles-to-specific-sites Applying styles to specific sites] may be helpful.<br />
Run {{ic|:styles-reload}} to detect new stylesheet files and reload any changes to<br />
existing stylesheet files; it is not necessary to restart luakit.<br />
<br />
To open the styles menu, run the command {{ic|:styles-list}}. Here you can<br />
enable/disable stylesheets, open stylesheets in your text editor, and view<br />
which stylesheets are active.<br />
<br />
If a stylesheet is disabled for all pages, its state will be listed as<br />
"Disabled". If a stylesheet is enabled for all pages, but does not apply to<br />
the current page, its state will be listed as "Enabled". If a stylesheet is<br />
enbaled for all pages _and_ it applies to the current page, its state will be<br />
listed as "Active".<br />
<br />
== See also ==<br />
<br />
* [https://luakit.github.io/ Home page]<br />
* [http://shariebeth.com/computers/luakitcheatsheet.txt Cheatsheet]</div>Pdchttps://wiki.archlinux.org/index.php?title=Luakit&diff=743588Luakit2022-08-27T19:05:48Z<p>Pdc: /* Custom search engines */ Update search pattern for AUR</p>
<hr />
<div>[[Category:Web browser]]<br />
[[ja:Luakit]]<br />
[https://luakit.github.io/ Luakit] is an extremely fast, lightweight and flexible web browser using the webkit engine.<br />
It is customizable through lua scripts and fully usable with keyboard shortcuts.<br />
It uses GTK 3 and WebKit2GTK.<br />
<br />
{{Warning|This page has been updated, but Luakit is in rapid development nowadays, and discrepancies may occur. Also, there is much more to document than found here.}}<br />
<br />
== Installation ==<br />
<br />
Install the {{pkg|luakit}} package or {{AUR|luakit-git}} for the development version as the official website recommends.<br />
<br />
== Basic usage ==<br />
<br />
{{Style|Do we really need to duplicate upstream or internal documentation?}}<br />
<br />
{{note|Shortcuts are listed in a special page accessible with the {{ic|:binds}} command.}}<br />
<br />
Press {{ic|:}} to access the command prompt. You can do nearly everything from there.<br />
Use {{ic|Tab}} to autocomplete commands.<br />
<br />
Use the {{ic|:help}} command to get information on the available keyboard shortcuts and what they do. (To see how the action for a particular keyboard shortcut is implemented in Lua, click anywhere in its help text.)<br />
<br />
To quit, use the {{ic|:quit}} command, or press {{ic|Shift+z}} followed by {{ic|Shift+q}}.<br />
You can also close the browser while remembering the session (i.e. restoring the tabs) by using the {{ic|:writequit}} command instead, or pressing {{ic|Shift+z}} twice.<br />
<br />
=== Browsing ===<br />
<br />
* Press {{ic|o}} to open a prompt with the {{ic|:open}} command and enter the URI you want. Press {{ic|Shift+o}} to edit the current URI.<br />
* If it is not a recognized URI, Luakit will use the default search engine. See [[#Custom search engines]].<br />
* Specify which search engine to use by prefixing the entry with the appropriate keywork (e.g. {{ic|:open google foobar}} will search ''foobar'' on Google).<br />
* Use common shortcuts to navigate. For [[emacs]] and [[vim]] ''aficionados'', some of their regular shortcuts are provided. You can use the mouse as well.<br />
* Use {{ic|f}} to display the index of all visible links. Enter the appropriate number or a part of the string to open the link.<br />
* Use {{ic|Shift+f}} instead to open link in a new tab.<br />
* Press {{ic|Ctrl+t}} to open a new tab, {{ic|Ctrl+w}} to close it. Press {{ic|t}} to prompt for an URI to be opened in a new tab, and {{ic|Shift+t}} to edit the current URI in a new tab.<br />
* Press {{ic|w}} to prompt for an URI to be opened in a new window, and {{ic|Shift+w}} to edit the current URI in a new window.<br />
* Switch from one tab to another by pressing {{ic|g}} followed by {{ic|t}} or {{ic|Shift+t}}, or use {{ic|Ctrl+PageUp}} and {{ic|Ctrl+PageDown}}.<br />
* You can switch to a specific tab with {{ic|Alt+''number''}}.<br />
* Use {{ic|Shift+h}} to go back in the browser history.<br />
* Use {{ic|Shift+l}} to go forward in the browser history.<br />
* Reorder the tabs with {{ic|<}} and {{ic|>}}.<br />
* Reload the page with {{ic|r}}, stop the loading with {{ic|Ctrl+c}}.<br />
* Re-open last closed tab with {{ic|u}}.<br />
* Open downloads page by pressing {{ic|g}} followed by {{ic|d}} (or {{ic|Shift+d}} for a new tab).<br />
* Copy URI to primary selection with {{ic|y}}.<br />
* View page source code with {{ic|:viewsource}}. Return to normal view with {{ic|:viewsource!}}.<br />
* View image source by pressing {{ic|;}} followed by {{ic|i}} (or {{ic|Shift+i}} for new tab).<br />
* Inspect elements with {{ic|:inspect}}. Repeat to open in a new window. Disable inspector with {{ic|:inspect!}}.<br />
<br />
=== Input fields ===<br />
<br />
Many webpages have editable elements like dropdown lists, checkboxes, text fields and so on. While they work perfectly with the mouse, you may encounter some troubles using the ''follow'' commands.<br />
In such a case, pressing the arrow keys may help.<br />
Alternatively, the {{ic|g}} {{ic|i}} shortcut can be used to focus input.<br />
<br />
=== Bookmarks ===<br />
<br />
If enabled (default configuration), bookmarks can be used from within Luakit.<br />
<br />
* The {{ic|:bookmarks}} command opens the bookmarks page. (Shortcut: {{ic|g}} followed by {{ic|b}}, or {{ic|Shift+b}} for a new tab).<br />
* The {{ic|:bookmark [''URI'' [''tags'']]}} command adds the URI specified (or the current tab's URI, if omitted) to the bookmarks by specified tags. Starting from version 2012-09-13-r1, bookmarks page will be opened (new tab) in new bookmark editing mode before saving. (Shortcut: {{ic|Shift+b}}).<br />
<br />
== Configuration ==<br />
<br />
Configuration is done in {{ic|~/.config/luakit/userconf.lua}}. It is not<br />
necessary anymore to copy and modify {{ic|rc.lua}}. Some settings can also be<br />
modified with the {{ic|:settings}} command, unless you set them in {{ic|userconf.lua}} with:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
local settings = require "settings"<br />
settings.example = "some value"<br />
}}<br />
<br />
=== Key bindings ===<br />
<br />
Most bindings will require some knowledge of Luakit, but you can at least do<br />
simple things rebinding:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
local modes = require "modes"<br />
<br />
-- Creates new bindings from old ones.<br />
modes.remap_binds("normal", -- This is the mode in which the bindings are active.<br />
{<br />
-- new old removes the old binding (defaults to false)<br />
{"O", "t", true},<br />
-- define as many as you wish<br />
{"Control-=", "zi"},<br />
...<br />
})<br />
}}<br />
<br />
To bind keys to commands, you can use the following template:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
modes.add_binds("normal", {<br />
-- {"<key>",<br />
-- "<description>",<br />
-- function (w) w:enter_cmd("<command>") end}<br />
{"O", "Open URL in a new tab.",<br />
function (w) w:enter_cmd(":tabopen ") end},<br />
...<br />
})<br />
}}<br />
<br />
For inspiration, see {{ic|/usr/share/luakit/lib/binds.lua}}, where the default<br />
bindings are defined.<br />
<br />
=== Homepage ===<br />
<br />
Set your homepage as follows:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
settings.window.home_page = "www.example.com"<br />
}}<br />
<br />
=== Custom search engines ===<br />
<br />
To search with the default search engine, press {{ic|o}} and type the phrases. To search with a different engine, type its name after {{ic|o}} and then the phrases.<br />
<br />
You can virtually add any search engine you want. Make a search on the website you want and copy paste the URI to the Luakit configuration by replacing the searched terms with an {{ic|%s}}. Example:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<nowiki><br />
local engines = settings.window.search_engines<br />
engines.aur = "https://aur.archlinux.org/packages?K=%s"<br />
engines.aw = "https://wiki.archlinux.org/index.php/Special:Search?fulltext=Search&search=%s"<br />
engines.googleseceng = "https://www.google.com/search?name=f&hl=en&q=%s"<br />
</nowiki>}}<br />
<br />
The variable is used as a keyword for the {{ic|:open}} command in Luakit.<br />
<br />
Set the defaut search engine by using this same keyword:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
engines.default = search_engines.aur<br />
}}<br />
<br />
Instead of strings, you can defined search engines as functions that return a<br />
string. For instance, here is a Wikipedia search engine that lets you specify<br />
a language (defaulting to English):<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
engines.wikipedia = function (arg)<br />
local l, s = arg:match("^(%a%a):%s*(.+)")<br />
if l then<br />
return "https://" .. l .. ".wikipedia.org/wiki/Special:Search?search=" .. s<br />
else<br />
return "https://en.wikipedia.org/wiki/Special:Search?search=" .. arg<br />
end<br />
end,<br />
}}<br />
<br />
If called as {{ic|:open wikipedia arch linux}}, this will open the Arch Linux<br />
page on the English Wikipedia; with {{ic|:open wikipedia fr: arch linux}},<br />
this will use the French Wikipedia instead.<br />
<br />
=== Download location ===<br />
<br />
To specify download location:<br />
<br />
{{hc|~/.config/luakit/userconf.lua|2=<br />
require "downloads"<br />
downloads.default_dir = os.getenv("HOME") .. "/mydir"<br />
}}<br />
<br />
Default location is {{ic|$XDG_DOWNLOAD_DIR}} if it exists, {{ic|$HOME/downloads}} otherwise.<br />
<br />
=== Adblock ===<br />
<br />
Adblock is loaded by default, but you need to:<br />
<br />
* Fetch an adblock-compatible list, like [https://easylist-downloads.adblockplus.org/easylist.txt Easylist], and save it to {{ic|~/.local/share/luakit/adblock}}.<br />
* Restart Luakit to load the extension.<br />
* Use {{ic|:adblock-list-enable ''number''}} command within Luakit to turn Adblock's list(s) you downloaded on Adblock itself becomes enabled on startup.<br />
Full info on enabled lists and AdBlock state can be found using {{ic|:adblock}} or {{ic|g}} {{ic|Shift+a}} at {{ic|luakit://adblock/}} internal page, if the {{ic|adblock_chrome}} module is enabled, which is not a mandatory part.<br />
<br />
{{Note|For Adblock to run in '''normal''' mode, {{ic|easylist.txt}} and any others must be placed in {{ic|~/.local/share/luakit/adblock}}}}<br />
<br />
=== Bookmarks management ===<br />
<br />
==== Sync ====<br />
<br />
Starting from version 2012.09.13, Luakit bookmarks are stored in an SQLite database: {{ic|~/.local/share/luakit/bookmarks.db}}.<br />
<br />
You can put a symbolic link in place of the default file to store your bookmarks anywhere on your machine.<br />
This way if your are using a cloud sync application like Dropbox, you can keep your bookmarks synchronized between your different computers.<br />
<br />
==== Converting plain text bookmarks to SQLite format ====<br />
<br />
Bookmarks were stored in a simple plain text file: {{ic|~/.local/share/luakit/bookmarks}}. Each line is a bookmark. It is composed of 2 fields, the ''link'' and the ''group'' which are separated by a ''tab'' character.<br />
<br />
{{Warning|If spaces are inserted instead of tabulation character, the link will not be properly bookmarked.}}<br />
<br />
{{Note|Groups and links are alphabetically sorted, so there is no need to do it manually.}}<br />
<br />
To use bookmarks with the latest Luakit release, the file must be converted.<br />
A sample Lua script will do that:<br />
<br />
{{hc|bookmarks_plain_to_sqlite.lua|<nowiki><br />
local usage = [[Usage: luakit -c bookmarks_plain_to_sqlite.lua [bookmark plaintext path] [bookmark db path]<br />
]]<br />
<br />
local old_db_path, new_db_path = unpack(uris)<br />
<br />
if not old_db_path or not new_db_path then<br />
io.stdout:write(usage)<br />
luakit.quit(1)<br />
end<br />
<br />
-- One-pass file read into 'data' var.<br />
old_db = assert(io.open(old_db_path, "r"))<br />
local data = old_db:read("*all")<br />
assert(old_db:close())<br />
<br />
-- Init new_db, otherwise sqlite queries will fail.<br />
new_db = sqlite3{ filename = new_db_path }<br />
new_db:exec("CREATE TABLE IF NOT EXISTS bookmarks (id INTEGER PRIMARY KEY, uri TEXT NOT NULL, title TEXT NOT NULL, desc TEXT NOT NULL, tags TEXT NOT NULL, created INTEGER, modified INTEGER )")<br />
<br />
-- Fill<br />
local url,tag<br />
<br />
for line in data:gmatch("[^\n]*\n?") do<br />
<br />
if string.len(line) > 1 then<br />
<br />
print ("["..line.."]")<br />
<br />
-- Get url and tag (if present) from first line.<br />
_, _, url, tag = string.find(line, "([^\n\t]+)\t*([^\n]*)\n?")<br />
<br />
-- Optional yet convenient output.<br />
io.write(url)<br />
io.write("\t")<br />
io.write(tag)<br />
io.write("\n")<br />
<br />
-- DB insertion. Nothing will be overwritten. If URL and/or tag already exists, then a double is created.<br />
new_db:exec("INSERT INTO bookmarks VALUES (NULL, ?, ?, ?, ?, ?, ?)", <br />
{<br />
url, "", "", tag or "",<br />
os.time(), os.time()<br />
})<br />
end<br />
end<br />
<br />
print("Import finished.")<br />
print("\nVacuuming database...")<br />
new_db:exec "VACUUM"<br />
print("Vacuum done.")<br />
<br />
luakit.quit(0)<br />
</nowiki>}}<br />
<br />
As stated at beginning of the script, it must be ran with Luakit:<br />
<br />
$ luakit -c bookmarks_plain_to_sqlite.lua ''path/to/plaintext/bookmark'' ''path/to/db''<br />
<br />
The old plaintext bookmarks will be left unchanged. If the DB bookmarks do not exist, the file will be created. If it exists, do not worry, none of the previous bookmarks will be touched. However, this behaviour implies that you might get some doubles.<br />
<br />
==== Import from Firefox ====<br />
<br />
{{Note|This works only for Luakit versions before 2012.03.25! For newer version, you can first run this script, then convert the generted plain text bookmarks to the SQLite format as described at [[#Converting plain text bookmarks to SQLite format]].}}<br />
<br />
To import bookmarks from Firefox, first they must be exported to an HTML file using its bookmarks manager. After that the XML file can be converted to a Luakit format.<br />
<br />
The following one-line awk command will do that:<br />
<br />
{{bc|<nowiki><br />
$ cat bookmarks.html | awk '<br />
{gsub(/\"/," ")}<br />
/<\/H3>/{FS=">";gsub(/</,">");og=g;g=$(NF-2);FS=" "}<br />
/<DL>/{x++;if(x>= 3)gl[x-3]=g}<br />
/<\/DL>/{x--;if(x==2)g=og"2"}<br />
/HREF/{gsub(/</," ");gsub(/>/," ");if(g!=""){if(og!=g){printf "\n";og=g};printf "%s\t",$4;if(x>=3){for(i=0;i<=x-4;i++){printf "%s-",gl[i]}printf "%s\n",gl[x-3]}else{printf "\n"}}}'<br />
</nowiki>}}<br />
<br />
The more readable version of the script:<br />
<br />
{{hc|ff2lk.awk|<nowiki><br />
# Notes: 'folders' for Firefox bookmarks mean 'groups' for Luakit.<br />
<br />
# Put spaces where it is needed to delimit words properly.<br />
{gsub(/\"/," ")}<br />
<br />
# Since the folder name may have spaces, delimiter must be ">" here.<br />
/<\/H3>/ {<br />
FS=">"<br />
gsub(/</,">")<br />
oldgroup=group<br />
group=$(NF-2)<br />
FS=" "<br />
}<br />
<br />
# Each time a <DL> is encountered, it means we step into a subfolder.<br />
# 'count' is the depth level.<br />
# Base level starts at 2 (Firefox fault).<br />
# 'groupline' is an array of all parent folders.<br />
/<DL>/ {<br />
count++<br />
if ( count >= 3 )<br />
groupline[count-3]=group<br />
}<br />
<br />
# On </DL>, we step out.<br />
# If if return to the base level (i.e. not in a folder), then we give 'group' a fake name different<br />
# from 'oldgroup' to make sure a line will be skipped (see below).<br />
/<\/DL>/ {<br />
count--<br />
if( count == 2 )<br />
group=oldgroup"ROOT"<br />
}<br />
<br />
# The bookmark name.<br />
# If oldgroup is different than group, (i.e. folder changed) then we skip a line.<br />
# If we are in a folder, then we print the group name, i.e. all parents plus the current folder<br />
# separated by an hyphen.<br />
/HREF/ {<br />
gsub(/</," ")<br />
gsub(/>/," ")<br />
if (group != "")<br />
{<br />
if(oldgroup != group)<br />
{<br />
printf "\n"<br />
oldgroup=group<br />
}<br />
printf "%s\t",$4<br />
if ( count >= 3 )<br />
{<br />
for ( i=0 ; i <= count-4 ; i++ )<br />
{printf "%s-" , groupline[i]}<br />
printf "%s" , groupline[count-3]<br />
}<br />
printf "\n"<br />
}<br />
}</nowiki><br />
}}<br />
<br />
Run it with<br />
<br />
$ awk -f ff2lk.awk bookmarks.html >> bookmarks<br />
<br />
==== Export bookmarks ====<br />
<br />
The following script let you export Luakit bookmarks from its SQLite format to a plain text file. The resulting file may be suitable for other web browsers, or may be easily parsed by import scripts.<br />
<br />
{{hc|bookmarks_sqlite_to_plain.lua|<nowiki><br />
-- USER CONFIG<br />
<br />
local sep = " "<br />
<br />
-- END OF USER CONFIG<br />
<br />
local usage = [[Usage: luakit -c bookmarks_sqlite_to_plain.lua [bookmark db path] [bookmark plain path]<br />
<br />
DB scheme is<br />
<br />
bookmarks (<br />
id INTEGER PRIMARY KEY,<br />
uri TEXT NOT NULL,<br />
title TEXT NOT NULL,<br />
desc TEXT NOT NULL,<br />
tags TEXT NOT NULL,<br />
created INTEGER,<br />
modified INTEGER<br />
);<br />
]]<br />
<br />
local old_db_path, new_db_path = unpack(uris)<br />
<br />
if not old_db_path or not new_db_path then<br />
io.stdout:write(usage)<br />
luakit.quit(1)<br />
end<br />
<br />
-- One-pass file read into 'data' var.<br />
new_db = assert(io.open(new_db_path, "w"))<br />
<br />
-- Open old_db<br />
old_db = sqlite3{ filename = old_db_path }<br />
<br />
-- Load all db values to a string variable.<br />
local rows = old_db:exec [[ SELECT * FROM bookmarks ]]<br />
<br />
-- Iterate over all entries.<br />
-- Note: it could be faster to use one single concatenation for all entries, but<br />
-- it would be much more code and not so flexible. It is desirable to focus on<br />
-- clarity. After all, only a few hundred lines are handled.<br />
for _, b in ipairs(rows) do<br />
<br />
-- Change %q for %s to remove double quotes if needed.<br />
-- You can toggle the desired fields with comments.<br />
local outputstr = <br />
string.format("%q%s", b.uri or "", sep) .. <br />
string.format("%q%s", b.title or "", sep) ..<br />
string.format("%q%s", b.desc or "", sep) ..<br />
string.format("%q%s- ", b.tags or "", sep) ..<br />
((b.created or "" ) .. sep) ..<br />
((b.modified or "" ) .. sep) ..<br />
"\n"<br />
<br />
-- Write entry to file.<br />
new_db:write(outputstr)<br />
end<br />
<br />
<br />
print("Export done.")<br />
<br />
assert(new_db:close())<br />
<br />
luakit.quit(0)</nowiki><br />
}}<br />
<br />
As stated at beginning of the script, it must be ran with Luakit:<br />
<br />
$ luakit -c bookmarks_plain_to_sqlite.lua ''path/to/plaintext/bookmarks'' ''path/to/database''<br />
<br />
=== Tor ===<br />
<br />
Once [[Tor]] has been setup, simply run:<br />
<br />
$ torsocks luakit --nounique<br />
<br />
{{warning|To be sure of anonymity, you also need to change settings within Luakit, such as disabling Flash and changing the useragent string.}}<br />
<br />
=== Custom CSS ===<br />
<br />
Locate the {{ic|styles}} sub-directory within luakit's data storage directory.<br />
Normally, this is located at {{ic|~/.local/share/luakit/styles/}}. Create the<br />
directory if it does not already exist.<br />
Move any CSS rules to a new file within that directory. The filename must end in {{ic|.css}}.<br />
Make sure you specify which sites your stylesheet should apply to. The way to<br />
do this is to use {{ic|@-moz-document}} rules. The Stylish wiki page [https://github.com/stylish-userstyles/stylish/wiki/Applying-styles-to-specific-sites Applying styles to specific sites] may be helpful.<br />
Run {{ic|:styles-reload}} to detect new stylesheet files and reload any changes to<br />
existing stylesheet files; it is not necessary to restart luakit.<br />
<br />
To open the styles menu, run the command {{ic|:styles-list}}. Here you can<br />
enable/disable stylesheets, open stylesheets in your text editor, and view<br />
which stylesheets are active.<br />
<br />
If a stylesheet is disabled for all pages, its state will be listed as<br />
"Disabled". If a stylesheet is enabled for all pages, but does not apply to<br />
the current page, its state will be listed as "Enabled". If a stylesheet is<br />
enbaled for all pages _and_ it applies to the current page, its state will be<br />
listed as "Active".<br />
<br />
== See also ==<br />
<br />
* [https://luakit.github.io/luakit/ Home page]<br />
* [http://shariebeth.com/computers/luakitcheatsheet.txt Cheatsheet]</div>Pdchttps://wiki.archlinux.org/index.php?title=File_systems&diff=730634File systems2022-05-25T15:01:25Z<p>Pdc: /* Types of file systems */ Clarify note re ReiserFS removal</p>
<hr />
<div>[[Category:File systems]]<br />
[[Category:Lists]]<br />
[[es:File systems]]<br />
[[it:File systems]]<br />
[[ja:ファイルシステム]]<br />
[[pt:File systems]]<br />
[[ru:File systems]]<br />
[[uk:File systems]]<br />
[[zh-hans:File systems]]<br />
{{Related articles start}}<br />
{{Related|Partitioning}}<br />
{{Related|Device file#lsblk}}<br />
{{Related|File permissions and attributes}}<br />
{{Related|fsck}}<br />
{{Related|fstab}}<br />
{{Related|List of applications#Mount tools}}<br />
{{Related|QEMU#Mounting a partition from a raw image}}<br />
{{Related|udev}}<br />
{{Related|udisks}}<br />
{{Related|umask}}<br />
{{Related|USB storage devices}}<br />
{{Related articles end}}<br />
From [[Wikipedia:File system|Wikipedia]]:<br />
:In computing, a file system or filesystem controls how data is stored and retrieved. Without a file system, information placed in a storage medium would be one large body of data with no way to tell where one piece of information stops and the next begins. By separating the data into pieces and giving each piece a name, the information is easily isolated and identified. Taking its name from the way paper-based information systems are named, each group of data is called a "file". The structure and logic rules used to manage the groups of information and their names is called a "file system". <br />
<br />
Individual drive partitions can be set up using one of the many different available file systems. Each has its own advantages, disadvantages, and unique idiosyncrasies. A brief overview of supported filesystems follows; the links are to Wikipedia pages that provide much more information.<br />
<br />
== Types of file systems ==<br />
<br />
{{Accuracy|{{ic|/proc/filesystems}} only lists file systems whose modules are either built-in or currently loaded. Since [[Kernel#Officially supported kernels|Arch kernels]] have most of the file systems built as loadable modules, {{ic|/proc/filesystems}} will show very few, if any, usable file systems.}}<br />
<br />
See {{man|5|filesystems}} for a general overview and [[Wikipedia:Comparison of file systems]] for a detailed feature comparison. File systems supported by the kernel are listed in {{ic|/proc/filesystems}}.<br />
<br />
{| class="wikitable sortable"<br />
|+ In-tree and FUSE file systems<br />
! File system<br />
! Creation command<br />
! Userspace utilities<br />
! [[Archiso]] [https://gitlab.archlinux.org/archlinux/archiso/-/blob/master/configs/releng/packages.x86_64]<br />
! Kernel documentation [https://www.kernel.org/doc/html/latest/filesystems/index.html]<br />
! Notes<br />
|-<br />
| [[Btrfs]]<br />
| {{man|8|mkfs.btrfs}}<br />
| {{Pkg|btrfs-progs}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/btrfs.html btrfs.html]<br />
| [https://btrfs.wiki.kernel.org/index.php/Status Stability status]<br />
|-<br />
| [[VFAT]]<br />
| {{man|8|mkfs.fat}}<br />
| {{Pkg|dosfstools}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/vfat.html vfat.html]<br />
| [[Wikipedia:Windows 9x|Windows 9x]] file system<br />
|-<br />
| rowspan="2" | [[Wikipedia:exFAT|exFAT]]<br />
| {{man|8|mkfs.exfat}} <br />
| {{Pkg|exfatprogs}}<br />
| {{Yes}}<br />
|<br />
| Native file system in Linux 5.4. [https://itsfoss.com/linux-kernel-5-4/]<br />
|-<br />
| {{man|8|mkexfatfs}}<br />
| {{Pkg|exfat-utils}}<br />
| {{No}}<br />
| N/A (FUSE-based)<br />
|<br />
|-<br />
| [[F2FS]]<br />
| {{man|8|mkfs.f2fs}}<br />
| {{Pkg|f2fs-tools}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/f2fs.html f2fs.html]<br />
<br />
| Flash-based devices<br />
|-<br />
| [[ext3]]<br />
| {{man|8|mkfs.ext3}}<br />
| {{Pkg|e2fsprogs}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/ext3.html ext3.html]<br />
|<br />
|-<br />
| [[ext4]]<br />
| {{man|8|mkfs.ext4}}<br />
| {{Pkg|e2fsprogs}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/html/latest/admin-guide/ext4.html ext4.html]<br />
|<br />
|-<br />
| [[Wikipedia:Hierarchical File System|HFS]]<br />
| {{man|8|mkfs.hfsplus|url=}}<br />
| {{AUR|hfsprogs}}<br />
| {{No}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/hfs.html hfs.html]<br />
| [[Wikipedia:Classic Mac OS|Classic Mac OS]] file system<br />
|-<br />
| [[Wikipedia:HFS Plus|HFS+]]<br />
| {{man|8|mkfs.hfsplus|url=}}<br />
| {{AUR|hfsprogs}}<br />
| {{No}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/hfsplus.html hfsplus.html]<br />
| [[Wikipedia:macOS|macOS]] (8–10.12) file system<br />
|-<br />
| [[JFS]]<br />
| {{man|8|mkfs.jfs}}<br />
| {{Pkg|jfsutils}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/html/latest/admin-guide/jfs.html jfs.html]<br />
|<br />
|-<br />
| [[Wikipedia:NILFS|NILFS2]]<br />
| {{man|8|mkfs.nilfs2}}<br />
| {{Pkg|nilfs-utils}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/nilfs2.html nilfs2.html]<br />
| Raw flash devices, e.g. SD card<br />
|-<br />
| rowspan="3" | [[NTFS]]<br />
|<br />
|<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/ntfs3.html ntfs3.html]<br />
| [[Wikipedia:Windows NT|Windows NT]] file system. [https://www.paragon-software.com/home/ntfs3-driver-faq/ New driver], available since Linux 5.15.<br />
|-<br />
|<br />
| rowspan="2" | {{Pkg|ntfs-3g}}[https://sourceforge.net/p/linux-ntfs/mailman/message/27338853/]<br />
| {{No}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/ntfs.html ntfs.html]<br />
| Old driver. Has very limited write support. [[Kernel#Officially supported kernels|Officially supported kernels]] are built without {{ic|CONFIG_NTFS_FS}} so this driver is not available.<br />
|-<br />
| {{man|8|mkfs.ntfs}}<br />
| {{Yes}}<br />
| N/A (FUSE-based)<br />
| FUSE driver with extended capabilities.<br />
|-<br />
| [[Wikipedia:ReiserFS|ReiserFS]]<br />
| {{man|8|mkfs.reiserfs}}<br />
| {{Pkg|reiserfsprogs}}<br />
| {{Yes}}<br />
|<br />
| ReiserFS is [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eb103a51640ee32ab01c51e13bf8fca211f25f61 deprecated] in Linux 5.18 and scheduled for removal from the kernel in 2025.<br />
|-<br />
| [[Wikipedia:Universal Disk Format|UDF]]<br />
| {{man|8|mkfs.udf}}<br />
| {{Pkg|udftools}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/udf.html udf.html]<br />
|<br />
|-<br />
| [[XFS]]<br />
| {{man|8|mkfs.xfs}}<br />
| {{Pkg|xfsprogs}}<br />
| {{Yes}}<br />
|<br />
[https://www.kernel.org/doc/html/latest/admin-guide/xfs.html xfs.html]<br><br />
[https://www.kernel.org/doc/html/latest/filesystems/xfs-delayed-logging-design.html xfs-delayed-logging-design.html]<br><br />
[https://www.kernel.org/doc/html/latest/filesystems/xfs-self-describing-metadata.html xfs-self-describing-metadata.html]<br />
|<br />
|}<br />
<br />
{| class="wikitable sortable"<br />
|+ Out-of-tree file systems<br />
! File system<br />
! Creation command<br />
! Kernel patchset<br />
! Userspace utilities<br />
! Notes<br />
|-<br />
| [[Wikipedia:Apple File System|APFS]]<br />
| {{man|8|mkapfs|url=}}<br />
| {{AUR|linux-apfs-rw-dkms-git}}<br />
| {{AUR|apfsprogs-git}}<br />
| [[Wikipedia:macOS|macOS]] (10.13 and newer) file system. Read only, experimental.<br />
|-<br />
| [[Bcachefs]]<br />
| {{man|8|bcachefs|url=}}<br />
| {{AUR|linux-bcachefs-git}}<br />
| {{AUR|bcachefs-tools-git}}<br />
|<br />
|-<br />
| [[Reiser4]]<br />
| {{man|8|mkfs.reiser4|url=}}<br />
|<br />
| {{AUR|reiser4progs}}<br />
|<br />
|-<br />
| [[ZFS]]<br />
| <br />
| {{AUR|zfs-linux}}, {{AUR|zfs-dkms}}<br />
| {{AUR|zfs-utils}}<br />
| [[Wikipedia:OpenZFS|OpenZFS]] port<br />
|}<br />
<br />
=== Journaling ===<br />
<br />
All the above file systems with the exception of exFAT, ext2, FAT16/32, Reiser4 (optional), Btrfs and ZFS, use [[Wikipedia:Journaling file system|journaling]]. Journaling provides fault-resilience by logging changes before they are committed to the file system. In the event of a system crash or power failure, such file systems are faster to bring back online and less likely to become corrupted. The logging takes place in a dedicated area of the file system.<br />
<br />
Not all journaling techniques are the same. Ext3 and ext4 offer data-mode journaling, which logs both data and meta-data, as well as possibility to journal only meta-data changes. Data-mode journaling comes with a speed penalty and is not enabled by default. In the same vein, [[Reiser4]] offers so-called [https://reiser4.wiki.kernel.org/index.php/Reiser4_transaction_models "transaction models"] which not only change the features it provides, but in its journaling mode. It uses a different journaling techniques: a special model called [https://reiser4.wiki.kernel.org/index.php/V4#Wandering_Logs wandering logs] which eliminates the need to write to the disk twice, '''write-anywhere'''—a pure copy-on-write approach (mostly equivalent to btrfs' default but with a fundamentally different "tree" design) and a combined approach called '''hybrid''' which heuristically alternates between the two former.<br />
<br />
{{Note|Reiser4 does provide an almost equivalent to ext4's default journaling behavior (meta-data only) with the use of the '''node41''' plugin which also features meta-data and inline checksums, optionally combined with the wandering logs behaviour it provides depending on what transaction model is chosen at mount time.}}<br />
<br />
The other file systems provide ordered-mode journaling, which only logs meta-data. While all journaling will return a file system to a valid state after a crash, data-mode journaling offers the greatest protection against corruption and data loss. There is a compromise in system performance, however, because data-mode journaling does two write operations: first to the journal and then to the disk (which Reiser4 avoids with its "wandering logs" feature). The trade-off between system speed and data safety should be considered when choosing the file system type. Reiser4 is the only file system that by design operates on full atomicity and also provides checksums for both meta-data and inline data (operations entirely occur, or they entirely do not and does not corrupt or destroy data due to operations half-occurring) and by design is therefore much less prone to data loss than other file systems like [[Btrfs]].<br />
<br />
File systems based on copy-on-write (also known as write-anywhere), such as Reiser4, Btrfs and ZFS, have no need to use traditional journal to protect metadata, because they are never updated in-place. Although Btrfs still has a journal-like log tree, it is only used to speed-up fdatasync/fsync.<br />
<br />
=== FUSE-based file systems ===<br />
<br />
See [[FUSE]].<br />
<br />
=== Stackable file systems ===<br />
<br />
* {{App|aufs|Advanced multi-layered unification file system, a FUSE based union file system, a complete rewrite of Unionfs, was rejected from Linux mainline and instead OverlayFS was merged into the Linux Kernel.|http://aufs.sourceforge.net|{{AUR|linux-aufs}}}}<br />
<br />
* {{App|[[eCryptfs]]|The enterprise cryptographic file system is a package of disk encryption software for Linux. It is implemented as a POSIX-compliant file system–level encryption layer, aiming to offer functionality similar to that of GnuPG at the operating system level.|https://ecryptfs.org|{{Pkg|ecryptfs-utils}}}}<br />
<br />
* {{App|mergerfs|a FUSE based union file system.|https://github.com/trapexit/mergerfs|{{AUR|mergerfs}}}}<br />
<br />
* {{App|mhddfs|Multi-HDD FUSE file system, a FUSE based union file system.|http://mhddfs.uvw.ru|{{AUR|mhddfs}}}}<br />
<br />
* {{App|[[overlayfs]]|OverlayFS is a file system service for Linux which implements a union mount for other file systems.|https://www.kernel.org/doc/html/latest/filesystems/overlayfs.html|{{Pkg|linux}}}}<br />
<br />
* {{App|Unionfs|Unionfs is a file system service for Linux, FreeBSD and NetBSD which implements a union mount for other file systems.|https://unionfs.filesystems.org/}}<br />
<br />
* {{App|unionfs-fuse|A user space Unionfs implementation.|https://github.com/rpodgorny/unionfs-fuse|{{Pkg|unionfs-fuse}}}}<br />
<br />
=== Read-only file systems ===<br />
<br />
* {{App|[[Wikipedia:EROFS|EROFS]]|Enhanced Read-Only File System is a lightweight read-only file system, it aims to improve performance and compress storage capacity.|https://www.kernel.org/doc/html/latest/filesystems/erofs.html|{{Pkg|erofs-utils}}}}<br />
* {{App|[[Wikipedia: SquashFS|SquashFS]]|SquashFS is a compressed read only file system. SquashFS compresses files, inodes and directories, and supports block sizes up to 1 MB for greater compression.|https://github.com/plougher/squashfs-tools|{{Pkg|squashfs-tools}}}}<br />
<br />
=== Clustered file systems ===<br />
<br />
* {{App|[[BeeGFS]]|A parallel file system, developed and optimized for high-performance computing.|https://www.beegfs.io/c/|{{AUR|beegfs-client}}}}<br />
* {{App|[[Ceph]]|Unified, distributed storage system designed for excellent performance, reliability and scalability.|https://ceph.com/|{{Pkg|ceph}}}}<br />
* {{App|[[Glusterfs]]|Cluster file system capable of scaling to several peta-bytes.|https://www.gluster.org/|{{Pkg|glusterfs}}}}<br />
* {{App|[[IPFS]]|A peer-to-peer hypermedia protocol to make the web faster, safer, and more open. IPFS aims replace HTTP and build a better web for all of us. Uses blocks to store parts of a file, each network node stores only content it is interested, provides deduplication, distribution, scalable system limited only by users. (currently in alpha)|https://ipfs.io/|{{Pkg|go-ipfs}}}}<br />
* {{App|[[MinIO]]|MinIO offers high-performance, S3 compatible object storage.|https://min.io|{{Pkg|minio}}}}<br />
* {{App|[[Wikipedia: MooseFS|MooseFS]]|MooseFS is a fault tolerant, highly available and high performance scale-out network distributed file system.|https://moosefs.com|{{Pkg|moosefs}}}}<br />
* {{App|[[OpenAFS]]|Open source implementation of the AFS distributed file system|https://www.openafs.org|{{AUR|openafs}}}}<br />
* {{App|[[Wikipedia: OrangeFS|OrangeFS]]|OrangeFS is a scale-out network file system designed for transparently accessing multi-server-based disk storage, in parallel. Has optimized MPI-IO support for parallel and distributed applications. Simplifies the use of parallel storage not only for Linux clients, but also for Windows, Hadoop, and WebDAV. POSIX-compatible. Part of Linux kernel since version 4.6.|https://www.orangefs.org/}}<br />
* {{App|Sheepdog|Distributed object storage system for volume and container services and manages the disks and nodes intelligently.|https://sheepdog.github.io/sheepdog/|{{AUR|sheepdog}}}}<br />
* {{App|[[Wikipedia:Tahoe-LAFS|Tahoe-LAFS]]|Tahoe Least-Authority File System is a free and open, secure, decentralized, fault-tolerant, peer-to-peer distributed data store and distributed file system.|https://tahoe-lafs.org/|{{AUR|tahoe-lafs}}}}<br />
<br />
=== Shared-disk file system ===<br />
<br />
* {{App|[[Wikipedia:GFS2|GFS2]]|GFS2 allows all members of a cluster to have direct concurrent access to the same shared block storage|https://pagure.io/gfs2-utils|{{AUR|gfs2-utils}}}}<br />
* {{App|[[Wikipedia:OCFS2|OCFS2]]|The Oracle Cluster File System (version 2) is a shared disk file system developed by Oracle Corporation and released under the GNU General Public License|https://oss.oracle.com/projects/ocfs2/|{{AUR|ocfs2-tools}}}}<br />
* {{App|[[Wikipedia:VMware_VMFS|VMware VMFS]]|VMware's VMFS (Virtual Machine File System) is used by the company's flagship server virtualization suite, vSphere.|https://www.vmware.com/products/vi/esx/vmfs.html|{{AUR|vmfs-tools}}}}<br />
<br />
== Identify existing file systems ==<br />
<br />
To identify existing file systems, you can use [[lsblk]]:<br />
<br />
{{hc|1=$ lsblk -f|2=<br />
NAME FSTYPE LABEL UUID MOUNTPOINT<br />
sdb <br />
└─sdb1 vfat Transcend 4A3C-A9E9 <br />
}}<br />
<br />
An existing file system, if present, will be shown in the {{ic|FSTYPE}} column. If [[mount]]ed, it will appear in the {{ic|MOUNTPOINT}} column.<br />
<br />
== Create a file system ==<br />
<br />
File systems are usually created on a [[partition]], inside logical containers such as [[LVM]], [[RAID]] and [[dm-crypt]], or on a regular file (see [[Wikipedia:Loop device]]). This section describes the partition case.<br />
<br />
{{Note|1=File systems can be written directly to a disk, known as a ''superfloppy'' or [[Partitioning#Partitionless disk|partitionless disk]]. Certain limitations are involved with this method, particularly if [[Arch boot process|booting]] from such a drive. See [[Btrfs#Partitionless Btrfs disk]] for an example.}}<br />
<br />
{{Warning|<br />
* After creating a new file system, data previously stored on this partition can unlikely be recovered. '''Create a backup of any data you want to keep'''.<br />
*The purpose of a given partition may restrict the choice of file system. For example, an [[EFI system partition]] must contain a [[FAT32]] file system, and the file system containing the {{ic|/boot}} directory must be supported by the [[boot loader]].<br />
}}<br />
<br />
Before continuing, [[lsblk|identify the device]] where the file system will be created and whether or not it is mounted. For example:<br />
<br />
{{hc|$ lsblk -f|<br />
NAME FSTYPE LABEL UUID MOUNTPOINT<br />
sda<br />
├─sda1 C4DA-2C4D <br />
├─sda2 ext4 5b1564b2-2e2c-452c-bcfa-d1f572ae99f2 /mnt<br />
└─sda3 56adc99b-a61e-46af-aab7-a6d07e504652 <br />
}}<br />
<br />
Mounted file systems '''must''' be [[#Unmount a file system|unmounted]] before proceeding. In the above example an existing file system is on {{ic|/dev/sda2}} and is mounted at {{ic|/mnt}}. It would be unmounted with:<br />
<br />
# umount /dev/sda2<br />
<br />
To find just mounted file systems, see [[#List mounted file systems]].<br />
<br />
To create a new file system, use {{man|8|mkfs}}. See [[#Types of file systems]] for the exact type, as well as userspace utilities you may wish to install for a particular file system.<br />
<br />
For example, to create a new file system of type [[ext4]] (common for Linux data partitions) on {{ic|/dev/sda1}}, run:<br />
<br />
# mkfs.ext4 /dev/sda1<br />
<br />
{{Tip|<br />
* Use the {{ic|-L}} flag of ''mkfs.ext4'' to specify a [[Persistent block device naming#by-label|file system label]]. ''e2label'' can be used to change the label on an existing file system.<br />
* File systems may be ''resized'' after creation, with certain limitations. For example, an [[XFS]] file system's size can be increased, but it cannot reduced. See [[Wikipedia:Comparison of file systems#Resize capabilities]] and the respective file system documentation for details.}}<br />
<br />
The new file system can now be mounted to a directory of choice.<br />
<br />
== Mount a file system ==<br />
<br />
To manually mount a file system located on a device (e.g., a partition) to a directory, use {{man|8|mount}}. This example mounts {{ic|/dev/sda1}} to {{ic|/mnt}}.<br />
<br />
# mount /dev/sda1 /mnt<br />
<br />
This attaches the file system on {{ic|/dev/sda1}} at the directory {{ic|/mnt}}, making the contents of the file system visible. Any data that existed at {{ic|/mnt}} before this action is made invisible until the device is unmounted.<br />
<br />
[[fstab]] contains information on how devices should be automatically mounted if present. See the [[fstab]] article for more information on how to modify this behavior.<br />
<br />
If a device is specified in {{ic|/etc/fstab}} and only the device or mount point is given on the command line, that information will be used in mounting. For example, if {{ic|/etc/fstab}} contains a line indicating that {{ic|/dev/sda1}} should be mounted to {{ic|/mnt}}, then the following will automatically mount the device to that location:<br />
<br />
# mount /dev/sda1<br />
<br />
Or<br />
<br />
# mount /mnt<br />
<br />
''mount'' contains several options, many of which depend on the file system specified.<br />
The options can be changed, either by:<br />
<br />
* using flags on the command line with ''mount''<br />
* editing [[fstab]]<br />
* creating [[udev]] rules<br />
* [[Arch Build System|compiling the kernel yourself]]<br />
* or using file system–specific mount scripts (located at {{ic|/usr/bin/mount.*}}).<br />
<br />
See these related articles and the article of the file system of interest for more information.<br />
<br />
{{Tip|<br />
* File systems can also be mounted with ''systemd-mount'' instead of ''mount''. If the mount point is not specified, the file system will be mounted at {{ic|/run/media/system/''device_identifier''/}}. This allows to easily mount a file system without having to decide where to mount it. See {{man|1|systemd-mount}} for usage and more details.<br />
* To mount file systems as an ordinary user, see [[udisks#Usage]]. This also allows mounting without having root permissions, a full graphical environment or a file manager which utilizes udisks.<br />
}}<br />
<br />
=== List mounted file systems ===<br />
<br />
To list all mounted file systems, use {{man|8|findmnt}}:<br />
<br />
$ findmnt<br />
<br />
''findmnt'' takes a variety of arguments which can filter the output and show additional information. For example, it can take a device or mount point as an argument to show only information on what is specified:<br />
<br />
$ findmnt /dev/sda1<br />
<br />
''findmnt'' gathers information from {{ic|/etc/fstab}}, {{ic|/etc/mtab}}, and {{ic|/proc/self/mounts}}.<br />
<br />
=== Unmount a file system ===<br />
<br />
To unmount a file system use {{man|8|umount}}. Either the device containing the file system (e.g., {{ic|/dev/sda1}}) or the mount point (e.g., {{ic|/mnt}}) can be specified:<br />
<br />
# umount /dev/sda1<br />
<br />
or<br />
<br />
# umount /mnt<br />
<br />
== Troubleshooting ==<br />
<br />
=== "linux Structure needs cleaning" ===<br />
<br />
[[#Unmount a file system|Unmount]] the file system and run [[fsck]] on the problematic volume.<br />
<br />
== See also ==<br />
<br />
* {{man|5|filesystems}}<br />
* {{man|1|systemd-mount}}<br />
* [https://www.kernel.org/doc/html/latest/filesystems/index.html Documentation of file systems supported by Linux]<br />
* [[Wikipedia:File systems]]<br />
* [[Wikipedia:Mount (Unix)]]</div>Pdchttps://wiki.archlinux.org/index.php?title=File_systems&diff=730631File systems2022-05-25T13:36:48Z<p>Pdc: /* Types of file systems */ ReiserFS is deprecated.</p>
<hr />
<div>[[Category:File systems]]<br />
[[Category:Lists]]<br />
[[es:File systems]]<br />
[[it:File systems]]<br />
[[ja:ファイルシステム]]<br />
[[pt:File systems]]<br />
[[ru:File systems]]<br />
[[uk:File systems]]<br />
[[zh-hans:File systems]]<br />
{{Related articles start}}<br />
{{Related|Partitioning}}<br />
{{Related|Device file#lsblk}}<br />
{{Related|File permissions and attributes}}<br />
{{Related|fsck}}<br />
{{Related|fstab}}<br />
{{Related|List of applications#Mount tools}}<br />
{{Related|QEMU#Mounting a partition from a raw image}}<br />
{{Related|udev}}<br />
{{Related|udisks}}<br />
{{Related|umask}}<br />
{{Related|USB storage devices}}<br />
{{Related articles end}}<br />
From [[Wikipedia:File system|Wikipedia]]:<br />
:In computing, a file system or filesystem controls how data is stored and retrieved. Without a file system, information placed in a storage medium would be one large body of data with no way to tell where one piece of information stops and the next begins. By separating the data into pieces and giving each piece a name, the information is easily isolated and identified. Taking its name from the way paper-based information systems are named, each group of data is called a "file". The structure and logic rules used to manage the groups of information and their names is called a "file system". <br />
<br />
Individual drive partitions can be set up using one of the many different available file systems. Each has its own advantages, disadvantages, and unique idiosyncrasies. A brief overview of supported filesystems follows; the links are to Wikipedia pages that provide much more information.<br />
<br />
== Types of file systems ==<br />
<br />
{{Accuracy|{{ic|/proc/filesystems}} only lists file systems whose modules are either built-in or currently loaded. Since [[Kernel#Officially supported kernels|Arch kernels]] have most of the file systems built as loadable modules, {{ic|/proc/filesystems}} will show very few, if any, usable file systems.}}<br />
<br />
See {{man|5|filesystems}} for a general overview and [[Wikipedia:Comparison of file systems]] for a detailed feature comparison. File systems supported by the kernel are listed in {{ic|/proc/filesystems}}.<br />
<br />
{| class="wikitable sortable"<br />
|+ In-tree and FUSE file systems<br />
! File system<br />
! Creation command<br />
! Userspace utilities<br />
! [[Archiso]] [https://gitlab.archlinux.org/archlinux/archiso/-/blob/master/configs/releng/packages.x86_64]<br />
! Kernel documentation [https://www.kernel.org/doc/html/latest/filesystems/index.html]<br />
! Notes<br />
|-<br />
| [[Btrfs]]<br />
| {{man|8|mkfs.btrfs}}<br />
| {{Pkg|btrfs-progs}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/btrfs.html btrfs.html]<br />
| [https://btrfs.wiki.kernel.org/index.php/Status Stability status]<br />
|-<br />
| [[VFAT]]<br />
| {{man|8|mkfs.fat}}<br />
| {{Pkg|dosfstools}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/vfat.html vfat.html]<br />
| [[Wikipedia:Windows 9x|Windows 9x]] file system<br />
|-<br />
| rowspan="2" | [[Wikipedia:exFAT|exFAT]]<br />
| {{man|8|mkfs.exfat}} <br />
| {{Pkg|exfatprogs}}<br />
| {{Yes}}<br />
|<br />
| Native file system in Linux 5.4. [https://itsfoss.com/linux-kernel-5-4/]<br />
|-<br />
| {{man|8|mkexfatfs}}<br />
| {{Pkg|exfat-utils}}<br />
| {{No}}<br />
| N/A (FUSE-based)<br />
|<br />
|-<br />
| [[F2FS]]<br />
| {{man|8|mkfs.f2fs}}<br />
| {{Pkg|f2fs-tools}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/f2fs.html f2fs.html]<br />
<br />
| Flash-based devices<br />
|-<br />
| [[ext3]]<br />
| {{man|8|mkfs.ext3}}<br />
| {{Pkg|e2fsprogs}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/ext3.html ext3.html]<br />
|<br />
|-<br />
| [[ext4]]<br />
| {{man|8|mkfs.ext4}}<br />
| {{Pkg|e2fsprogs}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/html/latest/admin-guide/ext4.html ext4.html]<br />
|<br />
|-<br />
| [[Wikipedia:Hierarchical File System|HFS]]<br />
| {{man|8|mkfs.hfsplus|url=}}<br />
| {{AUR|hfsprogs}}<br />
| {{No}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/hfs.html hfs.html]<br />
| [[Wikipedia:Classic Mac OS|Classic Mac OS]] file system<br />
|-<br />
| [[Wikipedia:HFS Plus|HFS+]]<br />
| {{man|8|mkfs.hfsplus|url=}}<br />
| {{AUR|hfsprogs}}<br />
| {{No}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/hfsplus.html hfsplus.html]<br />
| [[Wikipedia:macOS|macOS]] (8–10.12) file system<br />
|-<br />
| [[JFS]]<br />
| {{man|8|mkfs.jfs}}<br />
| {{Pkg|jfsutils}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/html/latest/admin-guide/jfs.html jfs.html]<br />
|<br />
|-<br />
| [[Wikipedia:NILFS|NILFS2]]<br />
| {{man|8|mkfs.nilfs2}}<br />
| {{Pkg|nilfs-utils}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/nilfs2.html nilfs2.html]<br />
| Raw flash devices, e.g. SD card<br />
|-<br />
| rowspan="3" | [[NTFS]]<br />
|<br />
|<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/ntfs3.html ntfs3.html]<br />
| [[Wikipedia:Windows NT|Windows NT]] file system. [https://www.paragon-software.com/home/ntfs3-driver-faq/ New driver], available since Linux 5.15.<br />
|-<br />
|<br />
| rowspan="2" | {{Pkg|ntfs-3g}}[https://sourceforge.net/p/linux-ntfs/mailman/message/27338853/]<br />
| {{No}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/ntfs.html ntfs.html]<br />
| Old driver. Has very limited write support. [[Kernel#Officially supported kernels|Officially supported kernels]] are built without {{ic|CONFIG_NTFS_FS}} so this driver is not available.<br />
|-<br />
| {{man|8|mkfs.ntfs}}<br />
| {{Yes}}<br />
| N/A (FUSE-based)<br />
| FUSE driver with extended capabilities.<br />
|-<br />
| [[Wikipedia:ReiserFS|ReiserFS]]<br />
| {{man|8|mkfs.reiserfs}}<br />
| {{Pkg|reiserfsprogs}}<br />
| {{Yes}}<br />
|<br />
| ReiserFS is [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eb103a51640ee32ab01c51e13bf8fca211f25f61 deprecated] in Linux 5.18 and scheduled for removal in 2025.<br />
|-<br />
| [[Wikipedia:Universal Disk Format|UDF]]<br />
| {{man|8|mkfs.udf}}<br />
| {{Pkg|udftools}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/html/latest/filesystems/udf.html udf.html]<br />
|<br />
|-<br />
| [[XFS]]<br />
| {{man|8|mkfs.xfs}}<br />
| {{Pkg|xfsprogs}}<br />
| {{Yes}}<br />
|<br />
[https://www.kernel.org/doc/html/latest/admin-guide/xfs.html xfs.html]<br><br />
[https://www.kernel.org/doc/html/latest/filesystems/xfs-delayed-logging-design.html xfs-delayed-logging-design.html]<br><br />
[https://www.kernel.org/doc/html/latest/filesystems/xfs-self-describing-metadata.html xfs-self-describing-metadata.html]<br />
|<br />
|}<br />
<br />
{| class="wikitable sortable"<br />
|+ Out-of-tree file systems<br />
! File system<br />
! Creation command<br />
! Kernel patchset<br />
! Userspace utilities<br />
! Notes<br />
|-<br />
| [[Wikipedia:Apple File System|APFS]]<br />
| {{man|8|mkapfs|url=}}<br />
| {{AUR|linux-apfs-rw-dkms-git}}<br />
| {{AUR|apfsprogs-git}}<br />
| [[Wikipedia:macOS|macOS]] (10.13 and newer) file system. Read only, experimental.<br />
|-<br />
| [[Bcachefs]]<br />
| {{man|8|bcachefs|url=}}<br />
| {{AUR|linux-bcachefs-git}}<br />
| {{AUR|bcachefs-tools-git}}<br />
|<br />
|-<br />
| [[Reiser4]]<br />
| {{man|8|mkfs.reiser4|url=}}<br />
|<br />
| {{AUR|reiser4progs}}<br />
|<br />
|-<br />
| [[ZFS]]<br />
| <br />
| {{AUR|zfs-linux}}, {{AUR|zfs-dkms}}<br />
| {{AUR|zfs-utils}}<br />
| [[Wikipedia:OpenZFS|OpenZFS]] port<br />
|}<br />
<br />
=== Journaling ===<br />
<br />
All the above file systems with the exception of exFAT, ext2, FAT16/32, Reiser4 (optional), Btrfs and ZFS, use [[Wikipedia:Journaling file system|journaling]]. Journaling provides fault-resilience by logging changes before they are committed to the file system. In the event of a system crash or power failure, such file systems are faster to bring back online and less likely to become corrupted. The logging takes place in a dedicated area of the file system.<br />
<br />
Not all journaling techniques are the same. Ext3 and ext4 offer data-mode journaling, which logs both data and meta-data, as well as possibility to journal only meta-data changes. Data-mode journaling comes with a speed penalty and is not enabled by default. In the same vein, [[Reiser4]] offers so-called [https://reiser4.wiki.kernel.org/index.php/Reiser4_transaction_models "transaction models"] which not only change the features it provides, but in its journaling mode. It uses a different journaling techniques: a special model called [https://reiser4.wiki.kernel.org/index.php/V4#Wandering_Logs wandering logs] which eliminates the need to write to the disk twice, '''write-anywhere'''—a pure copy-on-write approach (mostly equivalent to btrfs' default but with a fundamentally different "tree" design) and a combined approach called '''hybrid''' which heuristically alternates between the two former.<br />
<br />
{{Note|Reiser4 does provide an almost equivalent to ext4's default journaling behavior (meta-data only) with the use of the '''node41''' plugin which also features meta-data and inline checksums, optionally combined with the wandering logs behaviour it provides depending on what transaction model is chosen at mount time.}}<br />
<br />
The other file systems provide ordered-mode journaling, which only logs meta-data. While all journaling will return a file system to a valid state after a crash, data-mode journaling offers the greatest protection against corruption and data loss. There is a compromise in system performance, however, because data-mode journaling does two write operations: first to the journal and then to the disk (which Reiser4 avoids with its "wandering logs" feature). The trade-off between system speed and data safety should be considered when choosing the file system type. Reiser4 is the only file system that by design operates on full atomicity and also provides checksums for both meta-data and inline data (operations entirely occur, or they entirely do not and does not corrupt or destroy data due to operations half-occurring) and by design is therefore much less prone to data loss than other file systems like [[Btrfs]].<br />
<br />
File systems based on copy-on-write (also known as write-anywhere), such as Reiser4, Btrfs and ZFS, have no need to use traditional journal to protect metadata, because they are never updated in-place. Although Btrfs still has a journal-like log tree, it is only used to speed-up fdatasync/fsync.<br />
<br />
=== FUSE-based file systems ===<br />
<br />
See [[FUSE]].<br />
<br />
=== Stackable file systems ===<br />
<br />
* {{App|aufs|Advanced multi-layered unification file system, a FUSE based union file system, a complete rewrite of Unionfs, was rejected from Linux mainline and instead OverlayFS was merged into the Linux Kernel.|http://aufs.sourceforge.net|{{AUR|linux-aufs}}}}<br />
<br />
* {{App|[[eCryptfs]]|The enterprise cryptographic file system is a package of disk encryption software for Linux. It is implemented as a POSIX-compliant file system–level encryption layer, aiming to offer functionality similar to that of GnuPG at the operating system level.|https://ecryptfs.org|{{Pkg|ecryptfs-utils}}}}<br />
<br />
* {{App|mergerfs|a FUSE based union file system.|https://github.com/trapexit/mergerfs|{{AUR|mergerfs}}}}<br />
<br />
* {{App|mhddfs|Multi-HDD FUSE file system, a FUSE based union file system.|http://mhddfs.uvw.ru|{{AUR|mhddfs}}}}<br />
<br />
* {{App|[[overlayfs]]|OverlayFS is a file system service for Linux which implements a union mount for other file systems.|https://www.kernel.org/doc/html/latest/filesystems/overlayfs.html|{{Pkg|linux}}}}<br />
<br />
* {{App|Unionfs|Unionfs is a file system service for Linux, FreeBSD and NetBSD which implements a union mount for other file systems.|https://unionfs.filesystems.org/}}<br />
<br />
* {{App|unionfs-fuse|A user space Unionfs implementation.|https://github.com/rpodgorny/unionfs-fuse|{{Pkg|unionfs-fuse}}}}<br />
<br />
=== Read-only file systems ===<br />
<br />
* {{App|[[Wikipedia:EROFS|EROFS]]|Enhanced Read-Only File System is a lightweight read-only file system, it aims to improve performance and compress storage capacity.|https://www.kernel.org/doc/html/latest/filesystems/erofs.html|{{Pkg|erofs-utils}}}}<br />
* {{App|[[Wikipedia: SquashFS|SquashFS]]|SquashFS is a compressed read only file system. SquashFS compresses files, inodes and directories, and supports block sizes up to 1 MB for greater compression.|https://github.com/plougher/squashfs-tools|{{Pkg|squashfs-tools}}}}<br />
<br />
=== Clustered file systems ===<br />
<br />
* {{App|[[BeeGFS]]|A parallel file system, developed and optimized for high-performance computing.|https://www.beegfs.io/c/|{{AUR|beegfs-client}}}}<br />
* {{App|[[Ceph]]|Unified, distributed storage system designed for excellent performance, reliability and scalability.|https://ceph.com/|{{Pkg|ceph}}}}<br />
* {{App|[[Glusterfs]]|Cluster file system capable of scaling to several peta-bytes.|https://www.gluster.org/|{{Pkg|glusterfs}}}}<br />
* {{App|[[IPFS]]|A peer-to-peer hypermedia protocol to make the web faster, safer, and more open. IPFS aims replace HTTP and build a better web for all of us. Uses blocks to store parts of a file, each network node stores only content it is interested, provides deduplication, distribution, scalable system limited only by users. (currently in alpha)|https://ipfs.io/|{{Pkg|go-ipfs}}}}<br />
* {{App|[[MinIO]]|MinIO offers high-performance, S3 compatible object storage.|https://min.io|{{Pkg|minio}}}}<br />
* {{App|[[Wikipedia: MooseFS|MooseFS]]|MooseFS is a fault tolerant, highly available and high performance scale-out network distributed file system.|https://moosefs.com|{{Pkg|moosefs}}}}<br />
* {{App|[[OpenAFS]]|Open source implementation of the AFS distributed file system|https://www.openafs.org|{{AUR|openafs}}}}<br />
* {{App|[[Wikipedia: OrangeFS|OrangeFS]]|OrangeFS is a scale-out network file system designed for transparently accessing multi-server-based disk storage, in parallel. Has optimized MPI-IO support for parallel and distributed applications. Simplifies the use of parallel storage not only for Linux clients, but also for Windows, Hadoop, and WebDAV. POSIX-compatible. Part of Linux kernel since version 4.6.|https://www.orangefs.org/}}<br />
* {{App|Sheepdog|Distributed object storage system for volume and container services and manages the disks and nodes intelligently.|https://sheepdog.github.io/sheepdog/|{{AUR|sheepdog}}}}<br />
* {{App|[[Wikipedia:Tahoe-LAFS|Tahoe-LAFS]]|Tahoe Least-Authority File System is a free and open, secure, decentralized, fault-tolerant, peer-to-peer distributed data store and distributed file system.|https://tahoe-lafs.org/|{{AUR|tahoe-lafs}}}}<br />
<br />
=== Shared-disk file system ===<br />
<br />
* {{App|[[Wikipedia:GFS2|GFS2]]|GFS2 allows all members of a cluster to have direct concurrent access to the same shared block storage|https://pagure.io/gfs2-utils|{{AUR|gfs2-utils}}}}<br />
* {{App|[[Wikipedia:OCFS2|OCFS2]]|The Oracle Cluster File System (version 2) is a shared disk file system developed by Oracle Corporation and released under the GNU General Public License|https://oss.oracle.com/projects/ocfs2/|{{AUR|ocfs2-tools}}}}<br />
* {{App|[[Wikipedia:VMware_VMFS|VMware VMFS]]|VMware's VMFS (Virtual Machine File System) is used by the company's flagship server virtualization suite, vSphere.|https://www.vmware.com/products/vi/esx/vmfs.html|{{AUR|vmfs-tools}}}}<br />
<br />
== Identify existing file systems ==<br />
<br />
To identify existing file systems, you can use [[lsblk]]:<br />
<br />
{{hc|1=$ lsblk -f|2=<br />
NAME FSTYPE LABEL UUID MOUNTPOINT<br />
sdb <br />
└─sdb1 vfat Transcend 4A3C-A9E9 <br />
}}<br />
<br />
An existing file system, if present, will be shown in the {{ic|FSTYPE}} column. If [[mount]]ed, it will appear in the {{ic|MOUNTPOINT}} column.<br />
<br />
== Create a file system ==<br />
<br />
File systems are usually created on a [[partition]], inside logical containers such as [[LVM]], [[RAID]] and [[dm-crypt]], or on a regular file (see [[Wikipedia:Loop device]]). This section describes the partition case.<br />
<br />
{{Note|1=File systems can be written directly to a disk, known as a ''superfloppy'' or [[Partitioning#Partitionless disk|partitionless disk]]. Certain limitations are involved with this method, particularly if [[Arch boot process|booting]] from such a drive. See [[Btrfs#Partitionless Btrfs disk]] for an example.}}<br />
<br />
{{Warning|<br />
* After creating a new file system, data previously stored on this partition can unlikely be recovered. '''Create a backup of any data you want to keep'''.<br />
*The purpose of a given partition may restrict the choice of file system. For example, an [[EFI system partition]] must contain a [[FAT32]] file system, and the file system containing the {{ic|/boot}} directory must be supported by the [[boot loader]].<br />
}}<br />
<br />
Before continuing, [[lsblk|identify the device]] where the file system will be created and whether or not it is mounted. For example:<br />
<br />
{{hc|$ lsblk -f|<br />
NAME FSTYPE LABEL UUID MOUNTPOINT<br />
sda<br />
├─sda1 C4DA-2C4D <br />
├─sda2 ext4 5b1564b2-2e2c-452c-bcfa-d1f572ae99f2 /mnt<br />
└─sda3 56adc99b-a61e-46af-aab7-a6d07e504652 <br />
}}<br />
<br />
Mounted file systems '''must''' be [[#Unmount a file system|unmounted]] before proceeding. In the above example an existing file system is on {{ic|/dev/sda2}} and is mounted at {{ic|/mnt}}. It would be unmounted with:<br />
<br />
# umount /dev/sda2<br />
<br />
To find just mounted file systems, see [[#List mounted file systems]].<br />
<br />
To create a new file system, use {{man|8|mkfs}}. See [[#Types of file systems]] for the exact type, as well as userspace utilities you may wish to install for a particular file system.<br />
<br />
For example, to create a new file system of type [[ext4]] (common for Linux data partitions) on {{ic|/dev/sda1}}, run:<br />
<br />
# mkfs.ext4 /dev/sda1<br />
<br />
{{Tip|<br />
* Use the {{ic|-L}} flag of ''mkfs.ext4'' to specify a [[Persistent block device naming#by-label|file system label]]. ''e2label'' can be used to change the label on an existing file system.<br />
* File systems may be ''resized'' after creation, with certain limitations. For example, an [[XFS]] file system's size can be increased, but it cannot reduced. See [[Wikipedia:Comparison of file systems#Resize capabilities]] and the respective file system documentation for details.}}<br />
<br />
The new file system can now be mounted to a directory of choice.<br />
<br />
== Mount a file system ==<br />
<br />
To manually mount a file system located on a device (e.g., a partition) to a directory, use {{man|8|mount}}. This example mounts {{ic|/dev/sda1}} to {{ic|/mnt}}.<br />
<br />
# mount /dev/sda1 /mnt<br />
<br />
This attaches the file system on {{ic|/dev/sda1}} at the directory {{ic|/mnt}}, making the contents of the file system visible. Any data that existed at {{ic|/mnt}} before this action is made invisible until the device is unmounted.<br />
<br />
[[fstab]] contains information on how devices should be automatically mounted if present. See the [[fstab]] article for more information on how to modify this behavior.<br />
<br />
If a device is specified in {{ic|/etc/fstab}} and only the device or mount point is given on the command line, that information will be used in mounting. For example, if {{ic|/etc/fstab}} contains a line indicating that {{ic|/dev/sda1}} should be mounted to {{ic|/mnt}}, then the following will automatically mount the device to that location:<br />
<br />
# mount /dev/sda1<br />
<br />
Or<br />
<br />
# mount /mnt<br />
<br />
''mount'' contains several options, many of which depend on the file system specified.<br />
The options can be changed, either by:<br />
<br />
* using flags on the command line with ''mount''<br />
* editing [[fstab]]<br />
* creating [[udev]] rules<br />
* [[Arch Build System|compiling the kernel yourself]]<br />
* or using file system–specific mount scripts (located at {{ic|/usr/bin/mount.*}}).<br />
<br />
See these related articles and the article of the file system of interest for more information.<br />
<br />
{{Tip|<br />
* File systems can also be mounted with ''systemd-mount'' instead of ''mount''. If the mount point is not specified, the file system will be mounted at {{ic|/run/media/system/''device_identifier''/}}. This allows to easily mount a file system without having to decide where to mount it. See {{man|1|systemd-mount}} for usage and more details.<br />
* To mount file systems as an ordinary user, see [[udisks#Usage]]. This also allows mounting without having root permissions, a full graphical environment or a file manager which utilizes udisks.<br />
}}<br />
<br />
=== List mounted file systems ===<br />
<br />
To list all mounted file systems, use {{man|8|findmnt}}:<br />
<br />
$ findmnt<br />
<br />
''findmnt'' takes a variety of arguments which can filter the output and show additional information. For example, it can take a device or mount point as an argument to show only information on what is specified:<br />
<br />
$ findmnt /dev/sda1<br />
<br />
''findmnt'' gathers information from {{ic|/etc/fstab}}, {{ic|/etc/mtab}}, and {{ic|/proc/self/mounts}}.<br />
<br />
=== Unmount a file system ===<br />
<br />
To unmount a file system use {{man|8|umount}}. Either the device containing the file system (e.g., {{ic|/dev/sda1}}) or the mount point (e.g., {{ic|/mnt}}) can be specified:<br />
<br />
# umount /dev/sda1<br />
<br />
or<br />
<br />
# umount /mnt<br />
<br />
== Troubleshooting ==<br />
<br />
=== "linux Structure needs cleaning" ===<br />
<br />
[[#Unmount a file system|Unmount]] the file system and run [[fsck]] on the problematic volume.<br />
<br />
== See also ==<br />
<br />
* {{man|5|filesystems}}<br />
* {{man|1|systemd-mount}}<br />
* [https://www.kernel.org/doc/html/latest/filesystems/index.html Documentation of file systems supported by Linux]<br />
* [[Wikipedia:File systems]]<br />
* [[Wikipedia:Mount (Unix)]]</div>Pdchttps://wiki.archlinux.org/index.php?title=Arch_Linux_press_coverage&diff=723079Arch Linux press coverage2022-03-15T15:15:20Z<p>Pdc: /* 2022 */ Article for Arch's 20th anniversary in the Register</p>
<hr />
<div>[[Category:About Arch]]<br />
[[cs:Arch Linux press coverage]]<br />
[[de:Arch in den Medien]]<br />
[[es:Arch Linux press coverage]]<br />
[[he:Arch Linux press coverage]]<br />
[[ja:Arch Linux プレスカバレッジ]]<br />
[[pt:Arch Linux press coverage]]<br />
[[zh-hans:Arch Linux press coverage]]<br />
See also [[Wikipedia:Arch Linux]] and [https://distrowatch.com/table.php?distribution=arch Arch Linux on DistroWatch].<br />
<br />
== 2022 ==<br />
<br />
* [https://www.theregister.com/2022/03/15/arch_linux_20/ Arch Linux turns 20: Small, simple, great documentation] Liam Proven - theregister.com 2022-03-15<br />
* [https://news.in-25.com/business/71803.html 20 years of Arch Linux: Skilled system with a hobbyist popularity] translation of article by Martin Gerhard Loschwitz - heise.de 2022-03-11<br />
<br />
== 2021 ==<br />
<br />
* [https://www.phoronix.com/scan.php?page=news_item&px=Arch-Linux-Does-Archinstall Arch Linux's Install Media Adds "Archinstall" For Quick/Easy Installations] Michael Larabel - Phoronix.com 2021-04-04<br />
* [https://www.phoronix.com/scan.php?page=news_item&px=Arch-Linux-x86-64-v3-Port-RFC Arch Linux Developers Discuss Idea Of Providing An x86-64-v3 Port] Michael Larabel - Phoronix.com 2021-03-16<br />
* [https://www.phoronix.com/scan.php?page=news_item&px=Arch-Linux-LTO-Proposed Arch Linux Looking To Employ LTO By Default, Possibly Raise x86-64 Requirements] Michael Larabel - Phoronix.com 2021-03-09<br />
<br />
== 2020 ==<br />
<br />
* [https://anchor.fm/thelinuxcast/episodes/5-Reasons-to-Use-Arch-Linux-eevei8 5 Reasons to Use Arch Linux] Matt Weber - anchor.fm/thelinuxcast 2020-06-03<br />
* [https://www.phoronix.com/scan.php?page=news_item&px=Arch-Linux-New-Project-Leader Arch Linux Announces New Project Leader] Michael Larabel - Phoronix.com 2020-02-04<br />
<br />
== 2019 ==<br />
<br />
* [https://www.phoronix.com/scan.php?page=news_item&px=Arch-Conf-Internal-2019 Arch Linux Held Their First Internal Conference Last Month In Berlin] Michael Larabel - Phoronix.com 2019-11-17<br />
* [https://www.forbes.com/sites/jasonevangelho/2019/06/10/arch-linux-os-challenge-2-alternatives-install-gui-script-easy/ Arch Linux OS Challenge: Install Arch 'The Easy Way' With These 2 Alternative Methods] Jason Evangelho - Forbes.com 2019-06-10<br />
* [https://www.forbes.com/sites/jasonevangelho/2019/06/03/introducing-the-arch-linux-summer-2019-os-community-challenge/ Introducing The Arch Linux Summer 2019 Community Challenge] Jason Evangelho - Forbes.com 2019-06-09<br />
* [https://chooselinux.show/10 BTW, I Installed Arch] (first 19 minutes of the podcast) Jason Evangelho and Joe Ressington - chooselinux.show 2019-05-30<br />
* [https://linuxinsider.com/story/how-to-conquer-your-fear-of-arch-linux-85983.html How to Conquer Your Fear of Arch Linux] Jonathan Terrasi - linuxinsider.com 2019-04-28<br />
<br />
== 2018 ==<br />
<br />
* [https://www.makeuseof.com/tag/reasons-install-arch-linux/ 10 Reasons to Install an Arch Linux-Based OS on Your PC] Bertel King, Jr. - makeuseof.com 2018-04-02<br />
<br />
== 2017 ==<br />
<br />
* [https://www.jupiterbroadcasting.com/107601/savelas-las-461/ Linux Action Show Episode 461] (from 00:11:00) Chris Fisher - www.jupiterbroadcasting.com 2017-03-18<br />
* [https://www.linux.com/learn/intro-to-linux/2017/2/arch-linux-simple-linux/ Arch Linux: The Simple Linux] Carla Schroder - linux.com 2017-02-02<br />
<br />
== 2016 ==<br />
<br />
* [https://mintcast.org/2016/07/25/mintcast-250-the-return-of-arch/ mintCast 250 – The Return of Arch] (from 00:49:40) Rob and Isaac - mintcast.org 2016-07-25<br />
* [https://mintcast.org/2016/01/21/mintcast-239-a-friendly-look-at-arch/ mintCast 239 – A Friendly Look at Arch] (from 00:32:16) Rob, Scott, Joe and Isaac - mintcast.org 2016-01-21<br />
<br />
== 2015 ==<br />
<br />
* [https://distrowatch.com/weekly.php?issue=20151221#arch DistroWatch Weekly Feature Story about Arch Linux] Jesse Smith - distrowatch.com 2015-12-21<br />
* [https://web.archive.org/web/20151021210506/http://www.dbailey.uk.to/2015/10/why-you-should-try-arch-linux/ Why you should try Arch Linux] David Bailey - www.dbailey.uk.to 2015-10-04<br />
* [https://keithcu.com/wordpress/?p=3641 1+ Year Running Arch Linux on a Lenovo Yoga 2] Keith Curtis - keithcu.com 2015-04-07<br />
* [https://lwn.net/Articles/638069/ The grumpy editor's Arch Linux experience] Jonathan Corbet - LWN.net 2015-04-01 <br />
* [https://www.itworld.com/article/2898189/five-reasons-i-roll-with-arch-linux-and-why-you-should-too/ Five Reasons to Use Arch Linux] Swapnil Bhartiya - www.itworld.com 2015-03-18<br />
<br />
== 2014 ==<br />
<br />
* [https://web.archive.org/web/20210119183654/https://www.linuxvoice.com/linux-distros/ Linux Distros] Ben Everard - www.linuxvoice.com 2014-10-8<br />
* [https://www.omgubuntu.co.uk/2014/04/arch-shangri-la-ubuntu-power-users Arch: Shangri-La for Ubuntu Power Users?] SAM TRAN - www.omgubuntu.co.uk 2014-4-19<br />
* [https://www.blog.paranoidpenguin.net/2014/03/arch-linux-2014-review-livin-on-the-edge/ Arch Linux 2014 review – Livin&#8217; on the edge] paranoidpenguin.net 2014-03-29<br />
* [http://techrights.org/2014/03/07/arch-linux-is-becoming-more-mainstream/ Arch Linux is Becoming More Mainstream] Dr. Roy Schestowitz - techrights.org 2014-03-07<br />
* [http://techrights.org/2014/02/12/arch-linux-2014/ Now Might be a Good Time to Give Arch Linux a Try] Dr. Roy Schestowitz - techrights.org 2014-02-12<br />
* [https://web.archive.org/web/20180624103011/http://www.thelinuxrain.com/articles/opinion-archlinux-and-stability Opinion: Arch Linux and Stability] Andrew Powell - thelinuxrain.com 2014-02-04<br />
<br />
== 2013 ==<br />
<br />
* [https://keithcu.com/wordpress/?p=3270 Arch Linux on a HiDPI Lenovo Yoga 2 Pro] Keith Curtis - keithcu.com 2013-11-11<br />
* [https://www.youtube.com/watch?v=IIkHpjhpSyA Arch Linux: Succeeding on the Bleeding Edge (YouTube Video)] [https://archlinux.org/people/developers/#allan Allan Mcrae] gives a talk at XX SINFO in Lisbon, Portugal - 2013-03-01<br />
<br />
== 2012 ==<br />
<br />
* [http://www.linuxuser.co.uk/features/under-the-hood-with-arch-and-gentoo/ Under the Hood with Arch and Gentoo] Richard Hillesley - linuxuser.co.uk 2012-10-20 <br />
* [https://www.engadget.com/2012/08/09/linux-guide-slackware-arch-linux/ linux-guide-slackware-arch-linux] John Browning - engadget.com 2012-08-09 <br />
* [https://www.techrepublic.com/blog/australia/moving-to-arch-linux-from-fedora/1236 Moving to Arch Linux from Fedora] Chris Duckett - techrepublic.com 2012-08-07<br />
* [http://www.h-online.com/open/news/item/Arch-Linux-2012-07-15-drops-AIF-1649722.html Arch Linux 2012.07.15 drops AIF] Chris von Eitzen - h-online.com 2012-07-23<br />
* [https://claudecat.wordpress.com/2012/07/05/arch-linux-not-just-for-geeks/ Arch linux – not just for geeks?] claudecat - claudecat.wordpress.com 2012-07-05<br />
* [https://www.garron.me/linux/kiss-simplicity-arch-linux-review.html KISS simplicity: Arch Linux] Guillermo Garron - www.garron.me 2012-05-21<br />
* [https://lifehacker.com/5904069/five-best-linux-distributions/ Five-best-linux-distributions] Alan Henry - lifehacker.com 2012-04-23<br />
* [https://web.archive.org/web/20120411012115/http://linuxlibrary.org/command-line/pacman-package-manager/ Pacman Package Manager] Linux Library - linuxlibrary.org 2012-03-21<br />
* [https://www.youtube.com/watch?v=f6mxf_Ca9Ms Arch Linux Review (Early 2012)] InfinitelyGalactic Reviews - youtube.com 2012-01-31<br />
* [https://justinstories.wordpress.com/2012/01/28/arched-in-a-day-a-noob-experience Arch’ed in a day; a noob experience] Justin - justinstories.wordpress.com 2012-01-28<br />
* [http://mikethecoder.com/post/16562751962/on-switching-to-arch-linux On switching to Arch Linux] Mike Crittenden - mikethecoder.com 2012-01-26<br />
* [http://www.geardiary.com/2012/01/26/arch-linux-only-the-hardcore-need-apply/ Arch Linux: Only the Hardcore Need Apply] Joel McLaughlin - geardiary.com 2012-01-26<br />
<br />
== 2011 ==<br />
<br />
* [http://standardsandfreedom.net/index.php/2011/11/06/archlinux-notforthe-elite/ ArchLinux, not just for the elite] Moved by Freedom – Powered by Standards | A weblog by Charles-H. Schulz 2011-11-06<br />
* [https://www.linuxjournal.com/content/arch-tale An Arch Tale] Dave Phillips - Linux Journal 2011-10-04<br />
* [http://www.h-online.com/open/features/Arch-Linux-It-is-what-you-make-it-1343717.html Arch Linux – "It is what you make it"] Richard Hillesley - h-online.com 2011-09-16<br />
* [https://www.linux.com/training-tutorials/six-best-linux-community-server-distributions/ The Six Best Linux Community Server Distributions] Carla Schroder - linux.com 2011-08-08<br />
* [https://web.archive.org/web/20120613211702/http://www.thisweekinlinux.com/2011/07/at072711/ Ask TWIL: Best Linux Distribution and What’s Your Favorite Distro?] Jordan Keyes - thisweekinlinux.com 2011-07-27<br />
* [https://www.linuxjournal.com/content/arch-way The Arch Way] Linux Journal - linuxjournal.com 2011-01-13<br />
<br />
== 2010 ==<br />
<br />
* [https://www.jupiterbroadcasting.com/?p=3071 Arch Linux Review] The Linux Action Show - jupiterbroadcasting.com 2010-10-31<br />
* [https://www.youtube.com/watch?v=1ZvCqslpp6M Distro Review: Arch Linux (Video)] This Week on Linux - thisweekinlinux.com 2010-05-19<br />
* [https://lwn.net/Articles/378030/ Rolling with Arch Linux] Ivan Jelic - LWN.net 2010-03-10<br />
* [https://www.osnews.com/story/22692/Arch_Linux_Team Interview: Arch Linux Team] Jordan Spencer Cunningham - OSNews 2010-01-11<br />
<br />
== 2009 ==<br />
<br />
* [https://web.archive.org/web/20110430000026/http://www.vgrc.net/2009/11/a-few-days-with-arch-linux.html] Dennis Wyman - Zangaroa Blog 2009-11-13<br />
* [https://www.phoronix.com/scan.php?page=article&item=arch_200908_benchmarks&num=1 Arch Linux 2009.08 Benchmarks] Michael Larabel - Phoronix.com 2009-08-14<br />
* [http://www.linux-mag.com/id/7469/ Arch Linux: The Simple, Flexible (and Fast!) Distro] Chris Smart - Linux-Mag.com 2009-08-12<br />
* [https://archlinux.org/news/458/ Arch Linux Magazine] Eduardo Romero, Editor 2009-08<br />
* [http://tannewt.org/slides/shawcroft-oscon_presentation.pdf Open Source Watershed: Watching Software Flow Downstream (PDF Document)] Scott Shawcroft - OSWatershed.org 2009-07-20<br />
* Arch User Magazine - Issue #3 - Daniel Griffiths, Editor 2009-06<br />
* [https://web.archive.org/web/20090610064413/http://www.lazytechguy.com/ Why people resort to Arch Linux] LazyTechGuy.com 2009-05-19<br />
* Arch Linux - Syahrizal - OpenSourceReview.com 2009-05-11<br />
* [https://www.techradar.com/news/software/operating-systems/best-linux-distros-for-power-users-gamers-newbies-and-more-596697?artc_pg=4 Best Linux distros for power users, gamers, newbies, and more] TechRadar.com 2009-05-10<br />
* Arch User Magazine - Issue #2 - Daniel Griffiths, Editor 2009-05<br />
* Arch Linux 2009.02 - Maurice Lawles - TechieMoe.com 2009-04-28<br />
* [http://danlynch.org/blog/2009/04/arch/ Distro Review - Arch Linux 2009.02] Dan Lynch - DanLynch.org 2009-04-14<br />
* Arch User Magazine - Issue #1 - Daniel Griffiths, Editor 2009-04<br />
* [https://web.archive.org/web/20200219180407/http://go2linux.garron.me/arch-linux-review Arch Linux Review] ggarron - Go2Linux.org 2009-03-21<br />
* [https://bigbrovar.wordpress.com/2009/03/16/archlinux-the-best-way-to-kiss/ Archlinux the best way to K.I.S.S.] Bigbrovar.WordPress.com 2009-03-16<br />
* [https://linux-exploration.blogspot.com/2009/03/linux-review-11-arch-linux.html Linux Review 11: Arch Linux] Open_N0DE - Linux-Exploration.BlogSpot.com 03-15-2009<br />
* [https://www.youtube.com/watch?v=BIVcF5t1kZw Installing Arch Linux Part 1 (YouTube Video)] silvernode - YouTube.com 2009-03-10<br />
* [https://www.youtube.com/watch?v=7l-IZe733a0 Installing Arch Linux Part 2 (YouTube Video)] silvernode - YouTube.com 2009-03-10<br />
* [https://www.youtube.com/watch?v=zmB3VVA9EGI Installing Arch Linux Part 3 (YouTube Video)] silvernode - YouTube.com 2009-03-10<br />
* [https://www.phoronix.com/scan.php?page=news_item&px=NzEwMg Arch Linux Revolts Against ATI Catalyst Driver] Michael Larabel - Phoronix.com 2009-03-01<br />
* [http://archuser.com/downloads/Arch%20User%20Magazine%20-%20Issue%201%20(Preview) Arch User Magazine - Issue #1-Preview (PDF Document)] Daniel Griffiths, Editor 2009-03<br />
* [https://distrowatch.com/?newsid=05336 Distribution Release: Arch Linux 2009.02] DistroWatch.com 2009-02-17<br />
* [https://distrowatch.com/weekly.php?issue=20090119#feature Arch Linux in review] DistroWatch Weekly - Issue 286 2009-01-19<br />
* [https://ostatic.com/blog/a-weekend-with-arch A Weekend With Arch] Kristin Shoemaker - Ostatic.com 2009-01-11<br />
*[https://zuttobenkyou.wordpress.com/2009/01/08/arch-linux-first-impressions/ Arch Linux: First Impressions] Shinobu - Zuttobenkyou.WordPress.com 2009-01-08<br />
<br />
== 2008 ==<br />
<br />
* [https://linuxhelp.blogspot.com/2008/12/review-arch-linux-sleek-fast-linux.html Review: Arch Linux - A sleek, fast Linux distribution] Ravi - LinuxHelp.BlogSpot.com 2008-12-12<br />
* [https://web.archive.org/web/20090210101036/http://evilgold.baywords.com:80/?p=516 Arch Linux - a review] EvilGold - EvilGold.BayWords.com 2008-10-27<br />
* [https://web.archive.org/web/20140725211837/http://thesmallerbang.wordpress.com/2008/10/10/life-on-the-cutting-edge-archlinux/ Life on the cutting edge - ArchLinux] Gautham - TheSmallerBang.WordPress.com 2008-10-10<br />
* [https://www.youtube.com/watch?v=UV0krka1hn4 Arch Linux Installation Walkthrough (YouTube Video)] linuxandfriends - YouTube.com 2008-09-30<br />
* [https://www.brighthub.com/computing/linux/reviews/7804.aspx Checking Out Arch Linux] MD Weems - BrightHub.com 2008-09-20<br />
* [https://web.archive.org/web/20111018130136/http://www.linuxbasement.com/content/a-quick-review-arch-linux A Quick Review of Arch Linux] yoyoned - LinuxBasement.com 2008-08-23<br />
* [https://42gems.com/?p=149 A Simple Linux Review] chi - 42Gems.com 2008-08-21<br />
* Linux guru? then switch to Arch Linux! - Anthony Williams - AnthonyWilliams.com 2008-07-13<br />
* [https://celettu.wordpress.com/2008/06/25/arch-linux-200806-overlord/ Arch Linux 2008.06: Overlord] Celettu's Weblog - Celettu.WordPress.com 2008-06-25<br />
* [https://distrowatch.com/?newsid=04963 Distribution Release: Arch Linux 2008.06] DistroWatch.com 2008-06-24<br />
* [http://forum.notebookreview.com/showthread.php?t=246608 Arch Linux Review] blackbird - Forum.NotebookReview.com 2008-05-04<br />
* [https://www.hardware.no/artikler/aaron_griffin_english/49507/1 Arch Linux: Popular KISS distro] Robin Heggelund Hansen - Hardware.no 2008-03-25<br />
* [https://distrogue.blogspot.com/2008/01/arch-pros-only-but-not-bad.html Arch: Pros Only, But Not Bad] DJ Gentoo - Distrogue.BlogSpot.com 2008-01-26<br />
* [https://web.archive.org/web/20110716125204/http://www.planetoss.com/detail.php?id=7 PLANETOSS: Arch Linux - Is this really a geek<nowiki>'</nowiki>s distro?] vasanth - PlanetOSS.com 2008-01-17<br />
* [https://kmandla.wordpress.com/2008/01/05/a-stable-arch-branch/ A Stable Arch Branch?] K. Mandla - KMandla.WordPress.com 2008-01-05<br />
<br />
== 2007 ==<br />
<br />
* [http://www.tllts.org/rsspage.php The Linux Link Tech Show] - Interview with Aaron Griffin, lead developer of Arch Linux Episode #223 12-12-07<br />
* [https://web.archive.org/web/20071218174523/http://tuxtoday.wordpress.com:80/2007/11/14/arch-linux-really-impressive-even-when-virtualized/ Arch Linux, really impressive. Even when virtualized.] TuxToday.WordPress.com 2007-11-14<br />
* [https://simplyjat.blogspot.com/2007/11/arch-200708-2-review.html Arch 2007.08-2 Review] OpenReview - SimplyJat.BlogSpot.com 2007-11-14<br />
* [https://distrowatch.com/?newsid=04513 Distribution Release: Arch Linux 2007.08-2] DistroWatch.com 2007-10-07<br />
* [https://web.archive.org/web/20120829000917/http://www.dvd-guides.com:80/content/view/212/104 Arch Linux Review] DVD-Guides.com 2007-09-13<br />
* [https://distrowatch.com/?newsid=04394 Distribution Release: Arch Linux 2007.08] DistroWatch.com 2007-08-05<br />
* Linux Reality: Podcast Episode 70 - Arch Linux Episode #70 2007-07-11<br />
* [https://rohrbakn.blogspot.com/2007/06/arch-linux-observational-review.html Arch Linux: An Observational Review] Rohrbakn - Rohrbakn.BlogSpot.com 2007-06-22<br />
* [http://www.urbanpuddle.com/articles/2007/05/31/ten-things-i-love-about-archlinux Ten Things I Love About ArchLinux] Vince Wadhwani - UrbanPuddle.com 2007-05-31<br />
* [https://distrowatch.com/?newsid=04235 Distribution Release: Arch Linux 2007-05] DistroWatch.com 2007-05-17<br />
* [http://www.tuxmachines.org/node/15527 Fallen Under the Spell of Arch Voodoo] srlinuxx - TuxMachines.org 2007-04-20<br />
* [https://distrowatch.com/?newsid=04143 Distribution Release: Arch Linux 0.8] DistroWatch.com 2007-04-01<br />
* [https://web.archive.org/web/20070702071647/http://usalug.org/phpBB2/viewtopic.php?t=10256 ArchLinux, The Distro I wish I had found sooner.] crouse - USALug.org 2007-01-10<br />
* [https://www.ossblog.it/post/1728/intervista-a-judd-vinet-fondatore-del-progetto-archlinux Interview with Judd Vinet, founder of Arch Linux] OSSBlog.it 2007-01-02<br />
<br />
== 2006 ==<br />
<br />
* [https://web.archive.org/web/20180624103009/http://karuppuswamy.com/wordpress/2006/11/12/review-arch-linux-072/ Review: Arch Linux 0.7.2] – swamytk, KaruppuSwamy.com 2006-11-12<br />
* [https://www.osnews.com/story/15075 Watching the Evolution of Arch Linux] – Eugenia Loli-Queru, OSNews.com 2006-07-03<br />
* [https://distrowatch.com/?newsid=03456 Distribution Release: Arch Linux 0.7.2] – DistroWatch.com 2006-05-23<br />
* [https://www.linux-magazine.com/Issues/2006/64/Arch-Linux The Simplicity of Arch (PDF Document)] – Jon Kent, Linux-Magazine Issue #64 2006-03<br />
* [https://www.tllts.org/rsspage.php The Linux Link Tech Show] – Interview with Judd Vinet, founder of Arch Linux Episode #122 2006-02-08<br />
* [https://distrowatch.com/?newsid=03157 Distribution Release: Arch Linux 0.7.1] – DistroWatch.com 2006-01-05<br />
<br />
== 2005 ==<br />
<br />
* [https://www.tllts.org/rsspage.php The Linux Link Tech Show] – Interview with James Rayner, creator of the Archie Live CD Episode #91 2005-07-06<br />
* [https://www.osnews.com/story/10142 The Big Arch Linux Interview] – Eugenia Loli-Queru, OSNews.com 2005-03-29<br />
* [https://www.osnews.com/story/10047 Arch Linux: Why It Rocks] – Eugenia Loli-Queru, OSNews.com 2005-03-21<br />
* [https://www.osnews.com/story/9836 Make your Arch Linux a Bluetooth Access Point] – Eugenia Loli-Queru, OSNews.com 2005-02-27<br />
* [https://lwn.net/Articles/121784/ Arch Linux for Power Users] – Ladislav Bodnar, Linux Weekly News 2005-02-02<br />
* [https://www.osnews.com/story/9540 A Week in the Life of an Arch Linux Newbie] – Andrew Roberts, OSNews.com 2005-01-27<br />
* [https://distrowatch.com/?newsid=02291 Distribution Release: Arch Linux 0.7] – DistroWatch.com 2005-01-25<br />
<br />
== 2004 ==<br />
<br />
* [https://www.osnews.com/story/8761 Arch Linux Vs Slackware: The Best of All Worlds] – Eugenia Loli-Queru, OSNews.com 2004-11-03<br />
* [https://web.archive.org/web/20110718040758/discuss.extremetech.com/forums/thread/536482008.aspx WRBurns' Review of Arch Linux 0.6] – WRBurns, ExtremeTech.com 2004-04-14<br />
* [https://www.linuxlookup.com/review/arch_linux_version_0_6_widget LinuxLookup: Arch Linux version 0.6 (Widget) Review] – LinuxLookUp.com 2004-03-23<br />
* [https://distrowatch.com/?newsid=01410 Distribution Release: Arch Linux 0.6] – DistroWatch.com 2004-03-01<br />
* [https://www.osnews.com/story/5971 Arch Linux: An End To My Distro Shuffle?] – Andrew Barilla, OSNews.com 2004-02-10<br />
<br />
== 2003 ==<br />
<br />
* [https://www.osnews.com/story/4827 Arch Linux: A Better Distribution] – Ben Mazer, OSNews.com 2003-10-15<br />
* [https://distrowatch.com/dwres.php?resource=interview-arch Interview with Judd Vinet] – Ladislav Bodnar, DistroWatch.com 2003-08-03<br />
* [https://lwn.net/Articles/42095/ My look at Arch Linux 0.2, 0.3, and 0.4] – rabnud, Linux Weekly News 2003-08-01<br />
* [https://lwn.net/Articles/40952/ A Look at Arch Linux] – Ladislav Bodnar, Linux Weekly News 2003-07-23<br />
* [https://distrowatch.com/?newsid=00870 Distribution Release: Arch Linux 0.5] – DistroWatch.com 2003-07-21<br />
<br />
== 2002 ==<br />
<br />
* [https://distrowatch.com/?newsid=00538 Distribution Release: Arch Linux 0.4] – DistroWatch.com 2002-12-18<br />
* [https://www.osnews.com/story/2264 Introduction to Arch Linux] – Jon "Trekboy", OSNews.com 2002-12-01<br />
* [https://distrowatch.com/?newsid=00346 Distribution Release: Arch Linux 0.3] – DistroWatch.com 2002-08-08<br />
* [https://distrowatch.com/?newsid=00201 Distribution Release: Arch Linux 0.2] – DistroWatch.com 2002-04-18</div>Pdchttps://wiki.archlinux.org/index.php?title=Mkinitcpio&diff=703937Mkinitcpio2021-11-30T22:04:39Z<p>Pdc: /* Extracting the image */ Images created by mkinitcpio version 31 are readable only by root</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Initramfs]]<br />
[[Category:Kernel]]<br />
[[Category:Arch projects]]<br />
[[Category:Commands]]<br />
[[de:Mkinitcpio]]<br />
[[es:Mkinitcpio]]<br />
[[fr:Mkinitcpio]]<br />
[[id:Mkinitcpio]]<br />
[[it:Mkinitcpio]]<br />
[[ja:Mkinitcpio]]<br />
[[pt:Mkinitcpio]]<br />
[[zh-hans:Mkinitcpio]]<br />
{{Related articles start}}<br />
{{Related|Booster}}<br />
{{Related|Boot debugging}}<br />
{{Related|dracut}}<br />
{{Related|Kernel modules}}<br />
{{Related|mkinitcpio/Minimal initramfs}}<br />
{{Related|systemd}}<br />
{{Related articles end}}<br />
[https://github.com/archlinux/mkinitcpio mkinitcpio] is a Bash script used to create an [[Wikipedia:Initial ramdisk|initial ramdisk]] environment. From the {{man|8|mkinitcpio}} man page:<br />
<br />
:The initial ramdisk is in essence a very small environment (early userspace) which loads various kernel modules and sets up necessary things before handing over control to {{ic|init}}. This makes it possible to have, for example, encrypted root file systems and root file systems on a software RAID array. ''mkinitcpio'' allows for easy extension with custom hooks, has autodetection at runtime, and many other features.<br />
<br />
Traditionally, the kernel was responsible for all hardware detection and initialization tasks early in the [[boot process]] before mounting the root file system and passing control to {{ic|init}}. However, as technology advances, these tasks have become increasingly complex. <br />
<br />
Nowadays, the root file system may be on a wide range of hardware, from SCSI to SATA to USB drives, controlled by a variety of drive controllers from different manufacturers. Additionally, the root file system may be encrypted or compressed; within a software RAID array or a logical volume group. The simple way to handle that complexity is to pass management into userspace: an initial ramdisk. See also: [https://web.archive.org/web/20150430223035/http://archlinux.me/brain0/2010/02/13/early-userspace-in-arch-linux/ /dev/brain0 » Blog Archive » Early Userspace in Arch Linux].<br />
<br />
''mkinitcpio'' has been developed by the Arch Linux developers and from community contributions. See the [https://github.com/archlinux/mkinitcpio public Git repository].<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|mkinitcpio}} package, which is a dependency of the {{Pkg|linux}} package, so most users will already have it installed.<br />
<br />
Advanced users may wish to install the latest development version of ''mkinitcpio'' from Git with the {{AUR|mkinitcpio-git}} package.<br />
<br />
{{Note|It is '''highly''' recommended that you follow the [https://mailman.archlinux.org/mailman/listinfo/arch-projects arch-projects mailing list] if you use ''mkinitcpio'' from Git!}}<br />
<br />
== Image creation and activation ==<br />
<br />
=== Automated generation ===<br />
<br />
Every time a kernel is installed or upgraded, a [[pacman hook]] automatically generates a ''.preset'' file saved in {{ic|/etc/mkinitcpio.d/}}. For example {{ic|linux.preset}} for the official stable {{Pkg|linux}} kernel package. A preset is simply a list of information required to create initial ramdisk images, instead of manually specifying the various parameters and the location of the output files.<br />
By default, it contains the instructions to create two images:<br />
<br />
# the ''default'' ramdisk image created following the directives specified in the mkinitcpio [[#Configuration]], and<br />
# the ''fallback'' ramdisk image, same as above except that the ''autodetect'' hook is skipped during creation, thus including a full range of modules which supports most systems.<br />
<br />
After creating the preset, the pacman hook calls the ''mkinitcpio'' script which generates the two images, using the information provided in the preset.<br />
<br />
{{Note|''.preset'' files are used to automatically regenerate the initramfs after a kernel update; be careful when editing them.}}<br />
<br />
=== Manual generation ===<br />
<br />
To run the script manually, refer to the {{man|8|mkinitcpio}} manual page for instructions. In particular, to (re-)generate the preset provided by a kernel package, use the {{ic|-p}}/{{ic|--preset}} option followed by the preset to utilize. For example, for the {{Pkg|linux}} package, use the command:<br />
<br />
# mkinitcpio -p linux<br />
<br />
To (re-)generate all existing presets, use the {{ic|-P}}/{{ic|--allpresets}} switch. This is typically used to regenerate all the initramfs images after a change of the global [[#Configuration]]:<br />
<br />
# mkinitcpio -P<br />
<br />
Users may create any number of initramfs images with a variety of different configurations. The desired image must be specified in the respective [[boot loader]] configuration file.<br />
<br />
=== Customized generation ===<br />
<br />
Users can generate an image using an alternative configuration file. For example, the following will generate an initial ramdisk image according to the directions in {{ic|/etc/mkinitcpio-custom.conf}} and save it as {{ic|/boot/initramfs-custom.img}}.<br />
<br />
# mkinitcpio --config /etc/mkinitcpio-custom.conf --generate /boot/initramfs-custom.img<br />
<br />
If generating an image for a kernel other than the one currently running, add the kernel release version to the command line. The installed kernel releases can be found in {{ic|/usr/lib/modules/}}, the syntax is consistent with the output of the command {{ic|uname -r}} for each kernel.<br />
<br />
# mkinitcpio --generate /boot/initramfs-custom2.img --kernel 5.7.12-arch1-1<br />
<br />
== Configuration ==<br />
<br />
The primary configuration file for ''mkinitcpio'' is {{ic|/etc/mkinitcpio.conf}}. Additionally, preset definitions are provided by kernel packages in the {{ic|/etc/mkinitcpio.d}} directory (e.g. {{ic|/etc/mkinitcpio.d/linux.preset}}).<br />
<br />
Users can modify six variables within the configuration file, see {{man|5|mkinitcpio.conf}} for more details:<br />
<br />
; {{ic|MODULES}}: Kernel modules to be loaded before any boot hooks are run. <br />
; {{ic|BINARIES}}: Additional binaries to be included in the initramfs image.<br />
; {{ic|FILES}}: Additional files to be included in the initramfs image.<br />
; {{ic|HOOKS}}: Hooks are scripts that execute in the initial ramdisk.<br />
; {{ic|COMPRESSION}}: Used to compress the initramfs image.<br />
; {{ic|COMPRESSION_OPTIONS}}: Extra arguments to pass to the {{ic|COMPRESSION}} program. Usage of this setting is strongly discouraged. ''mkinitcpio'' will handle special requirements for compressors (e.g. passing {{ic|1=--check=crc32}} to xz), and misusage can easily lead to an unbootable system.<br />
<br />
{{Note|<br />
* Some hooks that may be required for your system like '''lvm2''', '''mdadm_udev''', and '''encrypt''' are '''NOT''' enabled by default. Read the [[#HOOKS]] section carefully for instructions.<br />
* Users with multiple hardware disk controllers that use the same node names but different kernel modules (e.g. two SCSI/SATA or two IDE controllers) should use [[persistent block device naming]] to ensure that the right devices are mounted. Otherwise, the root device location may change between boots, resulting in kernel panics.<br />
}}<br />
<br />
=== MODULES ===<br />
<br />
The {{ic|MODULES}} array is used to specify modules to load before anything else is done.<br />
<br />
Modules suffixed with a {{ic|?}} will not throw errors if they are not found. This might be useful for custom kernels that compile in modules which are listed explicitly in a hook or configuration file.<br />
<br />
{{Note|<br />
* If using '''reiser4''', it ''must'' be added to the {{ic|MODULES}} array.<br />
* When using the '''encrypt''' or '''sd-encrypt''' hook, the keyboard modules and/or filesystems needed to unlock the LUKS device during system boot need to be added to the {{ic|MODULES}} array when the target system differs from the one used to run ''mkinitcpio''. For example, if you use a keyfile on an ext2 file system but no ext2 file system is mounted at the time ''mkinitcpio'' runs, add {{ic|ext2}}. See [[dm-crypt/System configuration#cryptkey]] for more details.<br />
* If using a keyboard through a USB 3 hub and wish to use it to unlock a LUKS device, add {{ic|usbhid xhci_hcd}}.<br />
* If using displays connected to a docking station, you might need to add a module for your graphic card to make initrd output visible (e.g. {{ic|i915}} for most Intel cards).<br />
}}<br />
<br />
=== BINARIES and FILES ===<br />
<br />
These options allow users to add files to the image. Both {{ic|BINARIES}} and {{ic|FILES}} are added before hooks are run, and may be used to override files used or provided by a hook. {{ic|BINARIES}} are auto-located within a standard {{ic|PATH}} and are dependency-parsed, meaning any required libraries will also be added. {{ic|FILES}} are added ''as-is''. For example:<br />
<br />
FILES=(/etc/modprobe.d/modprobe.conf)<br />
<br />
BINARIES=(kexec)<br />
<br />
Note that as both {{ic|BINARIES}} and {{ic|FILES}} are [[Bash]] arrays, multiple entries can be added delimited with spaces.<br />
<br />
=== HOOKS ===<br />
<br />
The {{ic|HOOKS}} array is the most important setting in the file. Hooks are small scripts which describe what will be added to the image. For some hooks, they will also contain a runtime component which provides additional behavior, such as starting a daemon, or assembling a stacked block device. Hooks are referred to by their name, and executed in the order they exist in the {{ic|HOOKS}} array of the configuration file.<br />
<br />
The default {{ic|HOOKS}} setting should be sufficient for most simple, single disk setups. For root devices which are stacked or multi-block devices such as [[LVM]], [[RAID]], or [[dm-crypt]], see the respective wiki pages for further necessary configuration.<br />
<br />
==== Build hooks ====<br />
<br />
Build hooks are found in {{ic|/usr/lib/initcpio/install/}}, custom build hooks can be placed in {{ic|/etc/initcpio/install/}}. These files are sourced by the bash shell during runtime of ''mkinitcpio'' and should contain two functions: {{ic|build}} and {{ic|help}}. The {{ic|build}} function describes the modules, files, and binaries which will be added to the image. An API, documented by {{man|8|mkinitcpio}}, serves to facilitate the addition of these items. The {{ic|help}} function outputs a description of what the hook accomplishes.<br />
<br />
For a list of all available hooks:<br />
<br />
$ mkinitcpio -L<br />
<br />
Use ''mkinitcpio'''s {{ic|-H}}/{{ic|--hookhelp}} option to output help for a specific hook, for example:<br />
<br />
$ mkinitcpio -H udev<br />
<br />
==== Runtime hooks ====<br />
<br />
Runtime hooks are found in {{ic|/usr/lib/initcpio/hooks/}}, custom runtime hooks can be placed in {{ic|/etc/initcpio/hooks/}}. For any runtime hook, there should always be a build hook of the same name, which calls {{ic|add_runscript}} to add the runtime hook to the image. These files are sourced by the busybox ash shell during early userspace. With the exception of cleanup hooks, they will always be run in the order listed in the {{ic|HOOKS}} setting. Runtime hooks may contain several functions:<br />
<br />
{{ic|run_earlyhook}}: Functions of this name will be run once the API file systems have been mounted and the kernel command line has been parsed. This is generally where additional daemons, such as udev, which are needed for the early boot process are started from.<br />
<br />
{{ic|run_hook}}: Functions of this name are run shortly after the early hooks. This is the most common hook point, and operations such as assembly of stacked block devices should take place here.<br />
<br />
{{ic|run_latehook}}: Functions of this name are run after the root device has been mounted. This should be used, sparingly, for further setup of the root device, or for mounting other file systems, such as {{ic|/usr}}.<br />
<br />
{{ic|run_cleanuphook}}: Functions of this name are run as late as possible, and in the reverse order of how they are listed in the {{ic|HOOKS}} array in the configuration file. These hooks should be used for any last minute cleanup, such as shutting down any daemons started by an early hook.<br />
<br />
{{Note|Runtime hooks are only used by busybox init. '''systemd''' hook triggers a systemd based init, which does not run any runtime hooks but uses systemd units instead.}}<br />
<br />
==== Common hooks ====<br />
<br />
A table of common hooks and how they affect image creation and runtime follows. Note that this table is not complete, as packages can provide custom hooks.<br />
<br />
{{Expansion|Add info about {{ic|hostdata}}, {{ic|memdisk}}, {{ic|sleep}} and {{ic|strip}}, find out if {{ic|dmraid}}, etc. work/are needed for systemd based initramfs.|section=Improvements for the Common hooks table and section about systemd hook}}<br />
<br />
{| class="wikitable"<br />
! busybox init !! systemd init !! [[#Build hooks|Build hook]] !! [[#Runtime hooks|Runtime hook]] (busybox init only)<br />
|-<br />
|colspan="2" {{C|'''base'''}} || Sets up all initial directories and installs base utilities and libraries. Always keep this hook as the first hook unless you know what you are doing, as it provides critical busybox init when not using '''systemd''' hook. <br/>Provides a busybox recovery shell when using '''systemd''' hook. {{Note|The recovery shell is not usable since the root account in the initramfs is [https://github.com/archlinux/svntogit-packages/commit/776743d220cbb56e9abca2cc8bcef3a0ab7c8d0a locked].}}<br />
| {{-}}<br />
|-<br />
| {{C|'''udev'''}} ||rowspan="3" {{C|'''systemd'''}} || Adds udevd, udevadm, and a small subset of udev rules to your image. || Starts the udev daemon and processes uevents from the kernel; creating device nodes. As it simplifies the boot process by not requiring the user to explicitly specify necessary modules, using it is recommended.<br />
|-<br />
| {{C|'''usr'''}} || Adds support for {{ic|/usr}} on a separate partition. See [[#/usr as a separate partition]] for details. || Mounts the {{ic|/usr}} partition after the real root has been mounted.<br />
|-<br />
|-<br />
| {{C|'''resume'''}} || {{-}} || Tries to resume from the "suspend to disk" state. See [[Hibernation]] for further configuration.<br />
|-<br />
| {{C|'''btrfs'''}} || {{Grey|--}} || Sets the required modules to enable [[Btrfs]] for using multiple devices with Btrfs. You need to have {{Pkg|btrfs-progs}} installed to use this. This hook is not required for using Btrfs on a single device. || Runs {{ic|btrfs device scan}} to assemble a multi-device Btrfs root file system when '''udev''' hook or '''systemd''' hook is not present. The {{Pkg|btrfs-progs}} package is required for this hook.<br />
|-<br />
|colspan="2" {{C|'''autodetect'''}} || Shrinks your initramfs to a smaller size by creating a whitelist of modules from a scan of sysfs. Be sure to verify included modules are correct and none are missing. This hook must be run before other subsystem hooks in order to take advantage of auto-detection. Any hooks placed before 'autodetect' will be installed in full. || {{-}}<br />
|-<br />
|colspan="2" {{C|'''modconf'''}} || Includes modprobe configuration files from {{ic|/etc/modprobe.d/}} and {{ic|/usr/lib/modprobe.d/}}. || {{-}}<br />
|-<br />
|colspan="2" {{C|'''block'''}} || Adds all block device modules, formerly separately provided by the ''fw'', ''mmc'', ''pata'', ''sata'', ''scsi'', ''usb'', and ''virtio'' hooks. || {{-}}<br />
|-<br />
| {{C|'''net'''}} || {{Grey|''not implemented''}} || Adds the necessary modules for a network device. You must have {{Pkg|mkinitcpio-nfs-utils}} installed to use this, see [[#Using net]] for details. || Provides handling for an NFS-based root file system.<br />
|-<br />
| {{C|'''dmraid'''}} || {{Grey|''?''}} || Provides support for fakeRAID root devices. You must have {{Pkg|dmraid}} installed to use this. Note that it is preferred to use [[mdadm]] with the '''mdadm_udev''' hook with fakeRAID if your controller supports it. See [[#Using RAID]] for details. || Locates and assembles fakeRAID block devices using {{ic|dmraid}}.<br />
|-<br />
|colspan="2" {{C|'''mdadm_udev'''}} || Provides support for assembling RAID arrays via udev. You must have {{Pkg|mdadm}} installed to use this. If you use this hook with a FakeRAID array, it is recommended to include {{ic|mdmon}} in {{ic|BINARIES}}. See [[#Using RAID]] for details. || {{-}}<br />
|-<br />
|colspan="2" {{C|'''keyboard'''}} || Adds the necessary modules for keyboard devices. Use this if you have an USB or serial keyboard and need it in early userspace (either for entering encryption passphrases or for use in an interactive shell). As a side effect, modules for some non-keyboard input devices might be added too, but this should not be relied on. Supersedes old ''usbinput'' hook.<br />
<br />
{{Note|For systems that are booted with different hardware configurations (e.g. laptops with external keyboard vs. internal keyboard or [[Wikipedia:Headless computer|headless systems]]), this hook needs to be placed before '''autodetect''' in order to be able to use the keyboard at boot time, for example to unlock an encrypted device when using the {{ic|encrypt}} hook is used.}}<br />
<br />
| {{-}}<br />
|-<br />
| {{C|'''keymap'''}} ||rowspan="2" {{C|'''sd-vconsole'''}} || Adds the specified [[Linux console/Keyboard configuration#Persistent configuration|keymap(s)]] from {{ic|/etc/vconsole.conf}} to the initramfs. If you use [[dm-crypt/Encrypting an entire system|system encryption]], especially full-disk encryption, make sure you add it before the {{ic|1=encrypt}} hook. || Loads the specified keymap(s) from {{ic|/etc/vconsole.conf}} during early userspace.<br />
|-<br />
| {{C|'''consolefont'''}} || Adds the specified [[Linux console#Persistent configuration|console font]] from {{ic|/etc/vconsole.conf}} to the initramfs. || Loads the specified console font from {{ic|/etc/vconsole.conf}} during early userspace.<br />
|-<br />
| {{C|'''encrypt'''}} || {{C|'''sd-encrypt'''}} || Adds the {{ic|dm_crypt}} kernel module and the {{ic|cryptsetup}} tool to the image. You must have {{Pkg|cryptsetup}} installed to use this. {{Note|Take notice of the remarks for the ''keyboard'' hook above to unlock an encrypted device during boot, and/or the filesystem remarks in [[#MODULES]] when you use a file to unlock.}} || Detects and unlocks an encrypted root partition. See [[#Runtime customization]] for further configuration.<br />
For '''sd-encrypt''' see [[dm-crypt/System configuration#Using sd-encrypt hook]].<br />
|-<br />
|colspan="2" {{C|'''lvm2'''}} || Adds the device mapper kernel module and the {{ic|lvm}} tool to the image. You must have {{Pkg|lvm2}} installed to use this. This is necessary if you have your root file system on [[LVM]]. || {{-}}<br />
|-<br />
|colspan="2" {{C|'''fsck'''}} || Adds the fsck binary and file system-specific helpers to allow running fsck against your root device (and {{ic|/usr}} if separate) prior to mounting. If added after the '''autodetect''' hook, only the helper specific to your root file system will be added. Usage of this hook is '''strongly''' recommended, and it is required with a separate {{ic|/usr}} partition. It is highly recommended that if you include this hook that you also include any necessary modules to ensure your keyboard will work in early userspace. <br/>The use of this hook requires the {{ic|rw}} parameter to be set on the [[kernel command line]] ([https://bbs.archlinux.org/viewtopic.php?pid=1307895#p1307895 discussion]). See [[fsck#Boot time checking]] for more details. || {{-}}<br />
|-<br />
|colspan="2" {{C|'''filesystems'''}} || This includes necessary file system modules into your image. This hook is '''required''' unless you specify your file system modules in {{ic|MODULES}}. || {{-}}<br />
|-<br />
|}<br />
<br />
=== COMPRESSION ===<br />
<br />
The kernel supports several formats for compression of the initramfs: {{Pkg|gzip}}, {{Pkg|bzip2}}, lzma, {{Pkg|xz}}, {{Pkg|lzo}}, {{Pkg|lz4}} and {{Pkg|zstd}}. mkinitcpio uses zstd compressed images by default, note that the zstd compression runs in multi-threading mode (with the {{ic|-T0}} option which spawns as many threads as detected cores).<br />
<br />
The provided {{ic|mkinitcpio.conf}} has the various {{ic|COMPRESSION}} options commented out. Uncomment one if you wish to switch to another compression method and make sure you have the corresponding compression utility installed. If none is specified, the zstd default method is used. If you wish to create an uncompressed image, specify {{ic|1=COMPRESSION='''cat'''}} in the config file or use {{ic|-z cat}} on the command line.<br />
<br />
{{Tip|With a compression ratio typically around 2.5 on the image in its high compression mode ({{ic|-9}}), lz4 achieves the fastest decompression speed at the cost of a slower single-threaded compression. For a slightly better compression, lzo is still fast to decompress. zstd offers a versatile solution, with multi-threaded compression and a wide range of compression levels through its options — see {{man|1|zstd|Operation modifiers}}. xz achieves the smallest size with a reduction factor around 5 in its high compression preset ({{ic|-9}}), at the cost of a much slower decompression speed.}}<br />
<br />
=== COMPRESSION_OPTIONS ===<br />
<br />
These are additional flags passed to the program specified by {{ic|COMPRESSION}}, such as:<br />
<br />
COMPRESSION_OPTIONS=(-9)<br />
<br />
{{Note|This option can be left empty, ''mkinitcpio'' will ensure that any supported compression method has the necessary flags to produce a working image. On the other hand, misusage of this option can lead to an '''unbootable system''' if the kernel is unable to unpack the resultant archive.}}<br />
<br />
== Runtime customization ==<br />
<br />
{{Expansion|Which options work with the {{ic|systemd}} hook and which are {{ic|base}}-only?}}<br />
<br />
Runtime configuration options can be passed to {{ic|init}} and certain hooks via the kernel command line. Kernel command-line parameters are often supplied by the bootloader. The options discussed below can be appended to the kernel command line to alter default behavior. See [[Kernel parameters]] and [[Arch boot process]] for more information.<br />
<br />
=== init from base hook ===<br />
<br />
; {{ic|root}}: This is the most important parameter specified on the kernel command line, as it determines what device will be mounted as your proper root device. ''mkinitcpio'' is flexible enough to allow a wide variety of formats, for example:<br />
<br />
root=/dev/sda1 # /dev node<br />
root=LABEL=CorsairF80 # label<br />
root=UUID=ea1c4959-406c-45d0-a144-912f4e86b207 # UUID<br />
root=PARTUUID=14420948-2cea-4de7-b042-40f67c618660 # GPT partition UUID<br />
<br />
{{Note|The following boot parameters alter the default behavior of {{ic|init}} in the initramfs environment. See {{ic|/usr/lib/initcpio/init}} for details. They will not work when {{ic|systemd}} hook is being used since the {{ic|init}} from {{ic|base}} hook is replaced.}}<br />
<br />
; {{ic|break}}: If {{ic|break}} or {{ic|1=break=premount}} is specified, {{ic|init}} pauses the boot process (after loading hooks, but before mounting the root file system) and launches an interactive shell which can be used for troubleshooting purposes. This shell can be launched after the root has been mounted by specifying {{ic|1=break=postmount}}. Normal boot continues after exiting from the shell.<br />
<br />
; {{ic|disablehooks}}: Disable hooks at runtime by adding {{ic|1=disablehooks=hook1[,hook2,...]}}. For example: {{bc|1=disablehooks=resume}}<br />
<br />
; {{ic|earlymodules}}: Alter the order in which modules are loaded by specifying modules to load early via {{ic|1=earlymodules=mod1[,mod2,...]}}. (This may be used, for example, to ensure the correct ordering of multiple network interfaces.)<br />
<br />
See [[Boot debugging]] and {{man|8|mkinitcpio}} for other parameters.<br />
<br />
=== Using RAID ===<br />
<br />
See [[RAID#Configure mkinitcpio]].<br />
<br />
=== Using net ===<br />
<br />
{{Note|NFSv4 is not yet supported {{Bug|28287}}.}}<br />
<br />
'''Required packages'''<br />
<br />
{{ic|net}} requires the {{Pkg|mkinitcpio-nfs-utils}} package.<br />
<br />
'''Kernel parameters''' <br />
<br />
Comprehensive and up-to-date information can be found in the official [https://www.kernel.org/doc/html/latest/admin-guide/nfs/nfsroot.html kernel documentation].<br />
<br />
'''ip='''<br />
<br />
This parameter tells the kernel how to configure IP addresses of devices and also how to set up the IP routing table. It can take up to nine arguments separated by colons: {{ic|1=ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>:<dns0-ip>:<dns1-ip>:<ntp0-ip>}}.<br />
<br />
If this parameter is missing from the kernel command line, all fields are assumed to be empty, and the defaults mentioned in the [https://www.kernel.org/doc/html/latest/admin-guide/nfs/nfsroot.html kernel documentation] apply. In general this means that the kernel tries to configure everything using autoconfiguration.<br />
<br />
The {{ic|<autoconf>}} parameter can appear alone as the value to the {{ic|ip}} parameter (without all the {{ic|:}} characters before). If the value is {{ic|1=ip=off}} or {{ic|1=ip=none}}, no autoconfiguration will take place, otherwise autoconfiguration will take place. The most common way to use this is {{ic|1=ip=dhcp}}.<br />
<br />
For parameters explanation, see the [https://www.kernel.org/doc/html/latest/admin-guide/nfs/nfsroot.html kernel documentation].<br />
<br />
Examples:<br />
<br />
ip=127.0.0.1:::::lo:none --> Enable the loopback interface.<br />
ip=192.168.1.1:::::eth2:none --> Enable static eth2 interface.<br />
ip=:::::eth0:dhcp --> Enable dhcp protocol for eth0 configuration.<br />
<br />
{{Note|Make sure to use kernel device names (e.g. {{ic|eth0}}) for the {{ic|<device>}} parameter, the persistent names (e.g. {{ic|enp2s0}}) will not work. See [[Network configuration#Network interfaces]] for details.}}<br />
<br />
'''BOOTIF='''<br />
<br />
If you have multiple network cards, this parameter can include the MAC address of the interface you are booting from. This is often useful as interface numbering may change, or in conjunction with pxelinux IPAPPEND 2 or IPAPPEND 3 option. If not given, {{ic|eth0}} will be used.<br />
<br />
Example:<br />
<br />
BOOTIF=01-A1-B2-C3-D4-E5-F6 # Note the prepended "01-" and capital letters.<br />
<br />
'''nfsroot='''<br />
<br />
If the {{ic|nfsroot}} parameter is NOT given on the command line, the default {{ic|/tftpboot/%s}} will be used.<br />
<br />
nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]<br />
<br />
Run {{ic|mkinitcpio -H net}} for parameter explanation.<br />
<br />
=== Using LVM ===<br />
<br />
If your root device is on [[LVM]], see [[Install Arch Linux on LVM#Adding mkinitcpio hooks]].<br />
<br />
=== Using encrypted root ===<br />
<br />
If using an [[Dm-crypt/Encrypting_an_entire_system|encrypted root]] see [[dm-crypt/System configuration#mkinitcpio]] for detailed information on which hooks to include.<br />
<br />
=== /usr as a separate partition ===<br />
<br />
If you keep {{ic|/usr}} as a separate partition, you must adhere to the following requirements:<br />
<br />
* Add the {{ic|fsck}} hook, mark {{ic|/usr}} with a {{ic|passno}} of {{ic|2}} in {{ic|/etc/fstab}} to run the check on the partition at startup. While recommended for everyone, it is mandatory if you want your {{ic|/usr}} partition to be fsck'ed at boot-up. Without this hook, {{ic|/usr}} will never be fsck'd.<br />
* If not using the systemd hook, add the {{ic|usr}} hook. This will mount the {{ic|/usr}} partition after root is mounted.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Extracting the image ===<br />
<br />
If you are curious about what is inside the initramfs image, you can extract it and poke at the files inside of it. <br />
<br />
The initramfs image is an SVR4 CPIO archive, generated via the {{ic|find}} and {{ic|bsdcpio}} commands, optionally compressed with a compression scheme understood by the kernel. For more information on the compression schemes, see [[#COMPRESSION]].<br />
<br />
''mkinitcpio'' includes a utility called {{ic|lsinitcpio}} which will list and/or extract the contents of initramfs images.<br />
<br />
You can list the files in the image with:<br />
<br />
# lsinitcpio /boot/initramfs-linux.img<br />
<br />
And to extract them all in the current directory:<br />
<br />
# lsinitcpio -x /boot/initramfs-linux.img<br />
<br />
You can also get a more human-friendly listing of the important parts in the image:<br />
<br />
# lsinitcpio -a /boot/initramfs-linux.img<br />
<br />
=== Recompressing a modified extracted image ===<br />
<br />
Invoke the {{ic|build_image}} function of the {{ic|/usr/bin/mkinitcpio}} script with parameters<br />
<br />
build_image ''outfile'' ''compression''<br />
<br />
It can be done by creating a new script with the contents of the {{ic|build_image}} function and running it with the above parameters.<br />
This will compress the contents present in the current directory in a file named {{ic|''outfile''}}.<br />
<br />
{{Warning|It is a good idea to rename the automatically generated {{ic|/boot/initramfs-linux.img}} before you overwrite it, so you can easily undo your changes. Be prepared for making a mistake that prevents your system from booting. If this happens, you will need to boot through the fallback, or a boot CD, to restore your original, run ''mkinitcpio'' to overwrite your changes, or fix them yourself and recompress the image.}}<br />
<br />
=== "/dev must be mounted" when it already is ===<br />
<br />
The test used by ''mkinitcpio'' to determine if {{ic|/dev}} is mounted is to see if {{ic|/dev/fd/}} is there. If everything else looks fine, it can be "created" manually by:<br />
<br />
# ln -s /proc/self/fd /dev/<br />
<br />
(Obviously, {{ic|/proc}} must be mounted as well. ''mkinitcpio'' requires that anyway, and that is the next thing it will check.)<br />
<br />
=== Possibly missing firmware for module XXXX ===<br />
<br />
When initramfs are being rebuild after a kernel update, you might get these or similar warnings:<br />
<br />
==> WARNING: Possibly missing firmware for module: wd719x<br />
==> WARNING: Possibly missing firmware for module: aic94xx<br />
==> WARNING: Possibly missing firmware for module: xhci_pci<br />
<br />
These appear to most Arch Linux users, as the firmware is not included in the {{Pkg|linux-firmware}} package. If you do not use hardware which uses these firmwares you can safely ignore this message. Currently, the only solution for suppressing warnings for wd719x and aic94xx modules is actually installing firmware packages for them. For aic94xx, install {{AUR|aic94xx-firmware}}. For wd719x, install {{AUR|wd719x-firmware}}. For xhci_pci, install {{AUR|upd72020x-fw}}. See related discussion [https://gist.github.com/imrvelj/c65cd5ca7f5505a65e59204f5a3f7a6d here].<br />
<br />
Most common firmware files can be acquired by [[install]]ing the ''linux-firmware'' package. For other packages proving firmware, try searching for the module name in the [[official repositories]] or [[AUR]].<br />
<br />
=== No PS/2 controller found ===<br />
<br />
On some motherboards (mostly ancient ones, but also a few new ones), the i8042 controller cannot be automatically detected. It is rare, but some people will surely be without keyboard. You can detect this situation in advance. If you have a PS/2 port and get {{ic|i8042: PNP: No PS/2 controller found. Probing ports directly}} message, add '''atkbd''' to the {{ic|MODULES}} array.<br />
<br />
=== Standard rescue procedures ===<br />
<br />
With an improper initial ram-disk a system often is unbootable. So follow a system rescue procedure like below:<br />
<br />
==== Boot succeeds on one machine and fails on another ====<br />
<br />
''mkinitcpio'''s {{ic|autodetect}} hook filters unneeded [[kernel modules]] in the primary initramfs scanning {{ic|/sys}} and the modules loaded at the time it is run. If you transfer your {{ic|/boot}} directory to another machine and the boot sequence fails during early userspace, it may be because the new hardware is not detected due to missing kernel modules. Note that USB 2.0 and 3.0 need different kernel modules. <br />
<br />
To fix, first try choosing the [[#Image creation and activation|fallback]] image from your [[bootloader]], as it is not filtered by {{ic|autodetect}}. Once booted, run ''mkinitcpio'' on the new machine to rebuild the primary image with the correct modules. If the fallback image fails, try booting into an Arch Linux live CD/USB, chroot into the installation, and run ''mkinitcpio'' on the new machine. As a last resort, try [[#MODULES|manually]] adding modules to the initramfs.<br />
<br />
== See also ==<br />
<br />
* Linux Kernel documentation on [https://www.kernel.org/doc/html/latest/filesystems/ramfs-rootfs-initramfs.html#what-is-rootfs initramfs, "What is rootfs?"]<br />
* Linux Kernel documentation on [https://www.kernel.org/doc/html/latest/admin-guide/initrd.html initrd]<br />
* Wikipedia article on [[wikipedia:initrd|initrd]]</div>Pdchttps://wiki.archlinux.org/index.php?title=Pacman/Tips_and_tricks&diff=691729Pacman/Tips and tricks2021-08-14T14:08:42Z<p>Pdc: /* Read-only cache */ Add note that pacman will stop using the server after 3 failures</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Package manager]]<br />
[[de:Pacman-Tipps]]<br />
[[es:Pacman (Español)/Tips and tricks]]<br />
[[fa:Pacman tips]]<br />
[[fr:Pacman (Français)/Tips and tricks]]<br />
[[it:Pacman (Italiano)/Tips and tricks]]<br />
[[ja:Pacman ヒント]]<br />
[[pt:Pacman (Português)/Tips and tricks]]<br />
[[ru:Pacman (Русский)/Tips and tricks]]<br />
[[zh-hans:Pacman (简体中文)/Tips and tricks]]<br />
{{Related articles start}}<br />
{{Related|Mirrors}}<br />
{{Related|Creating packages}}<br />
{{Related articles end}}<br />
For general methods to improve the flexibility of the provided tips or ''pacman'' itself, see [[Core utilities]] and [[Bash]].<br />
<br />
== Maintenance ==<br />
<br />
{{Expansion|{{ic|1=Usage=}} introduced with ''pacman'' 4.2, see [http://allanmcrae.com/2014/12/pacman-4-2-released/]}}<br />
<br />
{{Note|Instead of using ''comm'' (which requires sorted input with ''sort'') in the sections below, you may also use {{ic|grep -Fxf}} or {{ic|grep -Fxvf}}.}}<br />
<br />
See also [[System maintenance]].<br />
<br />
=== Listing packages ===<br />
<br />
==== With version ====<br />
<br />
You may want to get the list of installed packages with their version, which is useful when reporting bugs or discussing installed packages.<br />
<br />
* List all explicitly installed packages: {{ic|pacman -Qe}}.<br />
* List all packages in the [[package group]] named {{ic|''group''}}: {{ic|pacman -Sg ''group''}}<br />
* List all foreign packages (typically manually downloaded and installed or packages removed from the repositories): {{ic|pacman -Qm}}.<br />
* List all native packages (installed from the sync database(s)): {{ic|pacman -Qn}}.<br />
* List all explicitly installed native packages (i.e. present in the sync database) that are not direct or optional dependencies: {{ic|pacman -Qent}}.<br />
* List packages by regex: {{ic|pacman -Qs ''regex''}}.<br />
* List packages by regex with custom output format (needs {{Pkg|expac}}): {{ic|expac -s "%-30n %v" ''regex''}}.<br />
<br />
==== With size ====<br />
<br />
Figuring out which packages are largest can be useful when trying to free space on your hard drive. There are two options here: get the size of individual packages, or get the size of packages and their dependencies.<br />
<br />
===== Individual packages =====<br />
<br />
The following command will list all installed packages and their individual sizes:<br />
<br />
$ LC_ALL=C pacman -Qi | awk '/^Name/{name=$3} /^Installed Size/{print $4$5, name}' | sort -h<br />
<br />
===== Packages and dependencies =====<br />
<br />
To list package sizes with their dependencies,<br />
<br />
* Install {{Pkg|expac}} and run {{ic|expac -H M '%m\t%n' {{!}} sort -h}}.<br />
* Run {{Pkg|pacgraph}} with the {{ic|-c}} option.<br />
<br />
To list the download size of several packages (leave {{ic|''packages''}} blank to list all packages):<br />
<br />
$ expac -S -H M '%k\t%n' ''packages''<br />
<br />
To list explicitly installed packages not in the [[meta package]] {{Pkg|base}} nor [[package group]] {{Grp|base-devel}} with size and description:<br />
<br />
$ expac -H M "%011m\t%-20n\t%10d" $(comm -23 <(pacman -Qqen | sort) <({ pacman -Qqg base-devel; expac -l '\n' '%E' base; } | sort | uniq)) | sort -n<br />
<br />
To list the packages marked for upgrade with their download size<br />
<br />
$ expac -S -H M '%k\t%n' $(pacman -Qqu) | sort -sh<br />
<br />
==== By date ====<br />
<br />
To list the 20 last installed packages with {{Pkg|expac}}, run:<br />
<br />
$ expac --timefmt='%Y-%m-%d %T' '%l\t%n' | sort | tail -n 20<br />
<br />
or, with seconds since the epoch (1970-01-01 UTC):<br />
<br />
$ expac --timefmt=%s '%l\t%n' | sort -n | tail -n 20<br />
<br />
==== Not in a specified group, repository or meta package ====<br />
<br />
{{Note|To get a list of packages installed as dependencies but no longer required by any installed package, see [[#Removing unused packages (orphans)]].<br />
}}<br />
<br />
List explicitly installed packages not in the {{Pkg|base}} [[meta package]]:<br />
<br />
$ comm -23 <(pacman -Qqe | sort) <(expac -l '\n' '%E' base | sort)<br />
<br />
List explicitly installed packages not in the {{Pkg|base}} meta package or {{Grp|base-devel}} [[package group]]:<br />
<br />
$ comm -23 <(pacman -Qqe | sort) <({ pacman -Qqg base-devel; expac -l '\n' '%E' base; } | sort -u)<br />
<br />
List all installed packages unrequired by other packages, and which are not in the {{Pkg|base}} meta package or {{Grp|base-devel}} package group:<br />
<br />
$ comm -23 <(pacman -Qqt | sort) <({ pacman -Qqg base-devel; expac -l '\n' '%E' base; } | sort -u)<br />
<br />
As above, but with descriptions:<br />
<br />
$ expac -H M '%-20n\t%10d' $(comm -23 <(pacman -Qqt | sort) <({ pacman -Qqg base-devel; expac -l '\n' '%E' base; } | sort -u))<br />
<br />
List all installed packages that are ''not'' in the specified repository ''repo_name''<br />
<br />
$ comm -23 <(pacman -Qq | sort) <(pacman -Sql ''repo_name'' | sort)<br />
<br />
List all installed packages that are in the ''repo_name'' repository:<br />
<br />
$ comm -12 <(pacman -Qq | sort) <(pacman -Sql ''repo_name'' | sort)<br />
<br />
List all packages on the Arch Linux ISO that are not in the {{Pkg|base}} meta package:<br />
<br />
<nowiki>$ comm -23 <(curl https://gitlab.archlinux.org/archlinux/archiso/-/raw/master/configs/releng/packages.x86_64) <(expac -l '\n' '%E' base | sort)</nowiki><br />
<br />
{{Tip|Alternatively, use {{ic|combine}} (instead of {{ic|comm}}) from the {{Pkg|moreutils}} package which has a syntax that is easier to remember. See {{man|1|combine}}.}}<br />
<br />
==== Development packages ====<br />
<br />
To list all development/unstable packages, run:<br />
<br />
$ pacman -Qq | grep -Ee '-(bzr|cvs|darcs|git|hg|svn)$'<br />
<br />
=== Browsing packages ===<br />
<br />
To browse all installed packages with an instant preview of each package:<br />
<br />
$ pacman -Qq | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)'<br />
<br />
This uses [[fzf]] to present a two-pane view listing all packages with package info shown on the right.<br />
<br />
Enter letters to filter the list of packages; use arrow keys (or {{ic|Ctrl-j}}/{{ic|Ctrl-k}}) to navigate; press {{ic|Enter}} to see package info under ''less''.<br />
<br />
To browse all packages currently known to ''pacman'' (both installed and not yet installed) in a similar way, using fzf, use:<br />
<br />
$ pacman -Slq | fzf --preview 'pacman -Si {}' --layout=reverse<br />
<br />
The navigational keybindings are the same, although Enter will not work in the same way.<br />
<br />
=== Listing files owned by a package with size ===<br />
<br />
This one might come in handy if you have found that a specific package uses a huge amount of space and you want to find out which files make up the most of that.<br />
<br />
$ pacman -Qlq ''package'' | grep -v '/$' | xargs -r du -h | sort -h<br />
<br />
=== Identify files not owned by any package ===<br />
<br />
If your system has stray files not owned by any package (a common case if you do not [[Enhance system stability#Use the package manager to install software|use the package manager to install software]]), you may want to find such files in order to clean them up.<br />
<br />
One method is to use {{ic|pacreport --unowned-files}} as the root user from {{Pkg|pacutils}} which will list unowned files among other details.<br />
<br />
Another is to list all files of interest and check them against ''pacman'':<br />
<br />
# find /etc /usr /opt | LC_ALL=C pacman -Qqo - 2>&1 >&- >/dev/null | cut -d ' ' -f 5-<br />
<br />
{{Tip|The {{Pkg|lostfiles}} script performs similar steps, but also includes an extensive blacklist to remove common false positives from the output.}}<br />
<br />
=== Tracking unowned files created by packages ===<br />
<br />
Most systems will slowly collect several [http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html#S3-RPM-INSIDE-FLIST-GHOST-DIRECTIVE ghost] files such as state files, logs, indexes, etc. through the course of usual operation.<br />
<br />
{{ic|pacreport}} from {{Pkg|pacutils}} can be used to track these files and their associations via {{ic|/etc/pacreport.conf}} (see {{man|1|pacreport|FILES}}).<br />
<br />
An example may look something like this (abridged):<br />
<br />
{{hc|/etc/pacreport.conf|2=<br />
[Options]<br />
IgnoreUnowned = usr/share/applications/mimeinfo.cache<br />
<br />
[PkgIgnoreUnowned]<br />
alsa-utils = var/lib/alsa/asound.state<br />
bluez = var/lib/bluetooth<br />
ca-certificates = etc/ca-certificates/trust-source/*<br />
dbus = var/lib/dbus/machine-id<br />
glibc = etc/ld.so.cache<br />
grub = boot/grub/*<br />
linux = boot/initramfs-linux.img<br />
pacman = var/lib/pacman/local<br />
update-mime-database = usr/share/mime/magic<br />
}}<br />
<br />
Then, when using {{ic|pacreport --unowned-files}} as the root user, any unowned files will be listed if the associated package is no longer installed (or if any new files have been created).<br />
<br />
Additionally, [https://github.com/CyberShadow/aconfmgr aconfmgr] ({{AUR|aconfmgr-git}}) allows tracking modified and orphaned files using a configuration script.<br />
<br />
=== Removing unused packages (orphans) ===<br />
<br />
For recursively removing orphans and their configuration files:<br />
<br />
# pacman -Qtdq | pacman -Rns -<br />
<br />
If no orphans were found, the output is {{ic|error: argument '-' specified with empty stdin}}. This is expected as no arguments were passed to {{ic|pacman -Rns}}.<br />
<br />
{{Note|The arguments {{ic|-Qt}} list only true orphans. To include packages which are ''optionally'' required by another package, pass the {{ic|-t}} flag twice (''i.e.'', {{ic|-Qtt}}).}}<br />
<br />
=== Removing everything but essential packages ===<br />
<br />
If it is ever necessary to remove all packages except the essentials packages, one method is to set the installation reason of the non-essential ones as dependency and then remove all unnecessary dependencies.<br />
<br />
First, for all the packages installed "as explicitly", change their installation reason to "as dependency":<br />
<br />
# pacman -D --asdeps $(pacman -Qqe)<br />
<br />
Then, change the installation reason to "as explicitly" of only the essential packages, those you '''do not''' want to remove, in order to avoid targeting them:<br />
<br />
# pacman -D --asexplicit base linux linux-firmware<br />
<br />
{{Note|<br />
* Additional packages can be added to the above command in order to avoid being removed. See [[Installation guide#Install essential packages]] for more info on other packages that may be necessary for a fully functional base system.<br />
* This will also select the bootloader's package for removal. The system should still be bootable, but the boot parameters might not be changeable without it.<br />
}}<br />
<br />
Finally, follow the instructions in [[#Removing unused packages (orphans)]] to remove all packages that have installation reason "as dependency".<br />
<br />
=== Getting the dependencies list of several packages ===<br />
<br />
Dependencies are alphabetically sorted and doubles are removed.<br />
<br />
{{Note|To only show the tree of local installed packages, use {{ic|pacman -Qi}}.}}<br />
<br />
$ LC_ALL=C pacman -Si ''packages'' | awk -F'[:<=>]' '/^Depends/ {print $2}' | xargs -n1 | sort -u<br />
<br />
Alternatively, with {{Pkg|expac}}: <br />
<br />
$ expac -l '\n' %E -S ''packages'' | sort -u<br />
<br />
=== Listing changed backup files ===<br />
<br />
{{Accuracy|What is the connection of this section to [[System backup]]? Listing modified "backup files" does not show files which are not tracked by ''pacman''.|section=Warning about listing changed backup files}}<br />
<br />
If you want to back up your system configuration files, you could copy all files in {{ic|/etc/}} but usually you are only interested in the files that you have changed. Modified [[Pacnew and Pacsave files#Package backup files|backup files]] can be viewed with the following command:<br />
<br />
# pacman -Qii | awk '/^MODIFIED/ {print $2}'<br />
<br />
Running this command with root permissions will ensure that files readable only by root (such as {{ic|/etc/sudoers}}) are included in the output.<br />
<br />
{{Tip|See [[#Listing all changed files from packages]] to list all changed files ''pacman'' knows about, not only backup files.}}<br />
<br />
=== Back up the pacman database ===<br />
<br />
The following command can be used to back up the local ''pacman'' database:<br />
<br />
$ tar -cjf pacman_database.tar.bz2 /var/lib/pacman/local<br />
<br />
Store the backup ''pacman'' database file on one or more offline media, such as a USB stick, external hard drive, or CD-R.<br />
<br />
The database can be restored by moving the {{ic|pacman_database.tar.bz2}} file into the {{ic|/}} directory and executing the following command:<br />
<br />
# tar -xjvf pacman_database.tar.bz2<br />
<br />
{{Note|If the ''pacman'' database files are corrupted, and there is no backup file available, there exists some hope of rebuilding the ''pacman'' database. Consult [[#Restore pacman's local database]].}}<br />
<br />
{{Tip|The {{AUR|pakbak-git}} package provides a script and a [[systemd]] service to automate the task. Configuration is possible in {{ic|/etc/pakbak.conf}}.}}<br />
<br />
=== Check changelogs easily ===<br />
<br />
When maintainers update packages, commits are often commented in a useful fashion. Users can quickly check these from the command line by installing {{AUR|pacolog}}. This utility lists recent commit messages for packages from the official repositories or the AUR, by using {{ic|pacolog <package>}}.<br />
<br />
== Installation and recovery ==<br />
<br />
Alternative ways of getting and restoring packages.<br />
<br />
=== Installing packages from a CD/DVD or USB stick ===<br />
<br />
{{Merge|#Custom local repository|Use as an example and avoid duplication}}<br />
<br />
To download packages, or groups of packages:<br />
<br />
# cd ~/Packages<br />
# pacman -Syw --cachedir . base base-devel grub-bios xorg gimp<br />
# repo-add ./custom.db.tar.gz ./*<br />
<br />
Pacman, which will reference the host installation by default, will not properly resolve and download existing dependencies. In cases where all packages and dependencies are wanted, it is recommended to create a temporary blank DB and reference it with {{ic|--dbpath}}:<br />
<br />
# mkdir /tmp/blankdb<br />
# pacman -Syw --cachedir . --dbpath /tmp/blankdb base base-devel grub-bios xorg gimp<br />
# repo-add ./custom.db.tar.gz ./*<br />
<br />
Then you can burn the "Packages" folder to a CD/DVD or transfer it to a USB stick, external HDD, etc.<br />
<br />
To install:<br />
<br />
'''1.''' Mount the media:<br />
<br />
# mkdir /mnt/repo<br />
# mount /dev/sr0 /mnt/repo #For a CD/DVD.<br />
# mount /dev/sdxY /mnt/repo #For a USB stick.<br />
<br />
'''2.''' Edit {{ic|pacman.conf}} and add this repository ''before'' the other ones (e.g. extra, core, etc.). This is important. Do not just uncomment the one on the bottom. This way it ensures that the files from the CD/DVD/USB take precedence over those in the standard repositories:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
[custom]<br />
SigLevel = PackageRequired<br />
Server = file:///mnt/repo/Packages}}<br />
<br />
'''3.''' Finally, synchronize the ''pacman'' database to be able to use the new repository:<br />
<br />
# pacman -Syu<br />
<br />
=== Custom local repository ===<br />
<br />
Use the ''repo-add'' script included with ''pacman'' to generate a database for a personal repository. Use {{ic|repo-add --help}} for more details on its usage. <br />
A package database is a tar file, optionally compressed. Valid extensions are ''.db'' or ''.files'' followed by an archive extension of ''.tar'', ''.tar.gz'', ''.tar.bz2'', ''.tar.xz'', ''.tar.zst'', or ''.tar.Z''. The file does not need to exist, but all parent directories must exist.<br />
<br />
To add a new package to the database, or to replace the old version of an existing package in the database, run:<br />
<br />
$ repo-add ''/path/to/repo.db.tar.gz /path/to/package-1.0-1-x86_64.pkg.tar.xz''<br />
<br />
The database and the packages do not need to be in the same directory when using ''repo-add'', but keep in mind that when using ''pacman'' with that database, they should be together. Storing all the built packages to be included in the repository in one directory also allows to use shell glob expansion to add or update multiple packages at once:<br />
<br />
$ repo-add ''/path/to/repo.db.tar.gz /path/to/*.pkg.tar.xz''<br />
<br />
{{Warning|''repo-add'' adds the entries into the database in the same order as passed on the command line. If multiple versions of the same package are involved, care must be taken to ensure that the correct version is added last. In particular, note that lexical order used by the shell depends on the locale and differs from the {{man|8|vercmp}} ordering used by ''pacman''.}}<br />
<br />
If you are looking to support multiple architectures then precautions should be taken to prevent errors from occurring. Each architecture should have its own directory tree:<br />
<br />
{{hc|$ tree ~/customrepo/ {{!}} sed "s/$(uname -m)/<arch>/g"|<br />
/home/archie/customrepo/<br />
└── <arch><br />
├── customrepo.db -> customrepo.db.tar.xz<br />
├── customrepo.db.tar.xz<br />
├── customrepo.files -> customrepo.files.tar.xz<br />
├── customrepo.files.tar.xz<br />
└── personal-website-git-b99cce0-1-<arch>.pkg.tar.xz<br />
<br />
1 directory, 5 files<br />
}}<br />
<br />
The ''repo-add'' executable checks if the package is appropriate. If this is not the case you will be running into error messages similar to this:<br />
<br />
==> ERROR: '/home/archie/customrepo/<arch>/foo-<arch>.pkg.tar.xz' does not have a valid database archive extension.<br />
<br />
''repo-remove'' is used to remove packages from the package database, except that only package names are specified on the command line.<br />
<br />
$ repo-remove ''/path/to/repo.db.tar.gz pkgname''<br />
<br />
Once the local repository database has been created, add the repository to {{ic|pacman.conf}} for each system that is to use the repository. An example of a custom repository is in {{ic|pacman.conf}}. The repository's name is the database filename with the file extension omitted. In the case of the example above the repository's name would simply be ''repo''. Reference the repository's location using a {{ic|file://}} url, or via FTP using ftp://localhost/path/to/directory.<br />
<br />
If willing, add the custom repository to the [[Unofficial user repositories|list of unofficial user repositories]], so that the community can benefit from it.<br />
<br />
=== Network shared pacman cache ===<br />
<br />
{{Merge|Package_Proxy_Cache|Same topic}}<br />
If you happen to run several Arch boxes on your LAN, you can share packages so that you can greatly decrease your download times. Keep in mind you should not share between different architectures (i.e. i686 and x86_64) or you will run into problems.<br />
<br />
==== Read-only cache ====<br />
<br />
{{Note|1=If pacman fails to download 3 packages from the server, it will use another mirror instead. See https://bbs.archlinux.org/viewtopic.php?id=268066}}<br />
<br />
If you are looking for a quick solution, you can simply run a standalone webserver, e.g. {{Pkg|darkhttpd}}, which other computers can use as a first mirror:<br />
<br />
# ln -s /var/lib/pacman/sync/*.db /var/cache/pacman/pkg<br />
$ sudo -u http darkhttpd /var/cache/pacman/pkg --no-server-id<br />
<br />
You could also run darkhttpd as a systemd service for convenience. Just add this server at the top of your {{ic|/etc/pacman.d/mirrorlist}} in client machines with {{ic|1=Server = http&#58;//mymirror:8080}}. Make sure to keep your mirror updated.<br />
<br />
If you are already running a web server for some other purpose, you might wish to reuse that as your local repo server instead of darkhttpd. For example, if you already serve a site with [[nginx]], you can add an nginx server block listening on port 8080:<br />
<br />
{{hc|/etc/nginx/nginx.conf|<br />
server {<br />
listen 8080;<br />
root /var/cache/pacman/pkg;<br />
server_name myarchrepo.localdomain;<br />
try_files $uri $uri/;<br />
}<br />
}}<br />
<br />
Remember to restart nginx after making this change.<br />
<br />
Whichever web server you use, remember to open port 8080 to local traffic (and you probably want to deny anything not local). For example, if using [[iptables]], add {{ic|-s 192.168.0.0/16 -p tcp --dport 8080 -j ACCEPT}} to your ruleset (adjust for your LAN subnet if necessary).<br />
<br />
==== Overlay mount of read-only cache ====<br />
<br />
It is possible to use one machine on a local network as a read-only package cache by [[Overlay_filesystem|overlay mounting]] its {{ic|/var/cache/pacman/pkg}} directory. Such a configuration is advantageous if this server has installed on it a reasonably comprehensive selection of up-to-date packages which are also used by other boxes. This is useful for maintaining a number of machines at the end of a low bandwidth upstream connection.<br />
<br />
As an example, to use this method:<br />
<br />
# mkdir /tmp/remote_pkg /mnt/workdir_pkg /tmp/pacman_pkg<br />
# sshfs <remote_username>@<remote_pkgcache_addr>:/var/cache/pacman/pkg /tmp/remote_pkg -C<br />
# mount -t overlay overlay -o lowerdir=/tmp/remote_pkg,upperdir=/var/cache/pacman/pkg,workdir=/mnt/workdir_pkg /tmp/pacman_pkg<br />
<br />
[[Overlay_filesystem#Usage|Note concerning overlay]]: The working directory must be an empty directory on the same mounted device as the upper directory.<br />
<br />
After this, run ''pacman'' using the option {{ic|--cachedir /tmp/pacman_pkg}}, e.g.:<br />
<br />
# pacman -Syu --cachedir /tmp/pacman_pkg<br />
<br />
==== Distributed read-only cache ====<br />
<br />
There are Arch-specific tools for automatically discovering other computers on your network offering a package cache. Try {{Pkg|pacredir}}, [[pacserve]], {{AUR|pkgdistcache}}, or {{AUR|paclan}}. pkgdistcache uses Avahi instead of plain UDP which may work better in certain home networks that route instead of bridge between WiFi and Ethernet.<br />
<br />
Historically, there was [https://bbs.archlinux.org/viewtopic.php?id=64391 PkgD] and [https://github.com/toofishes/multipkg multipkg], but they are no longer maintained.<br />
<br />
==== Read-write cache ====<br />
<br />
In order to share packages between multiple computers, simply share {{ic|/var/cache/pacman/}} using any network-based mount protocol. This section shows how to use [[shfs]] or [[SSHFS]] to share a package cache plus the related library-directories between multiple computers on the same local network. Keep in mind that a network shared cache can be slow depending on the file-system choice, among other factors.<br />
<br />
First, install any network-supporting filesystem packages: {{Pkg|shfs-utils}}, {{Pkg|sshfs}}, {{Pkg|curlftpfs}}, {{Pkg|samba}} or {{Pkg|nfs-utils}}.<br />
<br />
{{Tip|<br />
* To use ''sshfs'' or ''shfs'', consider reading [[Using SSH Keys]].<br />
* By default, ''smbfs'' does not serve filenames that contain colons, which results in the client downloading the offending package afresh. To prevent this, use the {{ic|mapchars}} mount option on the client.<br />
}}<br />
<br />
Then, to share the actual packages, mount {{ic|/var/cache/pacman/pkg}} from the server to {{ic|/var/cache/pacman/pkg}} on every client machine.<br />
<br />
{{Warning|Do not make {{ic|/var/cache/pacman/pkg}} or any of its ancestors (e.g., {{ic|/var}}) a symlink. Pacman expects these to be directories. When ''pacman'' re-installs or upgrades itself, it will remove the symlinks and create empty directories instead. However during the transaction ''pacman'' relies on some files residing there, hence breaking the update process. Refer to {{Bug|50298}} for further details.}}<br />
<br />
==== two-way with rsync ====<br />
<br />
Another approach in a local environment is [[rsync]]. Choose a server for caching and enable the [[Rsync#rsync daemon]]. On clients synchronize two-way with this share via the rsync protocol. Filenames that contain colons are no problem for the rsync protocol.<br />
<br />
Draft example for a client, using {{ic|uname -m}} within the share name ensures an architecture-dependent sync:<br />
# rsync rsync://server/share_$(uname -m)/ /var/cache/pacman/pkg/ ...<br />
# pacman ...<br />
# paccache ...<br />
# rsync /var/cache/pacman/pkg/ rsync://server/share_$(uname -m)/ ...<br />
<br />
==== Dynamic reverse proxy cache using nginx ====<br />
<br />
[[nginx]] can be used to proxy package requests to official upstream mirrors and cache the results to the local disk. All subsequent requests for that package will be served directly from the local cache, minimizing the amount of internet traffic needed to update a large number of computers. <br />
<br />
In this example, the cache server will run at {{ic|<nowiki>http://cache.domain.example:8080/</nowiki>}} and store the packages in {{ic|/srv/http/pacman-cache/}}. <br />
<br />
Install [[nginx]] on the computer that is going to host the cache. Create the directory for the cache and adjust the permissions so nginx can write files to it:<br />
<br />
# mkdir /srv/http/pacman-cache<br />
# chown http:http /srv/http/pacman-cache<br />
<br />
Use the [https://github.com/nastasie-octavian/nginx_pacman_cache_config/blob/c54eca4776ff162ab492117b80be4df95880d0e2/nginx.conf nginx pacman cache config] as a starting point for {{ic|/etc/nginx/nginx.conf}}. Check that the {{ic|resolver}} directive works for your needs. In the upstream server blocks, configure the {{ic|proxy_pass}} directives with addresses of official mirrors, see examples in the config file about the expected format. Once you are satisfied with the configuration file [[Nginx#Running|start and enable nginx]].<br />
<br />
In order to use the cache each Arch Linux computer (including the one hosting the cache) must have the following line at the top of the {{ic|mirrorlist}} file:<br />
<br />
{{hc|/etc/pacman.d/mirrorlist|<nowiki><br />
Server = http://cache.domain.example:8080/$repo/os/$arch<br />
...<br />
</nowiki>}}<br />
<br />
{{Note| You will need to create a method to clear old packages, as the cache directory will continue to grow over time. {{ic|paccache}} (which is provided by {{Pkg|pacman-contrib}}) can be used to automate this using retention criteria of your choosing. For example, {{ic|find /srv/http/pacman-cache/ -type d -exec paccache -v -r -k 2 -c {} \;}} will keep the last 2 versions of packages in your cache directory.}}<br />
<br />
==== Pacoloco proxy cache server ====<br />
<br />
[https://github.com/anatol/pacoloco Pacoloco] is an easy-to-use proxy cache server for ''pacman'' repositories. It can be installed as {{Pkg|pacoloco}}. Open the configuration file and add ''pacman'' mirrors:<br />
<br />
{{hc|/etc/pacoloco.yaml|<nowiki><br />
port: 9129<br />
repos:<br />
mycopy:<br />
urls:<br />
- http://mirror.lty.me/archlinux<br />
- http://mirrors.kernel.org/archlinux<br />
</nowiki>}}<br />
<br />
[[Restart]] {{ic|pacoloco.service}} and the proxy repository will be available at {{ic|http://<myserver>:9129/repo/mycopy}}.<br />
<br />
==== Flexo proxy cache server ====<br />
<br />
[https://github.com/nroi/flexo Flexo] is yet another proxy cache server for ''pacman'' repositories. Flexo is available as {{AUR|flexo-git}}. Once installed, [[start]] the {{ic|flexo.service}} unit.<br />
<br />
Flexo runs on port {{ic|7878}} by default. Enter {{ic|1=Server = http://''myserver'':7878/$repo/os/$arch}} to the top of your {{ic|/etc/pacman.d/mirrorlist}} so that ''pacman'' downloads packages via Flexo.<br />
<br />
==== Synchronize pacman package cache using synchronization programs ====<br />
<br />
Use [[Syncthing]] or [[Resilio Sync]] to synchronize the ''pacman'' cache folders (i.e. {{ic|/var/cache/pacman/pkg}}).<br />
<br />
==== Preventing unwanted cache purges ====<br />
<br />
By default, {{ic|pacman -Sc}} removes package tarballs from the cache that correspond to packages that are not installed on the machine the command was issued on. Because ''pacman'' cannot predict what packages are installed on all machines that share the cache, it will end up deleting files that should not be.<br />
<br />
To clean up the cache so that only ''outdated'' tarballs are deleted, add this entry in the {{ic|[options]}} section of {{ic|/etc/pacman.conf}}:<br />
<br />
CleanMethod = KeepCurrent<br />
<br />
=== Recreate a package from the file system ===<br />
<br />
To recreate a package from the file system, use {{AUR|fakepkg}}. Files from the system are taken as they are, hence any modifications will be present in the assembled package. Distributing the recreated package is therefore discouraged; see [[ABS]] and [[Arch Linux Archive]] for alternatives.<br />
<br />
=== List of installed packages ===<br />
<br />
Keeping a list of all the explicitly installed packages can be useful, to backup a system for example or speed up installation on a new system:<br />
<br />
$ pacman -Qqe > pkglist.txt<br />
<br />
{{Note|<br />
* With option {{ic|-t}}, the packages already required by other explicitly installed packages are not mentioned. If reinstalling from this list they will be installed but as dependencies only.<br />
* With option {{ic|-n}}, foreign packages (e.g. from [[AUR]]) would be omitted from the list.<br />
* Use {{ic|comm -13 <(pacman -Qqdt {{!}} sort) <(pacman -Qqdtt {{!}} sort) > optdeplist.txt}} to also create a list of the installed optional dependencies which can be reinstalled with {{ic|--asdeps}}.<br />
* Use {{ic|pacman -Qqem > foreignpkglist.txt}} to create the list of AUR and other foreign packages that have been explicitly installed.}}<br />
<br />
To keep an up-to-date list of explicitly installed packages (e.g. in combination with a versioned {{ic|/etc/}}), you can set up a [[Pacman#Hooks|hook]]. Example:<br />
<br />
[Trigger]<br />
Operation = Install<br />
Operation = Remove<br />
Type = Package<br />
Target = *<br />
<br />
[Action]<br />
When = PostTransaction<br />
Exec = /bin/sh -c '/usr/bin/pacman -Qqe > /etc/pkglist.txt'<br />
<br />
=== Install packages from a list ===<br />
<br />
To install packages from a previously saved list of packages, while not reinstalling previously installed packages that are already up-to-date, run:<br />
<br />
# pacman -S --needed - < pkglist.txt<br />
<br />
However, it is likely foreign packages such as from the AUR or installed locally are present in the list. To filter out from the list the foreign packages, the previous command line can be enriched as follows:<br />
<br />
# pacman -S --needed $(comm -12 <(pacman -Slq | sort) <(sort pkglist.txt))<br />
<br />
Eventually, to make sure the installed packages of your system match the list and remove all the packages that are not mentioned in it:<br />
<br />
# pacman -Rsu $(comm -23 <(pacman -Qq | sort) <(sort pkglist.txt))<br />
<br />
{{Tip|These tasks can be automated. See {{AUR|bacpac}}, {{AUR|packup}}, {{AUR|pacmanity}}, and {{AUR|pug}} for examples.}}<br />
<br />
=== Listing all changed files from packages ===<br />
<br />
If you are suspecting file corruption (e.g. by software/hardware failure), but are unsure if files were corrupted, you might want to compare with the hash sums in the packages. This can be done with {{Pkg|pacutils}}:<br />
<br />
# paccheck --md5sum --quiet<br />
<br />
For recovery of the database see [[#Restore pacman's local database]]. The {{ic|mtree}} files can also be [[#Viewing a single file inside a .pkg file|extracted as {{ic|.MTREE}} from the respective package files]].<br />
<br />
{{Note|This should '''not''' be used as is when suspecting malicious changes! In this case security precautions such as using a live medium and an independent source for the hash sums are advised.}}<br />
<br />
=== Reinstalling all packages ===<br />
<br />
To reinstall all native packages, use:<br />
<br />
# pacman -Qqn | pacman -S -<br />
<br />
Foreign (AUR) packages must be reinstalled separately; you can list them with {{ic|pacman -Qqm}}.<br />
<br />
Pacman preserves the [[installation reason]] by default.<br />
<br />
{{Warning|To force all packages to be overwritten, use {{ic|1=--overwrite=*}}, though this should be an absolute last resort. See [[System maintenance#Avoid certain pacman commands]].}}<br />
<br />
=== Restore pacman's local database ===<br />
<br />
See [[pacman/Restore local database]].<br />
<br />
=== Recovering a USB key from existing install ===<br />
<br />
If you have Arch installed on a USB key and manage to mess it up (e.g. removing it while it is still being written to), then it is possible to re-install all the packages and hopefully get it back up and working again (assuming USB key is mounted in {{ic|/newarch}})<br />
<br />
# pacman -S $(pacman -Qq --dbpath /newarch/var/lib/pacman) --root /newarch --dbpath /newarch/var/lib/pacman<br />
<br />
=== Viewing a single file inside a .pkg file ===<br />
<br />
For example, if you want to see the contents of {{ic|/etc/systemd/logind.conf}} supplied within the {{Pkg|systemd}} package:<br />
<br />
$ bsdtar -xOf /var/cache/pacman/pkg/systemd-204-3-x86_64.pkg.tar.xz etc/systemd/logind.conf<br />
<br />
Or you can use {{Pkg|vim}} to browse the archive:<br />
<br />
$ vim /var/cache/pacman/pkg/systemd-204-3-x86_64.pkg.tar.xz<br />
<br />
=== Find applications that use libraries from older packages ===<br />
<br />
Even if you installed a package the existing long-running programs (like daemons and servers) still keep using code from old package libraries. And it is a bad idea to let these programs running if the old library contains a security bug.<br />
<br />
Here is a way how to find all the programs that use old packages code:<br />
<br />
# lsof +c 0 | grep -w DEL | awk '1 { print $1 ": " $NF }' | sort -u<br />
It will print running program name and old library that was removed or replaced with newer content.<br />
<br />
=== Installing only content in required languages ===<br />
<br />
Many packages attempt to install documentation and translations in several languages. Some programs are designed to remove such unnecessary files, such as {{AUR|localepurge}}, which runs after a package is installed to delete the unneeded locale files. A more direct approach is provided through the {{ic|NoExtract}} directive in {{ic|pacman.conf}}, which prevent these files from ever being installed.<br />
<br />
{{Warning|1=Some users noted that removing locales has resulted in [[Special:Permalink/460285#Dangerous NoExtract example|unintended consequences]], even under [https://bbs.archlinux.org/viewtopic.php?id=250846 Xorg].}}<br />
<br />
The example below installs English (US) files, or none at all:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
NoExtract = usr/share/help/* !usr/share/help/C/*<br />
NoExtract = usr/share/gtk-doc/html/*<br />
NoExtract = usr/share/locale/* usr/share/X11/locale/*/* usr/share/i18n/locales/* opt/google/chrome/locales/* !usr/share/X11/locale/C/*<br />
NoExtract = !*locale*/en*/* !usr/share/*locale*/locale.*<br />
NoExtract = !usr/share/*locales/en_?? !usr/share/*locales/i18n* !usr/share/*locales/iso*<br />
NoExtract = usr/share/i18n/charmaps/* !usr/share/i18n/charmaps/UTF-8.gz<br />
NoExtract = !usr/share/*locales/trans*<br />
NoExtract = usr/share/man/* !usr/share/man/man*<br />
NoExtract = usr/share/vim/vim*/lang/*<br />
NoExtract = usr/lib/libreoffice/help/en-US/*<br />
NoExtract = usr/share/kbd/locale/*<br />
NoExtract = usr/share/*/translations/*.qm usr/share/qt/translations/*.pak !*/en-US.pak # Qt apps<br />
NoExtract = usr/share/*/locales/*.pak opt/*/locales/*.pak usr/lib/*/locales/*.pak !*/en-US.pak # Electron apps<br />
NoExtract = opt/onlyoffice/desktopeditors/dictionaries/* !opt/onlyoffice/desktopeditors/dictionaries/en_US/*<br />
NoExtract = opt/onlyoffice/desktopeditors/editors/web-apps/apps/*/main/locale/* !*/en.json<br />
NoExtract = opt/onlyoffice/desktopeditors/editors/web-apps/apps/*/main/resources/help/* !*/help/en/*<br />
NoExtract = opt/onlyoffice/desktopeditors/converter/empty/*/*<br />
NoExtract = usr/share/ibus/dicts/emoji-*.dict !usr/share/ibus/dicts/emoji-en.dict<br />
}}<br />
<br />
== Performance ==<br />
<br />
=== Download speeds ===<br />
<br />
{{Note|If your download speeds have been reduced to a crawl, ensure you are using one of the many [[mirrors]] and not ftp.archlinux.org, which is [https://archlinux.org/news/302/ throttled since March 2007].}}<br />
<br />
When downloading packages ''pacman'' uses the mirrors in the order they are in {{ic|/etc/pacman.d/mirrorlist}}. The mirror which is at the top of the list by default however may not be the fastest for you. To select a faster mirror, see [[Mirrors]].<br />
<br />
Pacman's speed in downloading packages can also be improved by using a different application to download packages, instead of ''pacman''<nowiki/>'s built-in file downloader, or by [[pacman#Enabling parallel downloads|enabling parallel downloads]].<br />
<br />
In all cases, make sure you have the latest ''pacman'' before doing any modifications.<br />
<br />
# pacman -Syu<br />
<br />
==== Powerpill ====<br />
<br />
[[Powerpill]] is a ''pacman'' wrapper that uses parallel and segmented downloading to try to speed up downloads for ''pacman''.<br />
<br />
==== wget ====<br />
<br />
This is also very handy if you need more powerful proxy settings than ''pacman''<nowiki/>'s built-in capabilities. <br />
<br />
To use {{ic|wget}}, first [[install]] the {{Pkg|wget}} package then modify {{ic|/etc/pacman.conf}} by uncommenting the following line in the {{ic|[options]}} section:<br />
<br />
XferCommand = /usr/bin/wget --passive-ftp --show-progress -c -q -N %u<br />
<br />
Instead of uncommenting the {{ic|wget}} parameters in {{ic|/etc/pacman.conf}}, you can also modify the {{ic|wget}} configuration file directly (the system-wide file is {{ic|/etc/wgetrc}}, per user files are {{ic|$HOME/.wgetrc}}).<br />
<br />
==== aria2 ====<br />
<br />
[[aria2]] is a lightweight download utility with support for resumable and segmented HTTP/HTTPS and FTP downloads. aria2 allows for multiple and simultaneous HTTP/HTTPS and FTP connections to an Arch mirror, which should result in an increase in download speeds for both file and package retrieval.<br />
<br />
{{Note|Using aria2c in ''pacman''<nowiki/>'s XferCommand will '''not''' result in parallel downloads of multiple packages. Pacman invokes the XferCommand with a single package at a time and waits for it to complete before invoking the next. To download multiple packages in parallel, see [[Powerpill]].}}<br />
<br />
Install {{Pkg|aria2}}, then edit {{ic|/etc/pacman.conf}} by adding the following line to the {{ic|[options]}} section:<br />
<br />
XferCommand = /usr/bin/aria2c --allow-overwrite=true --continue=true --file-allocation=none --log-level=error --max-tries=2 --max-connection-per-server=2 --max-file-not-found=5 --min-split-size=5M --no-conf --remote-time=true --summary-interval=60 --timeout=5 --dir=/ --out %o %u<br />
<br />
{{Tip|1=[https://bbs.archlinux.org/viewtopic.php?pid=1491879#p1491879 This alternative configuration for using pacman with aria2] tries to simplify configuration and adds more configuration options.}}<br />
<br />
See {{man|1|aria2c|OPTIONS}} for used aria2c options.<br />
<br />
* {{ic|-d, --dir}}: The directory to store the downloaded file(s) as specified by ''pacman''.<br />
* {{ic|-o, --out}}: The output file name(s) of the downloaded file(s). <br />
* {{ic|%o}}: Variable which represents the local filename(s) as specified by ''pacman''.<br />
* {{ic|%u}}: Variable which represents the download URL as specified by ''pacman''.<br />
<br />
==== Other applications ====<br />
<br />
There are other downloading applications that you can use with ''pacman''. Here they are, and their associated XferCommand settings:<br />
<br />
* {{ic|snarf}}: {{ic|1=XferCommand = /usr/bin/snarf -N %u}}<br />
* {{ic|lftp}}: {{ic|1=XferCommand = /usr/bin/lftp -c pget %u}}<br />
* {{ic|axel}}: {{ic|1=XferCommand = /usr/bin/axel -n 2 -v -a -o %o %u}}<br />
* {{ic|hget}}: {{ic|1=XferCommand = /usr/bin/hget %u -n 2 -skip-tls false}} (please read the [https://github.com/huydx/hget documentation on the Github project page] for more info)<br />
* {{ic|saldl}}: {{ic|1=XferCommand = /usr/bin/saldl -c6 -l4 -s2m -o %o %u}} (please read the [https://saldl.github.io documentation on the project page] for more info)<br />
<br />
== Utilities ==<br />
<br />
* {{App|Lostfiles|Script that identifies files not owned by any package.|https://github.com/graysky2/lostfiles|{{Pkg|lostfiles}}}}<br />
* {{App|Pacmatic|Pacman wrapper to check Arch News before upgrading, avoid partial upgrades, and warn about configuration file changes.|http://kmkeen.com/pacmatic|{{Pkg|pacmatic}}}}<br />
* {{App|pacutils|Helper library for libalpm based programs.|https://github.com/andrewgregory/pacutils|{{Pkg|pacutils}}}}<br />
* {{App|[[pkgfile]]|Tool that finds what package owns a file.|https://github.com/falconindy/pkgfile|{{Pkg|pkgfile}}}}<br />
* {{App|pkgtools|Collection of scripts for Arch Linux packages.|https://github.com/Daenyth/pkgtools|{{AUR|pkgtools}}}}<br />
* {{App|pkgtop|Interactive package manager and resource monitor designed for the GNU/Linux.|https://github.com/orhun/pkgtop|{{AUR|pkgtop-git}}}}<br />
* {{App|[[Powerpill]]|Uses parallel and segmented downloading through [[aria2]] and [[Reflector]] to try to speed up downloads for ''pacman''.|https://xyne.archlinux.ca/projects/powerpill/|{{AUR|powerpill}}}}<br />
* {{App|repoctl|Tool to help manage local repositories.|https://github.com/cassava/repoctl|{{AUR|repoctl}}}}<br />
* {{App|repose|An Arch Linux repository building tool.|https://github.com/vodik/repose|{{Pkg|repose}}}}<br />
* {{App|[[Snapper#Wrapping_pacman_transactions_in_snapshots|snap-pac]]|Make ''pacman'' automatically use snapper to create pre/post snapshots like openSUSE's YaST.|https://github.com/wesbarnett/snap-pac|{{Pkg|snap-pac}}}}<br />
* {{App|vrms-arch|A virtual Richard M. Stallman to tell you which non-free packages are installed.|https://github.com/orospakr/vrms-arch|{{AUR|vrms-arch-git}}}}<br />
<br />
=== Graphical ===<br />
<br />
{{Warning|PackageKit opens up system permissions by default, and is otherwise not recommended for general usage. See {{Bug|50459}} and {{Bug|57943}}.}}<br />
<br />
* {{App|Apper|Qt 5 application and package manager using PackageKit written in C++. Supports [https://www.freedesktop.org/wiki/Distributions/AppStream/ AppStream metadata].|https://userbase.kde.org/Apper|{{Pkg|apper}}}}<br />
* {{App|Deepin App Store|Third party app store for DDE built with DTK, using PackageKit. Supports [https://www.freedesktop.org/wiki/Distributions/AppStream/ AppStream metadata].|https://github.com/dekzi/dde-store|{{Pkg|deepin-store}}}}<br />
* {{App|Discover|Qt 5 application manager using PackageKit written in C++/QML. Supports [https://www.freedesktop.org/wiki/Distributions/AppStream/ AppStream metadata], [[Flatpak]] and [[fwupd|firmware updates]]. |https://userbase.kde.org/Discover|{{Pkg|discover}}}}<br />
* {{App|GNOME PackageKit|GTK 3 package manager using PackageKit written in C.|https://freedesktop.org/software/PackageKit/|{{Pkg|gnome-packagekit}}}}<br />
* {{App|GNOME Software|GTK 3 application manager using PackageKit written in C. Supports [https://www.freedesktop.org/wiki/Distributions/AppStream/ AppStream metadata], [[Flatpak]] and [[fwupd|firmware updates]]. |https://wiki.gnome.org/Apps/Software|{{Pkg|gnome-software}}}}<br />
* {{App|pcurses|Curses TUI ''pacman'' wrapper written in C++.|https://github.com/schuay/pcurses|{{Pkg|pcurses}}}}<br />
* {{App|tkPacman|Tk pacman wrapper written in Tcl.|https://sourceforge.net/projects/tkpacman|{{AUR|tkpacman}}}}</div>Pdchttps://wiki.archlinux.org/index.php?title=KornShell&diff=669688KornShell2021-05-08T13:52:17Z<p>Pdc: Undo revision 668935 by Lahwaacz.bot (talk): mksh site is http only</p>
<hr />
<div>[[Category:Command-line shells]]<br />
[[ja:Ksh]]<br />
The [[Wikipedia:KornShell|KornShell]] (ksh) is a standard/restricted command and programming language developed by AT&T.<br />
<br />
== Installation ==<br />
<br />
First, [[install]] an implementation from the [[official repositories]]:<br />
<br />
* {{App|MirBSD™ Korn Shell|Enhanced version of the public domain ksh.|http://www.mirbsd.org/mksh.htm|{{Pkg|mksh}}}}<br />
* {{App|[[Wikipedia:Korn_shell|AT&T Korn shell]]|Official AT&T version.|http://www.kornshell.com/|{{Pkg|ksh}}}}<br />
<br />
More implementations are provided in the [[Arch User Repository]]:<br />
* {{App|loksh|A Linux port of OpenBSD's ksh|https://github.com/dimkr/loksh|{{AUR|loksh-git}}}}<br />
* {{App|OpenBSDs Korn Shell|Porting of the OpenBSD version of ksh to GNU/Linux.|https://github.com/ibara/oksh/|{{AUR|oksh}}}}<br />
<br />
== Making a ksh implementation your default login shell ==<br />
<br />
Change the default shell for the current user:<br />
<br />
$ chsh -s /bin/''ksh implementation''<br />
<br />
== Uninstallation ==<br />
<br />
Change the default shell before removing the [[#Installation|ksh packages]].<br />
<br />
{{Warning|Failure to follow the below procedure may result in users no longer having access to a working shell.}}<br />
<br />
Run following command:<br />
<br />
$ chsh -s /bin/bash ''user''<br />
<br />
Use it for every user with m/ksh set as their login shell (including root if needed). When completed, the {{Pkg|mksh}} package can be removed.<br />
<br />
Alternatively, change the default shell back to Bash by editing {{ic|/etc/passwd}} as root. <br />
<br />
{{Warning|It is strongly recommended to use {{ic|vipw}} when editing {{ic|/etc/passwd}} as it helps prevent invalid entries and/or syntax errors.}}<br />
<br />
For example, change the following:<br />
<br />
''username'':x:1000:1000:''Full Name'',,,:/home/''username'':/bin/mksh<br />
<br />
To this:<br />
<br />
''username'':x:1000:1000:''Full Name'',,,:/home/''username'':/bin/bash<br />
<br />
== See Also ==<br />
<br />
* [http://www.mirbsd.org/mksh.htm mksh - The MirBSD Korn Shell]</div>Pdchttps://wiki.archlinux.org/index.php?title=Network_Time_Protocol_daemon&diff=658720Network Time Protocol daemon2021-04-10T09:05:01Z<p>Pdc: /* Usage */ fix typo</p>
<hr />
<div>[[Category:Network Time Protocol]]<br />
[[es:Network Time Protocol daemon]]<br />
[[fr:ntp]]<br />
[[it:Network Time Protocol daemon]]<br />
[[ja:Network Time Protocol daemon]]<br />
[[ru:Network Time Protocol daemon]]<br />
[[zh-hans:Network Time Protocol daemon]]<br />
{{Related articles start}}<br />
{{Related|NTPSec}}<br />
{{Related|Chrony}}<br />
{{Related|Time synchronization}}<br />
{{Related articles end}}<br />
<br />
[[Wikipedia:Network Time Protocol|Network Time Protocol]] is the most common method to synchronize the [[System time|software clock]] of a GNU/Linux system with internet time servers. It is designed to mitigate the effects of variable network latency and can usually maintain time to within tens of milliseconds over the public Internet. The accuracy on local area networks is even better, up to one millisecond.<br />
<br />
[http://support.ntp.org/bin/view/Main/WebHome#The_NTP_Project The NTP Project] provides a reference implementation of the protocol called simply NTP. This article further describes how to set up and run the NTP daemon, both as a client and as a server.<br />
<br />
See [[System time#Time synchronization]] for other NTP implementations.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|ntp}} package. By default, ''ntpd'' works in client mode without further configuration. You can skip to [[#Usage]], if you want to use the Arch Linux default configuration file for it. For server configuration, see [[#NTP server mode]].<br />
<br />
== Configuration ==<br />
<br />
The main daemon is ''ntpd'', which is configured in {{ic|/etc/ntp.conf}}. Refer to {{man|5|ntp.conf}} for detail.<br />
<br />
=== Connection to NTP servers ===<br />
<br />
NTP servers are classified in a hierarchical system with many levels called ''strata'': the devices which are considered independent time sources are classified as ''stratum 0'' sources; the servers directly connected to ''stratum 0'' devices are classified as ''stratum 1'' sources; servers connected to ''stratum 1'' sources are then classified as ''stratum 2'' sources and so on.<br />
<br />
It has to be understood that a server's stratum cannot be taken as an indication of its accuracy or reliability. Typically, stratum 2 servers are used for general synchronization purposes: if you do not already know the servers you are going to connect to, you should choose a server pool close to your location from the [http://www.pool.ntp.org/ pool.ntp.org] servers ([http://support.ntp.org/bin/view/Servers/NTPPoolServers alternative link]).<br />
<br />
Since ''ntp'' version 4.2.7.p465-2, Arch Linux uses its own default vendor pool of NTP servers provided by [http://www.pool.ntp.org the NTP Pool Project] (see {{Bug|41700}}). Modify those to suit your needs, e.g. if you want to use your country's servers with an option:<br />
{{hc|/etc/ntp.conf|<br />
server 0.fr.pool.ntp.org iburst<br />
server 1.fr.pool.ntp.org iburst<br />
server 2.fr.pool.ntp.org iburst<br />
server 3.fr.pool.ntp.org iburst<br />
}}<br />
The {{ic|iburst}} option is recommended, and sends a burst of packets only if it cannot obtain a connection with the first attempt. The {{ic|burst}} option always does this, even on the first attempt, and should never be used without explicit permission and may result in blacklisting.<br />
<br />
=== NTP server mode ===<br />
<br />
If setting up an NTP server, check that you have [http://doc.ntp.org/current-stable/orphan.html orphan mode] enabled, so that, in case it loses internet access, it will continue serving time to the network; enable orphan mode using the {{ic|tos}} configuration parameter (you can set up to [http://www.ntp.org/ntpfaq/NTP-s-algo.htm#Q-ALGO-BASIC-STRATUM stratum 15]) so that it will never be used unless internet access is lost:<br />
<br />
tos orphan 15<br />
<br />
Next, define the rules that will allow clients to connect to your service (''localhost'' is considered a client too) using the ''restrict'' command; you should already have a line like this in your file:<br />
<br />
restrict default nomodify nopeer noquery<br />
<br />
This restricts everyone from modifying anything and prevents everyone from querying the status of your time server: {{ic|nomodify}} prevents reconfiguring ''ntpd'' (with ''ntpq'' or ''ntpdc''), and {{ic|noquery}} is important to [https://mailman.archlinux.org/pipermail/arch-dev-public/2014-February/025872.html prevent] dumping status data from ''ntpd'' (also with ''ntpq'' or ''ntpdc'').<br />
<br />
You can also add other options:<br />
<br />
restrict default kod nomodify notrap nopeer noquery<br />
<br />
{{Note|This still allows other people to query your time server. You need to add {{ic|noserve}} to stop serving time. It will also block time synchronization since it blocks all packets except ''ntpq'' and ''ntpdc'' queries.}}<br />
<br />
If you want to change any of these, see the full docs for the "restrict" option in {{man|5|ntp.conf}}, the detailed ntp [https://support.ntp.org/bin/view/Support/AccessRestrictions instructions] and [[#Usage]].<br />
<br />
Following this line, you need to tell ''ntpd'' what to allow through into your server; the following line is enough if you are not configuring an NTP server:<br />
<br />
restrict 127.0.0.1<br />
<br />
If you want to force DNS resolution to the IPv6 namespace, write {{ic|-6}} before the IP address or host name ({{ic|-4}} forces IPv4 instead), for example:<br />
<br />
restrict -6 default kod nomodify notrap nopeer noquery<br />
restrict -6 ::1 # ::1 is the IPv6 equivalent for 127.0.0.1<br />
<br />
Lastly, specify the drift file (which keeps track of your clock's time deviation) and optionally the log file location:<br />
<br />
driftfile /var/lib/ntp/ntp.drift<br />
logfile /var/log/ntp.log<br />
<br />
A very basic configuration file will look like this:<br />
<br />
{{hc|/etc/ntp.conf|<br />
server 0.pool.ntp.org iburst<br />
server 1.pool.ntp.org iburst<br />
server 2.pool.ntp.org iburst<br />
server 3.pool.ntp.org iburst<br />
tos orphan 15<br />
<br />
restrict default kod nomodify notrap nopeer noquery<br />
restrict -6 default kod nomodify notrap nopeer noquery<br />
<br />
restrict 127.0.0.1<br />
restrict -6 ::1 <br />
<br />
driftfile /var/lib/ntp/ntp.drift<br />
logfile /var/log/ntp.log<br />
}}<br />
<br />
{{Note|Defining the log file is not mandatory, but it is always a good idea to have feedback for ''ntpd'' operations.}}<br />
<br />
== Usage ==<br />
<br />
The package has a default client-mode configuration and its own user and group to drop root privileges after starting. If you start it from the console, you should always do so with the {{ic|-u}} option:<br />
<br />
# ntpd -u ntp:ntp<br />
<br />
The {{ic|-u}} option is employed by the two included systemd services. These services also use the {{ic|-g}} option, which disables a threshold (so-called ''panic-gate''). Hence, they will synchonize time even in case the ntp-server's time exceeds the threshold deviation from the system clock.<br />
<br />
{{Warning|One reason the panic-gate was introduced is that background jobs/services may be susceptible to time-jumps. If the system's clock was never synchronized before, consider stopping them before running ''ntpd'' for the first time.}}<br />
<br />
Both services are tied to the system's resolver, and will start synchronizing when an active network connection is detected.<br />
<br />
Check time synchronization status<br />
<br />
# timedatectl status<br />
<br />
and set ntp synchronization<br />
# timedatectl set-ntp true<br />
<br />
=== Start ntpd at boot ===<br />
<br />
[[Enable]] the daemon with {{ic|ntpd.service}}. See also [[#Running in a chroot]].<br />
<br />
{{Note|The systemd command ''timedatectl'' can only be used to control [[systemd-timesyncd]]. Executing {{ic|timedatectl set-ntp 1}} as root will inadvertedly stop a running {{ic|ntpd.service}}.[https://lists.freedesktop.org/archives/systemd-devel/2015-April/030277.html]}}<br />
<br />
Use ''ntpq'' to see the list of configured peers and status of synchronization:<br />
<br />
$ ntpq -p<br />
<br />
The delay, offset and jitter columns should be non-zero. The servers ''ntpd'' is synchronizing with are prefixed by an asterisk. It can take several minutes before ''ntpd'' selects a server to synchronize with; try checking after 17 minutes (1024 seconds).<br />
<br />
=== Synchronize time once per boot ===<br />
<br />
Alternatively, [[enable]] {{ic|ntpdate.service}} to synchronize time once (option {{ic|-q}}) and non-forking (option {{ic|-n}}) per boot, instead of running the daemon in the background. This method is discouraged on servers, and in general on machines that run without rebooting for more than a few days.<br />
<br />
If the synchronized time should be written to the hardware clock as well, configure the provided unit as described in [[systemd#Editing provided units]] before starting it:<br />
<br />
{{hc|/etc/systemd/system/ntpdate.service.d/hwclock.conf|2=<br />
[Service]<br />
ExecStart=/usr/bin/hwclock -w<br />
}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Start ntpd on network connection ===<br />
<br />
''ntpd'' can be started by your network manager, so that the daemon only runs when the computer is online.<br />
<br />
;Netctl<br />
<br />
{{Style|add {{ic|-u}} and optionally refer to [[#Usage]], or use systemctl if possible}}<br />
<br />
Append the following lines to your [[netctl]] profile:<br />
<br />
ExecUpPost='/usr/bin/ntpd || true'<br />
ExecDownPre='killall ntpd || true'<br />
<br />
;NetworkManager<br />
<br />
The ''ntpd'' daemon can be brought up/down along with a network connection through the use of NetworkManager's [[NetworkManager#Network services with NetworkManager dispatcher|dispatcher]] scripts. The {{AUR|networkmanager-dispatcher-ntpd}} package installs one, pre-configured to start and stop the [[#Start ntpd at boot|ntpd service]] with a connection.<br />
<br />
;Wicd<br />
<br />
For [[Wicd]], create a start script in the {{ic|postconnect}} directory and a stop script in the {{ic|predisconnect}} directory. Remember to make them executable:<br />
<br />
{{hc|/etc/wicd/scripts/postconnect/ntpd|<br />
#!/bin/bash<br />
systemctl start ntpd &<br />
}}<br />
<br />
{{hc|/etc/wicd/scripts/predisconnect/ntpd|<br />
#!/bin/bash<br />
systemctl stop ntpd &<br />
}}<br />
<br />
{{Note|You are advised to customize the options for the ''ntpd'' command as explained in [[#Usage]].}}<br />
<br />
See also [[Wicd#Scripts]].<br />
<br />
;KDE<br />
<br />
KDE can use NTP (ntp must be installed) by right clicking the clock and selecting ''Adjust date/time''. However, this requires the ntp daemon to be [[disable]]d before configuring KDE to use NTP. [https://bugs.kde.org/show_bug.cgi?id=178968]<br />
<br />
=== Using ntpd with GPS ===<br />
<br />
Most of the articles online about configuring ''ntpd'' to receive time from a GPS suggest to use the SHM (shared memory) method. However, at least since ''ntpd'' version 4.2.8 a ''much better'' method is available. It connects directly to ''gpsd'', so {{Pkg|gpsd}} needs to be installed.<br />
<br />
Add these lines to your {{ic|/etc/ntp.conf}}:<br />
<br />
{{hc|head=/etc/ntp.conf|output=<br />
#=========================================================<br />
# GPSD native ntpd driver<br />
#=========================================================<br />
# This driver exists from at least ntp version 4.2.8<br />
# Details at<br />
# https://www.eecis.udel.edu/~mills/ntp/html/drivers/driver46.html<br />
server 127.127.46.0 <br />
fudge 127.127.46.0 time1 0.0 time2 0.0 refid GPS <br />
}}<br />
<br />
This will work as long as you have ''gpsd'' working. It connects to ''gpsd'' via the local socket and queries the "gpsd_json" object that is returned.<br />
<br />
To test the setup, first ensure that ''gpsd'' is working by running:<br />
<br />
$ cgps -s <br />
<br />
Then wait a few minutes and run {{ic|ntpq -p}}. This will show if ''ntpd'' is talking to ''gpsd'':<br />
<br />
{{hc|$ ntpq -p|output=<br />
remote refid st t when poll reach delay offset jitter<br />
==================================================================================<br />
*GPSD_JSON(0) .GPS. 0 l 55 64 377 0.000 2.556 14.109<br />
}}<br />
<br />
{{Tip|If the ''reach'' column is 0, it means ''ntpd'' has not been able to talk to ''gpsd''. Wait a few minutes and try again. Sometimes it takes ''ntpd'' a while.}}<br />
<br />
{{Note|''ntpd'' expects that your GPS device is called e.g. {{ic|/dev/gps0}}. If your GPS device is connected via USB, it may appear as {{ic|/dev/ttyUSB0}} instead, and you may have to create a symlink {{ic|ln -s /dev/ttyUSB0 /dev/gps0}} and run ''gpsd'' on that linked {{ic|/dev/gps0}} so that the {{ic|GPSD_JSON}} line appears as expected. ''gpsd'' should be run with the {{ic|-n}} flag on the {{ic|GPSD_OPTIONS}} line and use {{ic|/dev/gps0}} on the {{ic|DEVICES}} line in the {{ic|/etc/default/gpsd}} config file.}}<br />
<br />
=== Running in a chroot ===<br />
<br />
{{Note|''ntpd'' should be started as non-root (default in the Arch Linux package) before attempting to jail it in a chroot, since chroots are relatively useless at securing processes running as root.}}<br />
<br />
Create a new directory {{ic|/etc/systemd/system/ntpd.service.d/}} if it does not exist and a file named {{ic|customexec.conf}} inside with the following content:<br />
<br />
[Service]<br />
ExecStart=<br />
ExecStart=/usr/bin/ntpd -g -u ntp:ntp '''-i /var/lib/ntp'''<br />
<br />
Then, edit {{ic|/etc/ntp.conf}} to change the driftfile path such that it is relative to the chroot directory, rather than to the real system root. Change:<br />
driftfile /var/lib/ntp/ntp.drift<br />
<br />
to<br />
driftfile /ntp.drift<br />
<br />
Create a suitable chroot environment so that getaddrinfo() will work by creating pertinent directories and files (as root):<br />
<br />
# mkdir /var/lib/ntp/etc /var/lib/ntp/lib /var/lib/ntp/proc<br />
# mkdir /var/lib/ntp/usr /var/lib/ntp/usr/lib<br />
# touch /var/lib/ntp/etc/resolv.conf /var/lib/ntp/etc/services<br />
<br />
and by bind-mounting the aformentioned files:<br />
<br />
{{hc|/etc/fstab|<br />
...<br />
#ntpd chroot mounts<br />
/etc/resolv.conf /var/lib/ntp/etc/resolv.conf none bind 0 0<br />
/etc/services /var/lib/ntp/etc/services none bind 0 0<br />
/lib /var/lib/ntp/lib none bind 0 0<br />
/usr/lib /var/lib/ntp/usr/lib none bind 0 0<br />
/proc /var/lib/ntp/proc none bind 0 0<br />
}}<br />
<br />
# mount -a<br />
<br />
Finally, restart {{ic|ntpd}} daemon again. Once it restarted you can verify that the daemon process is chrooted by checking where {{ic|/proc/{PID}/root}} symlinks to: <br />
<br />
# ps -C ntpd | awk '{print $1}' | sed 1d | while read -r PID; do ls -l /proc/$PID/root; done<br />
<br />
should now link to {{ic|/var/lib/ntp}} instead of {{ic|/}}.<br />
<br />
It is relatively difficult to be sure that your driftfile configuration is actually working without waiting a while, as ''ntpd'' does not read or write it very often. If you get it wrong, it will log an error; if you get it right, it will update the timestamp. If you do not see any errors about it after a full day of running, and the timestamp is updated, you should be confident of success.<br />
<br />
=== Restrict listening sockets ===<br />
<br />
You can limit sockets ''ntpd'' is listening to using the ''interface'' option:<br />
interface [listen | ignore | drop] [all | ipv4 | ipv6 | wildcard | name | address[/prefixlen]]<br />
<br />
like<br />
<br />
{{hc|head=/etc/ntp.conf|output=<br />
interface listen lo<br />
interface listen enp3s0<br />
interface ignore enp5s0<br />
}}<br />
<br />
== See also ==<br />
<br />
* http://www.ntp.org/<br />
* https://support.ntp.org/<br />
* http://www.pool.ntp.org/<br />
* https://www.eecis.udel.edu/~mills/ntp/html/index.html<br />
* http://www.akadia.com/services/ntp_synchronize.html</div>Pdchttps://wiki.archlinux.org/index.php?title=List_of_applications/Utilities&diff=658631List of applications/Utilities2021-04-09T19:43:28Z<p>Pdc: /* Terminal emulators */ zutty has been moved to the Community repository</p>
<hr />
<div><noinclude><br />
[[Category:Applications]]<br />
[[Category:Lists of software]]<br />
[[es:List of applications (Español)/Utilities]]<br />
[[it:List of applications (Italiano)/Utilities]]<br />
[[ja:アプリケーション一覧/ユーティリティ]]<br />
[[pt:List of applications (Português)/Utilities]]<br />
[[tr:List of applications (Türkçe)/Utilities]]<br />
[[zh-hans:List of applications (简体中文)/Utilities]]<br />
[[zh-hant:List of applications (正體中文)/Utilities]]<br />
{{List of applications navigation}}<br />
</noinclude><br />
== Utilities ==<br />
<br />
=== Terminal ===<br />
<br />
==== Command shells ====<br />
<br />
See the main article: [[Command-line shell]].<br />
<br />
See also [[Wikipedia:Comparison of command shells]].<br />
<br />
==== Terminal emulators ====<br />
<br />
Terminal emulators show a GUI Window that contains a terminal. Most emulate Xterm, which in turn emulates VT102, which emulates typewriter. For further background information, see [[Wikipedia:Terminal emulator]].<br />
<br />
For a comprehensive list, see [[Wikipedia:List of terminal emulators]].<br />
<br />
* {{App|[[Alacritty]]|A cross-platform, GPU-accelerated terminal emulator.|https://github.com/jwilm/alacritty|{{Pkg|alacritty}}}}<br />
* {{App|aterm|Xterm replacement with transparency support. It has been deprecated in favour of urxvt since 2008.|http://www.afterstep.org/aterm.php|{{AUR|aterm}}}}<br />
* {{App|Cool Retro Term|A good looking terminal emulator which mimics the old cathode display.|https://github.com/Swordfish90/cool-retro-term|{{Pkg|cool-retro-term}}}}<br />
* {{App|CuteCom|A graphical serial terminal.|https://gitlab.com/cutecom/cutecom|{{AUR|cutecom}}}}<br />
* {{App|Deepin Terminal|Terminal emulation application for Deepin desktop.|https://www.deepin.org/en/original/deepin-terminal/|{{Pkg|deepin-terminal}}}}<br />
* {{App|Eterm|Terminal emulator intended as a replacement for xterm and designed for the [[Enlightenment]] desktop.|https://github.com/mej/Eterm|{{AUR|eterm}}}}<br />
* {{App|foot|Lightweight terminal emulator for Wayland with [[w:sixel|sixel]] support|https://codeberg.org/dnkl/foot|{{AUR|foot}}, {{AUR|foot-git}}}}<br />
* {{App|Hyper|A terminal with JS/CSS support. Based on the [https://electronjs.org/ Electron] platform.|https://github.com/zeit/hyper|{{AUR|hyper}}}}<br />
* {{App|[[Wikipedia:Konsole|Konsole]]|Terminal emulator included in the [[KDE]] desktop.|https://www.kde.org/applications/system/konsole/|{{Pkg|konsole}}}}<br />
* {{App|[[kitty]]|A modern, hackable, featureful, OpenGL based terminal emulator|https://github.com/kovidgoyal/kitty|{{Pkg|kitty}}}}<br />
* {{App|Liri Terminal|Material Design terminal for Liri.|https://github.com/lirios/terminal|{{Pkg|liri-terminal}}}}<br />
* {{App|mlterm|A multi-lingual terminal emulator supporting various character sets and encodings in the world.|https://sourceforge.net/projects/mlterm/|{{AUR|mlterm}}}}<br />
* {{App|moserial|GTK-based serial terminal for the GNOME desktop.|https://wiki.gnome.org/Apps/Moserial|{{Pkg|moserial}}}}<br />
* {{App|[[PuTTY]]|Highly configurable ssh/telnet/serial console program.|https://www.chiark.greenend.org.uk/~sgtatham/putty/|{{Pkg|putty}}}}<br />
* {{App|QTerminal|Lightweight Qt-based terminal emulator.|https://github.com/qterminal/qterminal|{{Pkg|qterminal}}}}<br />
* {{App|[[Wikipedia:Rxvt|rxvt]]|Popular replacement for xterm.|http://rxvt.sourceforge.net/|{{AUR|rxvt}}}}<br />
* {{App|shellinabox|A web-based SSH Terminal|https://github.com/shellinabox/shellinabox|{{AUR|shellinabox-git}}}}<br />
* {{App|[[st]]|Simple terminal implementation for X.|http://st.suckless.org|{{AUR|st}}}}<br />
* {{App|Station|Terminal emulation features different view modes such as split vertically and horizontally, a tabbed interface, and copy and paste commands.|https://invent.kde.org/maui/station|{{Pkg|maui-station}}}}<br />
* {{App|Terminology|Terminal emulator by the Enlightenment project team with innovative features: file thumbnails and media play like a media player.|https://www.enlightenment.org/about-terminology|{{Pkg|terminology}}}}<br />
* {{App|[[urxvt]]|Highly extendable (with Perl) unicode enabled rxvt-clone terminal emulator featuring tabbing, url launching, a Quake style drop-down mode and pseudo-transparency.|http://software.schmorp.de/pkg/rxvt-unicode.html|{{Pkg|rxvt-unicode}}}}<br />
* {{App|wayst|Simple terminal emulator for Wayland and X11 with OpenGL rendering and minimal dependencies.|https://github.com/91861/wayst|{{AUR|wayst-git}}}}<br />
* {{App|[[xterm]]|Simple terminal emulator for the X Window System. It provides DEC VT102 and Tektronix 4014 compatible terminals for programs that cannot use the window system directly.|https://invisible-island.net/xterm/|{{Pkg|xterm}}}}<br />
* {{App|[[Yakuake]]|Drop-down terminal (Quake style) emulator based on Konsole.|https://kde.org/applications/system/org.kde.yakuake|{{Pkg|yakuake}}}}<br />
* {{App|zutty|A high-end terminal for low-end systems.|https://tomscii.sig7.se/zutty/|{{Pkg|zutty}}}}<br />
<br />
===== VTE-based =====<br />
<br />
[https://developer.gnome.org/vte/unstable/ VTE] (Virtual Terminal Emulator) is a widget developed during early GNOME days for use in the GNOME Terminal. It has since given birth to many terminals with similar capabilities.<br />
<br />
* {{App|Deepin Terminal (GTK version)|Old terminal emulation application for Deepin desktop.|https://github.com/linuxdeepin/deepin-terminal-gtk|{{Pkg|deepin-terminal-gtk}}}}<br />
* {{App|EasySSH|SSH Connection Manager.|https://github.com/muriloventuroso/easyssh|{{AUR|easyssh}}}}<br />
* {{App|Germinal|Minimalist terminal emulator which provides a borderless maximized terminal, attached to a tmux session by default, hence providing tabs and panels.|https://www.imagination-land.org/tags/germinal.html|{{AUR|germinal}}}}<br />
* {{App|[[Wikipedia:GNOME Terminal|GNOME Terminal]]|A terminal emulator included in the [[GNOME]] desktop with support for Unicode.|https://wiki.gnome.org/Apps/Terminal|{{Pkg|gnome-terminal}}}}<br />
* {{App|[[Guake]]|Drop-down terminal for the GNOME desktop.|http://guake-project.org/|{{Pkg|guake}}}}<br />
* {{App|kermit|A VTE-based terminal emulator that aims to be simple, fast and effective.|https://github.com/orhun/kermit|{{AUR|kermit}}}}<br />
* {{App|LXTerminal|Desktop independent terminal emulator for [[LXDE]].|https://wiki.lxde.org/en/LXTerminal|{{Pkg|lxterminal}}}}<br />
* {{App|MATE terminal|A fork of [[Wikipedia:GNOME terminal]] for the [[MATE]] desktop.|https://www.mate-desktop.org/|{{Pkg|mate-terminal}}}}<br />
* {{App|Pantheon Terminal|A super lightweight, beautiful, and simple terminal emulator. It's designed to be setup with sane defaults and little to no configuration.|https://github.com/elementary/terminal|{{Pkg|pantheon-terminal}}}}<br />
* {{App|ROXTerm|Tabbed terminal emulator with a small footprint.|http://roxterm.sourceforge.net/|{{AUR|roxterm}}}}<br />
* {{App|sakura|Terminal emulator based on GTK and VTE.|http://www.pleyades.net/david/projects/sakura|{{Pkg|sakura}}}}<br />
* {{App|[[Terminator]]|Terminal emulator supporting multiple resizable terminal panels.|https://gnome-terminator.org/|{{Pkg|terminator}}}}<br />
* {{App|[[Termite]]|Keyboard-centric VTE-based terminal, aimed at use within a window manager with tiling and/or tabbing support. Not maintained.|https://github.com/thestinger/termite|{{Pkg|termite}}}}<br />
* {{App|Tilda|Configurable drop down terminal emulator.|https://github.com/lanoxx/tilda/|{{Pkg|tilda}}}}<br />
* {{App|Tilix|Tiling terminal emulator for GNOME.|https://gnunn1.github.io/tilix-web/|{{Pkg|tilix}}}}<br />
* {{App|[[Wikipedia:Terminal (Xfce)|Xfce Terminal]]|Terminal emulator included in the [[Xfce]] desktop with support for a colorized prompt and a tabbed interface.|https://docs.xfce.org/apps/terminal/start|{{Pkg|xfce4-terminal}}}}<br />
<br />
===== KMS-based =====<br />
<br />
The following terminal emulators are based on the [[kernel mode setting]] that could be invoked without X.<br />
* {{App|[[KMSCON]]|A KMS/DRM-based system console(getty) with an integrated terminal emulator for Linux operating systems.|https://github.com/dvdhrm/kmscon|{{Pkg|kmscon}}}}<br />
<br />
===== framebuffer-based =====<br />
<br />
In the GNU/Linux world, the [[Wikipedia:Framebuffer|framebuffer]] can refer to a virtual device in the Linux kernel ('''fbdev''') or the virtual framebuffer system for X ('''xvfb'''). This section mainly lists the terminal emulators based on the in-kernel virtual device, i.e. '''fbdev'''.<br />
<br />
* {{App|yaft|A simple terminal emulator for living without X, with UCS2 glyphs, wallpaper and 256color support.|https://github.com/uobikiemukot/yaft|{{aur|yaft}}}}<br />
<br />
==== Terminal pagers ====<br />
<br />
See also [[Wikipedia:Terminal pager]].<br />
<br />
* {{App|[[Wikipedia:More_(command)|more]]|A simple and feature-light pager. It is a part of util-linux.|https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/about/|{{Pkg|util-linux}}}}<br />
* {{App|[[Core_utilities#Essentials|less]]|A program similar to more, but with support for both forward and backward scrolling, as well as partial loading of files.|https://www.gnu.org/software/less/|{{Pkg|less}}}}<br />
* {{App|[[Wikipedia:Most_(Unix)|most]]|A pager with support for multiple windows, left and right scrolling, and built-in colour support|http://www.jedsoft.org/most/|{{Pkg|most}}}}<br />
* {{App|mcview|A pager with mouse and colour support. It is bundled with midnight commander.|http://midnight-commander.org/|{{Pkg|mc}}}}<br />
* [[Vim]] can [[Vim#Vim as a pager|also be used as a pager]].<br />
<br />
==== Terminal multiplexers ====<br />
<br />
See also [[Wikipedia:Terminal multiplexer]].<br />
<br />
* {{App|abduco|Tool for session attach and detach support which allows a process to run independently from its controlling terminal.|https://www.brain-dump.org/projects/abduco/|{{Pkg|abduco}}}}<br />
* {{App|[[Wikipedia:Byobu (software)|byobu]]|An GPLv3 licensed addon for tmux or screen. It requires a terminal multiplexer installed.|https://byobu.org/|{{Pkg|byobu}}}}<br />
* {{App|[[dtach]]|Program that emulates the detach feature of [[GNU Screen]].|http://dtach.sourceforge.net/|{{AUR|dtach}}}}<br />
* {{App|dvtm|[[dwm]]-style window manager in the console.|https://www.brain-dump.org/projects/dvtm/|{{Pkg|dvtm}}}}<br />
* {{App|[[GNU Screen]]|Full-screen window manager that multiplexes a physical terminal.|https://www.gnu.org/software/screen/|{{Pkg|screen}}}}<br />
* {{App|mtm|Simple terminal multiplexer with just four commands: change focus, split, close, and screen redraw.|https://github.com/deadpixi/mtm|{{AUR|mtm-git}}}}<br />
* {{App|[[tmux]]|BSD licensed terminal multiplexer.|https://tmux.github.io/|{{Pkg|tmux}}}}<br />
<br />
{{Tip|[[Kitty]], a terminal emulator, offers similar functions.}}<br />
<br />
=== Files ===<br />
<br />
==== File managers ====<br />
<br />
See also [[Wikipedia:Comparison of file managers]].<br />
<br />
===== Console =====<br />
<br />
* {{App|Clex|File manager with full-screen user interface|http://www.clex.sk/|{{Aur|clex}}}}<br />
* {{App|ded|directory editor, file manager similar to Emacs dired|https://invisible-island.net/ded/ded.html|{{AUR|ded}}}}<br />
* {{App|[[Wikipedia:Dired|Dired]]|Directory editor integrated with [[Emacs]].|https://www.gnu.org/software/emacs/manual/html_node/emacs/Dired.html|{{pkg|emacs}}}}<br />
* {{App|joshuto|ranger-like terminal file manager written in Rust.|https://github.com/kamiyaa/joshuto|{{AUR|joshuto-git}}}}<br />
* {{App|Last File Manager|Powerful file manager written in Python 3 with a curses interface.|https://inigo.katxi.org/devel/lfm/|{{AUR|lfm}}}}<br />
* {{App|lf|Terminal file manager written in Go using server/client architecture.|https://github.com/gokcehan/lf|{{aur|lf}}}}<br />
* {{App|[[Midnight Commander]]|Console-based, dual-paneled file manager.|http://midnight-commander.org|{{Pkg|mc}}}}<br />
* {{App|nffm|"Nothing Fancy File Manager", a mouseless ncurses file manager written in C.|https://github.com/mariostg/nffm|{{AUR|nffm-git}}}}<br />
* {{App|[[nnn]]|Tiny, lightning fast, feature-packed file manager.|https://github.com/jarun/nnn|{{Pkg|nnn}}}}<br />
* {{App|fff|A simple file manager written in Bash.|https://github.com/dylanaraps/fff|{{Pkg|fff}}}}<br />
* {{App|Pilot|File manager that comes with the [[Alpine]] email client.|http://alpine.x10host.com/|{{AUR|alpine-git}}}}<br />
* {{App|[[Ranger]]|Console-based file manager with vi bindings, customizability, and lots of features.|https://ranger.github.io/|{{Pkg|ranger}}}}<br />
* {{App|[[Vifm]]|Ncurses-based two-panel file manager with vi-like keybindings.|https://vifm.info|{{Pkg|vifm}}}}<br />
<br />
===== Graphical =====<br />
<br />
* {{App|Caja|The file manager for the MATE desktop.|https://github.com/mate-desktop/caja|{{Pkg|caja}}}}<br />
* {{App|Deepin File Manager|File manager developed for [[Deepin]].|https://www.deepin.org/en/original/dde-file-manager/|{{Pkg|deepin-file-manager}}}}<br />
* {{App|[[Dolphin]]|File manager included in the KDE desktop.|https://userbase.kde.org/Dolphin|{{Pkg|dolphin}}}}<br />
* {{App|Gentoo|A lightweight file manager for GTK.|https://sourceforge.net/projects/gentoo/|{{AUR|gentoo}}}}<br />
* {{App|[[GNOME Files]]|Extensible, heavyweight file manager used by default in GNOME with support for custom scripts.|https://wiki.gnome.org/Apps/Files|{{Pkg|nautilus}}}}<br />
* {{App|Index|File manager that lets you browse your system files and applications and preview your music, text, image and video files and share them with external applications.|https://invent.kde.org/maui/index-fm|{{Pkg|index-fm}}}}<br />
* {{App|[[Wikipedia:Konqueror|Konqueror]]|File manager and web browser for the KDE desktop.|https://konqueror.org/|{{Pkg|konqueror}}}}<br />
* {{App|Liri Files|The file manager for Liri.|https://github.com/lirios/files|{{Pkg|liri-files}}}}<br />
* {{App|[[Nemo]]|Nemo is the file manager of the Cinnamon desktop. A fork of Nautilus.|https://cinnamon.linuxmint.com/|{{Pkg|nemo}}}}<br />
* {{App|Pantheon Files|File browser designed for elementary OS.|https://github.com/elementary/files|{{Pkg|pantheon-files}}}}<br />
* {{App|PathFinder|File browser that comes with the [[Wikipedia:Fox_toolkit|FOX toolkit]].|http://fox-toolkit.org/|{{Pkg|fox}}}}<br />
* {{App|[[PCManFM]]|Very fast and lightweight file manager which can also optionally manage the desktop icons and background.|https://wiki.lxde.org/en/PCManFM|{{Pkg|pcmanfm}}}}<br />
* {{App|[[PCManFM]]-Qt|Qt port of PCManFM file manager.|https://github.com/lxqt/pcmanfm-qt|{{Pkg|pcmanfm-qt}}}}<br />
* {{App|qtFM|Small, lightweight filemanager for Linux desktops based on pure Qt.|https://qtfm.eu/|{{AUR|qtfm}}}}<br />
* {{App|ROX Filer|Small and fast file manager which can optionally manage the desktop background and panels.|http://rox.sourceforge.net/|{{Pkg|rox}}}}<br />
* {{App|[[Thunar]]|File manager that can be run as a daemon with excellent start up and directory load times.|https://docs.xfce.org/xfce/thunar/start|{{Pkg|thunar}}}}<br />
<br />
====== Twin-panel ======<br />
<br />
Note that some of these twin-panel file managers can also be set to have only one pane.<br />
<br />
* {{App|Double Commander|File manager with two panels side by side. It is inspired by Total Commander and features some new ideas.|https://doublecmd.sourceforge.io/|GTK: {{Pkg|doublecmd-gtk2}}, Qt5: {{Pkg|doublecmd-qt5}}}}<br />
* {{App|[[Wikipedia:emelFM2|emelFM2]]|File manager that implements the popular two-panel design.|http://emelfm2.net/|{{Pkg|emelfm2}}}}<br />
* {{App|[[Wikipedia:GNOME Commander|GNOME Commander]]|A dual-paned file manager for the GNOME Desktop.|https://gcmd.github.io/|{{AUR|gnome-commander}}}}<br />
* {{App|[[Wikipedia:Krusader|Krusader]]|Advanced twin panel (Midnight Commander style) file manager for the KDE desktop.|https://krusader.org/|{{Pkg|krusader}}}}<br />
* {{App|muCommander|A lightweight, cross-platform file manager with a dual-pane interface written in Java.|http://www.mucommander.com/|{{AUR|mucommander}}}}<br />
* {{App|[[SpaceFM]]|GTK multi-panel tabbed file manager.|https://ignorantguru.github.io/spacefm/|{{AUR|spacefm}}}}<br />
* {{App|Sunflower|Small and highly customizable twin-panel file manager for Linux with support for plugins.|https://sunflower-fm.org/|{{AUR|sunflower}}}}<br />
* {{App|trolCommander|Lightweight, dual-pane file manager written in Java. Fork of muCommander.|https://github.com/trol73/mucommander|{{AUR|trolcommander}}}}<br />
* {{App|Tux Commander|Windowed file manager with two panels side by side similar to popular Total Commander or Midnight Commander file managers.|http://tuxcmd.sourceforge.net/description.php|{{Pkg|tuxcmd}}}}<br />
* {{App|Worker|Fast, lightweight and feature-rich file manager for the X Window System.|http://www.boomerangsworld.de/cms/worker/|{{AUR|worker}}}}<br />
* {{App|[[Wikipedia:Xfe|Xfe]]|Microsoft Explorer-like file manager for X (X File Explorer).|http://roland65.free.fr/xfe/|{{AUR|xfe}}}}<br />
<br />
==== Trash management ====<br />
<br />
* {{App|trash-cli|A command-line interface implementing [https://specifications.freedesktop.org/trash-spec/trashspec-latest.html FreeDesktop.org's Trash specification].|https://github.com/andreafrancia/trash-cli|{{Pkg|trash-cli}}}}<br />
<br />
==== File synchronization and backup ====<br />
<br />
{{Merge|Synchronization and backup programs#Data synchronization|There is a dedicated article.}}<br />
<br />
See also [[Synchronization and backup programs]], [[Wikipedia:Comparison of file synchronization software]], and [[Wikipedia:Comparison of backup software]].<br />
<br />
* {{App|borg|Deduplicating backup program with compression and authenticated encryption that supports backing up over ssh|https://www.borgbackup.org|{{Pkg|borg}}}}<br />
* {{App|Déjà Dup|Simple GTK backup program. It hides the complexity of doing backups the 'right way' (encrypted, off-site, and regular) and uses [[duplicity]] as the backend.|https://launchpad.net/deja-dup|{{Pkg|deja-dup}}}}<br />
* {{App|[[Wikipedia:DirSync Pro|DirSync Pro]]|Small, but powerful utility for file and folder synchronization.|https://dirsyncpro.org/|{{AUR|dirsyncpro}}}}<br />
* {{App|[[Wikipedia:Duplicati|Duplicati]]|Backup client that securely stores encrypted, incremental, compressed backups on cloud storage services and remote file servers.|https://www.duplicati.com/|{{AUR|duplicati-latest}}}}<br />
* {{App|[[duplicity]]|Simple command-line utility which allows encrypted compressed incremental backup to nearly any storage.|http://www.nongnu.org/duplicity/|{{Pkg|duplicity}}}}<br />
* {{App|[[Duply]]|Command-line front-end for [[duplicity]] which simplifies running it. It manages backup job settings in profiles and allows to batch execute commands.|http://www.duply.net/|{{AUR|duply}}}}<br />
* {{App|[[Wikipedia:FreeFileSync|FreeFileSync]]|Folder comparison and synchronization software that creates and manages backup copies of all your important files.|https://www.freefilesync.org/|{{AUR|freefilesync}}}}<br />
* {{App|[[Wikipedia:git-annex|git-annex]]|Manage files with git, without checking the file contents into git.|https://git-annex.branchable.com/|{{Pkg|git-annex}}}}<br />
* {{App|hsync|Command line program to sync only those files that have been renamed/moved but otherwise unchanged. It works by issuing simple move operations at the destination without actually transferring the files, and is meant to be used in conjunction with other synchronization programs that lack this capability.|https://ambrevar.bitbucket.io/hsync/|{{AUR|hsync}}}}<br />
* {{App|rclone|Command line program to sync files and directories to and from Amazon S3, Dropbox, Google Drive, Microsoft OneDrive, Yandex Disk and many other cloud storage services as well as between local paths.|https://rclone.org/|{{Pkg|rclone}}}}<br />
* {{App|restic|Fast, secure, efficient backup program that supports backing up to many cloud services.|https://restic.net/|{{Pkg|restic}}}}<br />
* {{App|[[rsync]]|File transfer program that uses the "rsync algorithm" which provides a very fast method for bringing remote files into sync. It does this by sending just the differences in the files across the link, without requiring that both sets of files are present at one of the ends of the link beforehand. Has [https://wiki.archlinux.org/index.php/Rsync#Front-ends multiple frontends available].|https://rsync.samba.org/|{{Pkg|rsync}}}}<br />
* {{App|[[Wikipedia:SparkleShare|SparkleShare]]|File sharing and collaboration application written in C#. It can sync with any Git server over SSH.|http://www.sparkleshare.org/|{{Pkg|sparkleshare}}}}<br />
* {{App|[[Syncthing]]|Continuous file synchronization program. It synchronizes files between two or more computers in a simple way without advanced configuration.|https://syncthing.net/|{{Pkg|syncthing}}}}<br />
* {{App|Syncany|Cloud storage and filesharing application with a focus on security and abstraction of storage.|https://www.syncany.org/|{{AUR|syncany}}}}<br />
* {{App|[[Wikipedia:Synkron|Synkron]]|Application that helps you keep your files and folders always updated. You can easily sync your documents, music or pictures to have their latest versions everywhere.|http://synkron.sourceforge.net/|{{AUR|synkron}}}}<br />
* {{App|[[Wikipedia:Tarsnap|Tarsnap]]|Secure, efficient proprietary online backup service.|http://www.tarsnap.com/|{{Pkg|tarsnap}}}}<br />
* {{App|Timeshift|A system restore tool for Linux.|https://github.com/teejee2008/timeshift|{{AUR|timeshift}}}}<br />
* {{App|[[Unison]]|File synchronization tool that allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other.|https://www.cis.upenn.edu/~bcpierce/unison/|{{Pkg|unison}}}}<br />
<br />
==== Archiving and compression tools ====<br />
<br />
For archiving and compression command-line tools, see [[Archiving and compression]].<br />
<br />
===== Archive managers =====<br />
<br />
* {{App|360zip|A proprietary archiving tool.|http://yasuo.360.cn/|{{AUR|360zip}}}}<br />
* {{App|[[Wikipedia:Ark (software)|Ark]]|Archiving tool included in the KDE desktop.|https://www.kde.org/applications/utilities/ark/|{{Pkg|ark}}}}<br />
* {{App|Arqiver|Simple Qt archive manager based on libarchive.|https://github.com/tsujan/Arqiver|{{AUR|arqiver-git}}}}<br />
* {{App|Deepin Archive Manager|Fast and lightweight application for creating and extracting archives.|https://github.com/linuxdeepin/deepin-compressor|{{Pkg|deepin-compressor}}}}<br />
* {{App|Engrampa|Archive manager for [[MATE]]|https://github.com/mate-desktop/engrampa|{{Pkg|engrampa}}}}<br />
* {{App|[[Wikipedia:GNOME Archive Manager|GNOME Archive Manager]]|Archive manager included in the GNOME desktop (previously File Roller).|https://wiki.gnome.org/Apps/FileRoller|{{Pkg|file-roller}}}}<br />
* {{App|LXQt File Archiver|Simple and lightweight desktop-agnostic Qt file archiver.|https://github.com/lxqt/lxqt-archiver|{{Pkg|lxqt-archiver}}}}<br />
* {{App|p7zip-gui|The GUI belonging to the p7zip software.|http://p7zip.sourceforge.net/|{{AUR|p7zip-gui}}}}<br />
* {{App|[[Wikipedia:PeaZip|PeaZip]]|Open source file and archive manager.|https://www.peazip.org/peazip-linux.html|GTK: {{AUR|peazip-gtk2-bin}}, Qt: {{AUR|peazip-qt-bin}}}}<br />
* {{App|[[Wikipedia:Xarchiver|Xarchiver]]|Lightweight desktop independent archive manager built with GTK.|https://github.com/ib/xarchiver|GTK 3: {{Pkg|xarchiver}}, GTK 2: {{Pkg|xarchiver-gtk2}}}}<br />
<br />
==== Comparison, diff, merge ====<br />
<br />
See also [[Wikipedia:Comparison of file comparison tools]].<br />
<br />
For managing ''pacnew''/''pacsave'' files, specialised tools exist. See [[Pacnew and Pacsave files#Managing .pac* files]].<br />
<br />
===== Console =====<br />
<br />
See {{man|1|diff}} from {{Pkg|diffutils}} and [[Core utilities#diff alternatives|its alternatives]].<br />
<br />
* {{App|colordiff|A Perl script wrapper for 'diff' that produces the same output but with pretty 'syntax' highlighting.|https://www.colordiff.org/|{{Pkg|colordiff}}}}<br />
* {{App|diffr|A Rust utility to pretty-print diff with highlighting at word-level for ease of review.|https://github.com/mookid/diffr|{{aur|diffr}}}}<br />
* {{App|ydiff|A Python wrapper to get highlighted diff output from stdin or VCS-tracked file/dirs, in either unfied or side-by-side view.|https://github.com/ymattw/ydiff|{{AUR|ydiff}}}}<br />
* {{App|delta|A diff viewer written in Rust with syntax highlighting.|https://github.com/dandavison/delta|{{AUR|git-delta}}}}<br />
* {{App|diff-so-fancy|A diff output decorator. It does not calculate the diff, it only decorates it.|https://github.com/so-fancy/diff-so-fancy|{{Pkg|diff-so-fancy}}}}<br />
<br />
===== Graphical =====<br />
<br />
* {{App|DiffPDF|Compare the text or the visual appearance of each page in two PDF files.|https://gitlab.com/eang/diffpdf|{{Pkg|diffpdf}}}}<br />
* {{App|Diffuse|Small and simple text merge tool written in Python.|http://diffuse.sourceforge.net/|{{Pkg|diffuse}}}}<br />
* {{App|KDiff3|File and directory diff and merge tool for the KDE desktop.|http://kdiff3.sourceforge.net/|{{Pkg|kdiff3}}}}<br />
* {{App|[[Wikipedia:Kompare|Kompare]]|GUI front-end program for viewing and merging differences between source files. It supports a variety of diff formats and provides many options to customize the information level displayed.|https://www.kde.org/applications/development/kompare/|{{Pkg|kompare}}}}<br />
* {{App|[[Wikipedia:Meld (software)|Meld]]|Visual diff and merge tool that can compare files, directories, and version controlled projects.|http://meldmerge.org/|{{Pkg|meld}}}}<br />
* {{App|xxdiff|A graphical browser for file and directory differences.|http://furius.ca/xxdiff/|{{AUR|xxdiff}}}}<br />
<br />
[[Vim]] and [[Emacs]] provide merge functionality with [[Vim#Merging_files|vimdiff]] and {{ic|ediff}}.<br />
<br />
==== Batch renamers ====<br />
<br />
===== Console =====<br />
<br />
See {{man|1|rename}} from {{Pkg|util-linux}}.<br />
<br />
* {{App|edir|Rename, delete, and copy files and directories using your editor (enhanced vidir).|https://github.com/bulletmark/edir|{{AUR|edir}}}}<br />
* {{App|rename.pl|Batch renamer based on perl regex.|https://search.cpan.org/~pederst/rename/|{{Pkg|perl-rename}}}}<br />
* {{App|vidir|Rename and delete files and directories using your editor.|https://linux.die.net/man/1/vidir|{{AUR|vidir}}}}<br />
<br />
===== Graphical =====<br />
* {{App|[[Wikipedia:GPRename|GPRename]]|GTK batch renamer for files and directories.|http://gprename.sourceforge.net|{{Pkg|gprename}}}}<br />
* {{App|[[Wikipedia:KRename|KRename]]|Very powerful batch file renamer for the KDE desktop.|https://kde.org/applications/utilities/org.kde.krename|{{Pkg|krename}}}}<br />
* {{App|metamorphose2|wxPython based batch renamer with support for regular expressions, renaming multimedia files according to their metadata, etc.|http://file-folder-ren.sourceforge.net|{{AUR|metamorphose2}}}}<br />
* {{App|[[Thunar]] Bulk Rename|Change the name of multiple files at once using some criterion that applies to at least one of the files. Run with {{ic|thunar -B}}.|https://docs.xfce.org/xfce/thunar/bulk-renamer/start|{{Pkg|thunar}}}}<br />
<br />
==== File searching ====<br />
<br />
This section lists utilities for file searching based on filename, file path or metadata. For full-text searching, see the next section.<br />
<br />
See also [[Wikipedia:List of search engines#Desktop search engines]].<br />
<br />
===== Console =====<br />
<br />
See {{man|1|find}} from {{Pkg|findutils}} and [[Core utilities#find alternatives|its alternatives]].<br />
<br />
===== Graphical =====<br />
<br />
* {{App|Catfish|Versatile file searching tool by Xfce, can be powered by find, locate and Zeitgeist.|https://launchpad.net/catfish-search|{{Pkg|catfish}}}}<br />
* {{App|GNOME Search Tool|GNOME utility to search for files, depends on [[GNOME/Files]].|https://gitlab.gnome.org/GNOME/gnome-search-tool|{{Pkg|gnome-search-tool}}}}<br />
* {{App|KFind|Search tool for KDE to find files by name, type or content. Has internal search and supports locate.|https://www.kde.org/applications/utilities/kfind/|{{Pkg|kfind}}}}<br />
* {{App|MATE Search Tool|MATE utility to search for files.|https://github.com/mate-desktop/mate-utils|{{Pkg|mate-utils}}}}<br />
* {{App|regexxer|Interactive search and replace tool featuring Perl-style regular expressions.|http://regexxer.sourceforge.net/|{{Pkg|regexxer}}}}<br />
* {{App|Searchmonkey|Powerful GUI search utility for matching regex patterns.|https://sourceforge.net/projects/searchmonkey/|{{AUR|searchmonkey}}}}<br />
<br />
====== File indexers ======<br />
<br />
These programs index your files to allow for quick searching.<br />
<br />
* {{App|Basenji|Volume indexing tool designed for easy and fast indexing of CD/DVD and other type of volume collections.|https://github.com/pulb/basenji|{{AUR|basenji}}}}<br />
* {{App|fsearch|A fast file search utility for Unix-like systems based on GTK 3.|https://github.com/cboxdoerfer/fsearch|{{AUR|fsearch-git}}}}<br />
<br />
==== Full-text searching ====<br />
<br />
See {{man|1|grep}} from {{Pkg|grep}} and [[Core utilities#grep alternatives|its alternatives]], which provide non-indexed [[Wikipedia:Full-text search|full-text search]].<br />
<br />
===== Full-text indexers =====<br />
<br />
* {{App|[[Baloo]]|KDE's file indexing and search solution, has a CLI and is used by [[KRunner]].|https://community.kde.org/Baloo|{{Pkg|baloo}}}}<br />
* {{App|[[Wikipedia:DocFetcher|DocFetcher]]|Graphical Java desktop search application.|http://docfetcher.sourceforge.net|{{AUR|docfetcher}}}}<br />
* {{App|[[Wikipedia:Recoll|Recoll]]|Full text search tool based on Xapian, has CLI and GUI.|https://lesbonscomptes.com/recoll/|{{Pkg|recoll}}}}<br />
* {{App|[[Wikipedia:Tracker (search software)|Tracker]]|All-in-one indexer, search tool and metadata database, used by [[GNOME]] Documents, Music, Photos and Videos.|https://gnome.pages.gitlab.gnome.org/tracker/|{{Pkg|tracker}}}}<br />
* {{App|[[Zeitgeist]]|Event aggregation framework for the user's activities and notifications (files opened, websites visited, conversations had, etc.), has several third-party front-ends.|https://launchpad.net/zeitgeist-project|{{Pkg|zeitgeist}}}}<br />
<br />
=== Development ===<br />
<br />
==== Code forges ====<br />
<br />
* {{App|[[GitLab]]|Project management and code hosting application.|https://gitlab.com/gitlab-org/gitlab-foss|{{Pkg|gitlab}}}}<br />
* {{App|[[Gitea]]|Painless self-hosted Git service. Community managed fork of Gogs.|https://gitea.io|{{Pkg|gitea}}}}<br />
<br />
===== Code forge clients =====<br />
<br />
* {{App|git-open|Open a repo website (GitHub, GitLab, Bitbucket) in your browser|https://github.com/paulirish/git-open|{{AUR|git-open}}}}<br />
* {{App|github-cli|GitHub's official command line tool|https://github.com/cli/cli|{{Pkg|github-cli}}}}<br />
* {{App|hub|Command line interface for GitHub|https://hub.github.com|{{Pkg|hub}}}}<br />
* {{App|lab|A hub-like tool for GitLab|https://zaquestion.github.io/lab/|{{AUR|lab-bin}}}}<br />
* {{App|snippet|A terminal based interface to create a new GitLab snippet|https://gitlab.com/zj/snippet|{{AUR|snippet}}}}<br />
<br />
==== Version control systems ====<br />
<br />
See also [[Wikipedia:Comparison of revision control software]].<br />
<br />
* {{App|[[Bazaar]]|Distributed version control system that helps you track project history over time and to collaborate easily with others.|https://bazaar.canonical.com/|{{AUR|bzr}}}}<br />
* {{App|[[CVS]]|Concurrent Versions System, a client-server revision control system.|http://cvs.nongnu.org/|{{Pkg|cvs}}}}<br />
* {{App|[[Wikipedia:Darcs|Darcs]]|Distributed revision control system that was designed to replace traditional, centralized source control systems such as CVS and Subversion.|http://darcs.net/|{{Pkg|darcs}}}}<br />
* {{App|[[Wikipedia:Fossil (software)|Fossil]]|Distributed VCS with bug tracking, wiki, forum, and technotes.|https://www.fossil-scm.org/|{{Pkg|fossil}}}}<br />
* {{App|[[Git]]|Distributed revision control and source code management system with an emphasis on speed.|https://git-scm.com/|{{Pkg|git}}}}<br />
* {{App|[[Mercurial]]|Distributed version control system written in Python and similar in many ways to Git.|https://www.mercurial-scm.org/|{{Pkg|mercurial}}}}<br />
* {{App|[[Subversion]]|Full-featured centralized version control system originally designed to be a better CVS.|https://subversion.apache.org/|{{Pkg|subversion}}}}<br />
<br />
==== Build automation ====<br />
<br />
See also [[Wikipedia:List of build automation software]].<br />
<br />
* {{App|[[Wikipedia:Apache Ant|Apache Ant]]|Java library and command-line tool whose mission is to drive processes described in build files as targets and extension points dependent upon each other.|http://ant.apache.org/|{{Pkg|ant}}}}<br />
* {{App|[[Wikipedia:Apache Maven|Apache Maven]]|Build automation tool used primarily for Java.|http://maven.apache.org/|{{Pkg|maven}}}}<br />
* {{App|[[Wikipedia:CMake|CMake]]|Family of tools designed to build, test and package software.|https://cmake.org/|{{Pkg|cmake}}}}<br />
* {{App|[[Wikipedia:Make (software)|GNU make]]|GNU make utility to maintain groups of programs.|https://www.gnu.org/software/make/|{{Pkg|make}} (part of {{Grp|base-devel}})}}<br />
* {{App|[[Wikipedia:Gradle|Gradle]]|Powerful build system for the JVM.|https://gradle.org/|{{Pkg|gradle}}}}<br />
* {{App|Phing|PHP program designed to automate tasks of all kinds.|https://www.phing.info/|{{AUR|phing}}}}<br />
<br />
==== Integrated development environments ====<br />
<br />
See also [[Wikipedia:Comparison of integrated development environments]].<br />
<br />
For PHP specific list, see [[PHP#Development tools]].<br />
<br />
* {{App|[[Android Studio]]|The official Android development environment based on IntelliJ IDEA.|https://developer.android.com/studio/index.html|{{AUR|android-studio}}}}<br />
* {{App|[[Wikipedia:Anjuta|Anjuta]]|Versatile IDE with project management, an application wizard, an interactive debugger, a source editor, version control support and many more tools.|http://anjuta.org/|{{Pkg|anjuta}}}}<br />
* {{App|[[Wikipedia:Aptana#Aptana_Studio|Aptana Studio]]|IDE based on Eclipse, but geared towards web development, with support for HTML, CSS, Javascript, Ruby on Rails, PHP, Adobe AIR and others.|http://www.aptana.com/|{{AUR|aptana-studio}}}}<br />
* {{App|[[Wikipedia:Bluefish (software)|Bluefish]]|Powerful editor targeted towards programmers and webdevelopers, with many options to write websites, scripts and programming code. It supports many programming and markup languages.|http://bluefish.openoffice.nl/|{{Pkg|bluefish}}}}<br />
* {{App|[[Wikipedia:Code::Blocks|Code::Blocks]]|C, C++ and Fortran IDE built to meet the most demanding needs of its users. It is designed to be very extensible and fully configurable.|https://codeblocks.org/|{{Pkg|codeblocks}}}}<br />
* {{App|[[Wikipedia:JetBrains#CLion|CLion]]|A cross-platform IDE for C and C++.|https://www.jetbrains.com/clion/|{{AUR|clion}}}}<br />
* {{App|[[Wikipedia:CodeLite|CodeLite]]|Open source and cross-platform C/C++/PHP and Node.js IDE written in C++ .|https://codelite.org/|{{AUR|codelite}}}}<br />
* {{App|[[Wikipedia:Cloud9 IDE|Cloud9]]|State-of-the-art IDE that runs in your browser and lives in the cloud, allowing you to run, debug and deploy applications from anywhere, anytime.|https://c9.io/|{{AUR|c9.core}}}}<br />
* {{App|[[Eclipse]]|IDE for Java, C/C++, PHP, Perl and Python with subversion support and task management.|https://www.eclipse.org/|Java EE: {{AUR|eclipse-jee}}, Java: {{AUR|eclipse-java}}, C/C++: {{AUR|eclipse-cpp}}, PHP: {{AUR|eclipse-php}}, JavaScript and Web: {{AUR|eclipse-javascript}}, Rust: {{AUR|eclipse-rust}}}}<br />
* {{App|[[Wikipedia:Eric (software)|Eric]]|Full-featured Python and Ruby IDE written in PyQt5.|https://eric-ide.python-projects.org/|{{AUR|eric}}}}<br />
* {{App|[[Gambas]]|IDE based on a Basic interpreter with object extensions.|http://gambas.sourceforge.net/en/main.html|{{Pkg|gambas3-ide}}}}<br />
* {{App|[[Wikipedia:Geany|Geany]]|Small and lightweight IDE with many supported many programming and markup languages including C, Java, PHP, HTML, Python, Perl, Pascal.|https://geany.org/|{{Pkg|geany}}}}<br />
* {{App|[[Wikipedia:GNOME Builder|GNOME Builder]]|Tool to write and contribute to great GNOME-based applications.|https://wiki.gnome.org/Apps/Builder|{{Pkg|gnome-builder}}}}<br />
* {{App|[[Wikipedia:KDevelop|KDevelop]]|Feature-full, plugin extensible IDE for C/C++ and other programming languages.|https://www.kdevelop.org/|{{Pkg|kdevelop}}}}<br />
* {{App|[[Wikipedia:Komodo_Edit|Komodo Edit]]|A free, multi-language editor.|https://www.activestate.com/products/komodo-edit/|{{AUR|komodo-edit}}}}<br />
* {{App|[[Wikipedia:Lazarus (IDE)|Lazarus]]|Delphi (Object Pascal) compatible IDE for Rapid Application Development. It has variety of components ready for use and a graphical form designer to easily create complex graphical user interfaces.|https://www.lazarus-ide.org/|{{Pkg|lazarus}}}}<br />
* {{App|LiteIDE|Simple Go IDE.|https://github.com/visualfc/liteide|{{Pkg|liteide}}}}<br />
* {{App|[[Wikipedia:MonoDevelop|MonoDevelop]]|Cross-platform IDE targeted for the Mono and .NET frameworks.|https://www.monodevelop.com/|{{AUR|monodevelop-git}}}}<br />
* {{App|[[Wikipedia:MPLAB|MPLAB]]|IDE for Microchip PIC and dsPIC development.|https://www.microchip.com/mplabx|{{AUR|microchip-mplabx-bin}}}}<br />
* {{App|[[Netbeans]]|IDE for developing with Java, JavaScript, PHP, Python, Ruby, Groovy, C, C++, Scala, Clojure, and other languages.|https://netbeans.org/|{{Pkg|netbeans}}}}<br />
* {{App|[[Wikipedia:PhpStorm|PhpStorm]]|JetBrains PhpStorm is a commercial, cross-platform IDE for PHP built on JetBrains' IntelliJ IDEA platform, providing an editor for PHP, HTML and JavaScript with on-the-fly code analysis, error prevention and automated refactorings for PHP and JavaScript code.|https://www.jetbrains.com/phpstorm/|{{Aur|phpstorm}} {{Aur|phpstorm-eap}}}}<br />
* {{App|[[Wikipedia:Qt Creator|Qt Creator]]|Lightweight, cross-platform C++ integrated development environment with a focus on Qt.|https://www.qt.io/ide/|{{Pkg|qtcreator}}}}<br />
* {{App|[[Wikipedia:Eclipse_Theia|Theia]]|Eclipse Theia is a free and open-source IDE for desktop and web applications. It is implemented in TypeScript, is based on Visual Studio Code, and emphasizes extensibility. It can be run as a web or a desktop application.|https://theia-ide.org/|{{AUR|theia-electron}}}}<br />
* {{App|[[Visual Studio Code]]|Visual Studio Code is a cross-platform, free and open-source text editor developed by Microsoft, written in JavaScript and TypeScript. It supports a variety of languages thanks to its extensions.|https://code.visualstudio.com/|{{Pkg|code}} {{AUR|visual-studio-code-bin}}}}<br />
<br />
===== Java IDEs =====<br />
<br />
* {{App|[[Wikipedia:BlueJ|BlueJ]]|Fully featured Java IDE used mainly for educational and beginner purposes.|https://bluej.org/|{{AUR|bluej}}}}<br />
* {{App|[[Wikipedia:IntelliJ IDEA|IntelliJ IDEA]]|IDE for Java, Groovy and other programming languages with advanced refactoring features.|https://www.jetbrains.com/idea/|{{Pkg|intellij-idea-community-edition}}}}<br />
<br />
===== Python IDEs =====<br />
<br />
* {{App|[[Wikipedia:Ninja-IDE|Ninja-IDE]]|IDE for Python development.|http://ninja-ide.org/|{{AUR|ninja-ide}}}}<br />
* {{App|[[Wikipedia:PyCharm|PyCharm]]|Python IDE with support for code analysis, debugging, unit testing, version control and web development with Django.|https://www.jetbrains.com/pycharm/|community edition: {{Pkg|pycharm-community-edition}}, professional edition: {{AUR|pycharm-professional}}, edu edition: {{AUR|pycharm-edu}}}}<br />
* {{App|[[Wikipedia:Spyder (software)|Spyder]]|Scientific Python Development Environment providing MATLAB-like features.|https://github.com/spyder-ide/spyder|{{Pkg|spyder}}}}<br />
* {{App|[[Wikipedia:Thonny|Thonny]]|Python IDE for beginners.|https://thonny.org/|{{AUR|thonny}}}}<br />
* {{App|[[Wikipedia:Wing IDE|WingIDE]]|Proprietary Python development environment. It is fully featured and meant for professional use.|https://wingware.com/|{{Aur|wingide}}}}<br />
<br />
===== Educational IDEs =====<br />
<br />
* {{App|[[Wikipedia:Etoys (programming language)|Etoys]]|Educational tool and media-rich authoring environment for teaching children.|http://squeakland.org/|{{AUR|etoys}}}}<br />
* {{App|[[Wikipedia:KTurtle|KTurtle]]|Educational programming environment that aims to make learning how to program as easily as possible. Part of {{Grp|kde-education}}.|https://www.kde.org/applications/education/kturtle/|{{Pkg|kturtle}}}}<br />
* {{App|[[Wikipedia:Processing (programming language)|Processing]]|Playground for teaching non-programmers the fundamentals of computer programming in a visual context.|https://processing.org/|{{AUR|processing}}}}<br />
* {{App|[[Wikipedia:Scratch (programming language)|Scratch]]|Programming system and content development tool for educational and entertainment purposes, such as creating interactive projects and simple sprite-based games. It is used primarly by unskilled users (such as children) as an entry to [[Wikipedia:Event-driven_programming|event-driven programming]].|https://scratch.mit.edu/|{{Pkg|scratch}}}}<br />
<br />
==== Debuggers ====<br />
<br />
* {{App|Accerciser|Interactive Python accessibility explorer. It uses the AT-SPI library to inspect, examine, and interact with widgets, allowing you to check if an application is providing correct information to assistive technologies and automated testing frameworks.|https://wiki.gnome.org/Apps/Accerciser|{{Pkg|accerciser}}}}<br />
* {{App|Bustle|Draws sequence diagrams of D-Bus activity. It shows signal emissions, method calls and their corresponding returns, with time stamps for each individual event and the duration of each method call.|https://www.freedesktop.org/wiki/Software/Bustle/|{{AUR|bustle-git}}}}<br />
* {{App|[[Wikipedia:Data Display Debugger|Data Display Debugger]]|Graphical front-end for command-line debuggers such as GDB.|https://www.gnu.org/software/ddd/|{{AUR|ddd}}}}<br />
* {{App|Desed|TUI-based debugger for sed. Features variable and regex preview, setting breakpoints and stepping back and forth.|https://github.com/SoptikHa2/desed|{{AUR|desed}}}}<br />
* {{App|D-Feet|Easy to use D-Bus debugger to inspect D-Bus interfaces of running programs and invoke methods on those interfaces.|https://wiki.gnome.org/Apps/DFeet|{{Pkg|d-feet}}}}<br />
* {{App|GammaRay|Qt-application inspection and manipulation tool.|https://www.kdab.com/development-resources/qt-tools/gammaray/|{{Pkg|gammaray}}}}<br />
* {{App|KCachegrind|Profile data visualization tool, used to determine the most time consuming execution parts of program.|https://www.kde.org/applications/development/kcachegrind/|KDE: {{Pkg|kcachegrind}}, Qt: {{Pkg|qcachegrind}}}}<br />
* {{App|[[Wikipedia:KDbg|KDbg]]|Graphical user interface to GDB, the GNU debugger. It provides an intuitive interface for setting breakpoints, inspecting variables, and stepping through code.|http://kdbg.org/|{{Pkg|kdbg}}}}<br />
* {{App|Massif-Visualizer|Visualizer for Valgrind Massif data files.|https://phabricator.kde.org/source/massif-visualizer/|{{Pkg|massif-visualizer}}}}<br />
* {{App|[[Wikipedia:Nemiver|Nemiver]]|Easy to use standalone C/C++ debugger (GDB front-end) that integrates well in the GNOME environment.|https://wiki.gnome.org/Apps/Nemiver|{{Pkg|nemiver}}}}<br />
* {{App|Qt QDbusViewer|Tool to introspect D-Bus objects and messages.|https://doc.qt.io/qt-5/qdbusviewer.html|{{Pkg|qt5-tools}}}}<br />
* {{App|scanmem|Debugging utility designed to isolate the address of an arbitrary variable in an executing process.|https://github.com/scanmem/scanmem|CLI: {{Pkg|scanmem}}, GUI: {{Pkg|gameconqueror}}}}<br />
* {{App|Sysprof|Profiling tool that helps in finding the functions in which a program uses most of its time.|https://wiki.gnome.org/Apps/Sysprof|{{Pkg|sysprof}}}}<br />
<br />
==== Lexing and parsing ====<br />
<br />
[[Wikipedia:Lex (software)|Lex]] and [[Wikipedia:Yacc|Yacc]] are part of POSIX.<br />
<br />
* {{App|[[Wikipedia:Flex (lexical analyser generator)|flex]]|A tool for generating text-scanning programs, alternative to Lex.|https://github.com/westes/flex|{{Pkg|flex}}}}<br />
* {{App|[[Wikipedia:Berkeley Yacc|Berkeley Yacc]]|Berkeley reimplementation of the Unix parser generator Yacc.|https://invisible-island.net/byacc/|{{Pkg|byacc}}}}<br />
* {{App|[[Wikipedia:GNU bison|GNU Bison]]|The GNU general-purpose parser generator, alternative to ''byacc''.|https://www.gnu.org/software/bison/|{{Pkg|bison}}}}<br />
<br />
And then there are also:<br />
<br />
* {{App|[[Wikipedia:ANTLR|ANTLR]]|Parser generator, written in Java, for parsing structured text or binary files.|https://www.antlr.org/|{{Pkg|antlr4}}}}<br />
* {{App|LPeg|Pattern-matching library, based on PEGs, for Lua.|http://www.inf.puc-rio.br/~roberto/lpeg/|{{Pkg|lua-lpeg}}, {{Pkg|lua52-lpeg}}, {{Pkg|lua51-lpeg}}}}<br />
* {{App|peg/leg|Recursive-descent parser generators for C.|https://www.piumarta.com/software/peg/|{{Pkg|peg}}}}<br />
* {{App|Ragel|Compiles finite state machines from regular languages into executable C, C++, Objective-C, or D code.|http://www.colm.net/open-source/ragel/|{{Pkg|ragel}}}}<br />
<br />
==== GUI builders ====<br />
<br />
* {{App|[[Wikipedia:FLUID|FLUID]]|FLTK GUI designer.|https://www.fltk.org/|{{Pkg|fltk}}}}<br />
* {{App|[[Wikipedia:Glade Interface Designer|Glade]]|Create or open user interface designs for GTK applications.|https://glade.gnome.org/|{{Pkg|glade}}}}<br />
* {{App|KUIViewer|Quick viewer for Qt Designer UI File.|https://userbase.kde.org/KUIViewer|{{Pkg|kde-dev-utils}}}}<br />
* {{App|Qt Designer|Tool for designing and building graphical user interfaces (GUIs) with Qt Widgets.|https://doc.qt.io/qt-5/qtdesigner-manual.html|{{Pkg|qt5-tools}}}}<br />
<br />
==== Hex editors ====<br />
<br />
See also [[Wikipedia:Comparison of hex editors]].<br />
<br />
* {{App|Bless|High quality, full featured hex editor.|https://web.archive.org/web/20170503150524/http://home.gna.org/bless/|{{Pkg|bless}}}}<br />
* {{App|GHex|Hex editor for GNOME, which allows the user to load data from any file, view and edit it in either hex or ascii.|https://wiki.gnome.org/Apps/Ghex|{{Pkg|ghex}}}}<br />
* {{App|hyx|Minimalistic but powerful console hex editor.|https://yx7.cc/code/|{{AUR|hyx}}}}<br />
* {{App|Reverse Engineer's Hex Editor|Hex editor with features for analyzing and annotating binary file formats|https://github.com/solemnwarning/rehex|{{AUR|rehex}}}}<br />
* {{App|Okteta|KDE hex editor for viewing and editing the raw data of files.|https://www.kde.org/applications/utilities/okteta/|{{Pkg|okteta}}}}<br />
<br />
==== JSON tools ====<br />
<br />
* {{App|gron|gron transforms JSON into discrete assignments to make it easier to grep.|https://github.com/tomnomnom/gron|{{AUR|gron-bin}}}}<br />
* {{App|jid|JSON incremental digger|https://github.com/simeji/jid|{{AUR|jid}}}}<br />
* {{App|jo|A command to create JSON.|https://github.com/jpmens/jo|{{AUR|jo-git}}}}<br />
* {{App|jq|Command-line JSON processor|https://stedolan.github.io/jq/|{{Pkg|jq}}}}<br />
* {{App|jsawk|Like awk, but for JSON.|https://github.com/micha/jsawk|{{AUR|jsawk-git}}}}<br />
* {{App|jshon|A JSON parser for the shell.|http://kmkeen.com/jshon/|{{Pkg|jshon}}}}<br />
* the [[Elvish]] shell has built-in support for JSON<br />
<br />
==== Literate programming ====<br />
<br />
See also [[Wikipedia:Literate programming]].<br />
<br />
* {{App|Noweb|A Simple, Extensible Tool for Literate Programming build against ICON libs and texlive|https://www.cs.tufts.edu/~nr/noweb/|{{AUR|noweb}}}}<br />
* {{App|nuweb|A Simple Literate Programming Tool|http://nuweb.sourceforge.net/|{{AUR|nuweb}}}}<br />
<br />
==== UML modelers ====<br />
<br />
See also [[Wikipedia:List of Unified Modeling Language tools]].<br />
<br />
* {{App|[[Wikipedia:ArgoUML|ArgoUML]]|UML modeling tool with support for all standard UML 1.4 diagrams.|http://argouml.tigris.org/|{{AUR|argouml}}}}<br />
* {{App|[[Eclipse]] Modeling Tools|Tools and runtimes for building model-based applications.|https://www.eclipse.org/|{{AUR|eclipse-modeling-tools}}}}<br />
* {{App|Gaphor|Simple modeling tool for UML.|https://github.com/gaphor/gaphor|{{AUR|python-gaphor}}}}<br />
* {{App|[[Wikipedia:Modelio|Modelio]]|Modeling environment supporting the main standards: UML, BPMN, MDA, SysML.|https://www.modelio.org/|{{AUR|modelio-bin}}}}<br />
* {{App|[[Wikipedia:Papyrus (software)|Papyrus]]|Model-based engineering tool based on Eclipse.|https://www.eclipse.org/papyrus/|{{AUR|papyrus}}}}<br />
* {{App|[[Wikipedia:PlantUML|PlantUML]]|Tool to create UML diagrams from a plain text language.|https://plantuml.com|{{Pkg|plantuml}}}}<br />
* {{App|PlantUML QEditor|PlantUML editor written in Qt.|https://github.com/borco/plantumlqeditor|{{AUR|plantumlqeditor-git}}}}<br />
* {{App|[[Wikipedia:Umbrello UML Modeller|Umbrello]]|Unified Modelling Language (UML) diagram program based on KDE Technology.|https://umbrello.kde.org/|{{Pkg|umbrello}}}}<br />
* {{App|[[Wikipedia:UML Designer|UML Designer]]|Graphical tool based on Eclipse to edit and visualize UML models.|http://www.umldesigner.org/|{{AUR|umldesigner}}}}<br />
* {{App|[[Wikipedia:UMLet|UMLet]]|UML tool with a simple user interface: draw UML diagrams fast, build sequence and activity diagrams from plain text, export diagrams to eps, pdf, jpg, svg, and clipboard, share diagrams using Eclipse, and create new, custom UML elements.|http://umlet.com/|{{AUR|umlet}}}}<br />
* {{App|UML/INTERLIS-editor|Facilitate the application of the model driven approach to a greater number of users.|http://www.umleditor.org/|{{AUR|umleditor}}}}<br />
* {{App|Violet|Very easy to learn and use UML editor that draws nice-looking diagrams.|https://sourceforge.net/projects/violet/|{{AUR|violetumleditor}}}}<br />
<br />
==== API documentation browsers ====<br />
<br />
* {{App|[[Wikipedia:GNOME Devhelp|Devhelp]]|Developer tool for browsing and searching API documentation.|https://wiki.gnome.org/Apps/Devhelp|{{Pkg|devhelp}}}}<br />
* {{App|Doc Browser|API documentation browser with support for DevDocs and Hoogle.|https://github.com/qwfy/doc-browser|{{AUR|doc-browser-git}}}}<br />
* {{App|Qt Assistant|Tool for viewing on-line documentation in Qt help file format.|https://doc.qt.io/qt-5/qtassistant-index.html|{{Pkg|qt5-tools}}}}<br />
* {{App|quickDocs|Fast developer docs reader for reading Valadoc and DevDocs.|https://github.com/mdh34/quickDocs|{{AUR|quickdocs}}}}<br />
* {{App|Zeal|Offline API documentation browser for software developers.|https://zealdocs.org/|{{AUR|zeal}}}}<br />
<br />
==== Issue tracking systems ====<br />
<br />
* {{App|[[Bugzilla]]|Bug tracker from Mozilla.|https://www.bugzilla.org|{{Pkg|bugzilla}}}}<br />
* {{App|[[Flyspray]]|Lightweight, web-based bug tracking system written in PHP|https://www.flyspray.org/|{{Pkg|flyspray}}}}<br />
* {{App|[[MantisBT]]|Web-based issue tracking system|https://www.mantisbt.org/|{{AUR|mantisbt}}}}<br />
* {{App|[[Redmine]]|A flexible project management web application. Written using the Ruby on Rails, it is cross-platform and cross-database.|https://www.redmine.org|{{Pkg|redmine}}}}<br />
* {{App|[[Request Tracker]] (RT)|The leading open-source issue tracking system.|https://bestpractical.com/rt/|{{AUR|rt}}}}<br />
* {{App|[[Trac]]|Trac Integrated SCM & Project Management using Apache & Subversion.|https://trac.edgewall.org/|{{AUR|trac}}}}<br />
<br />
See also [[Git server#Advanced web applications]].<br />
<br />
==== Code review ====<br />
<br />
* {{App|Gerrit|A web-based code review tool built on top of the Git version control system|https://www.gerritcodereview.com/|{{AUR|gerrit}}}}<br />
* [[GitLab]] also supports code reviews.<br />
<br />
See also [[Wikipedia:List of tools for code review]].<br />
<br />
==== Game development ====<br />
<br />
See also [[Wikipedia:List of game engines]].<br />
<br />
* {{App|GDevelop|Game creator designed to be used by everyone - no programming skills required.|https://gdevelop-app.com/|{{AUR|gdevelop}}}}<br />
* {{App|[[Godot]]|Advanced, feature-packed, multi-platform 2D and 3D game engine. Create games with ease, using Godot's unique approach to game development.|https://godotengine.org/|{{Pkg|godot}}}}<br />
* {{App|LibreSprite|Animated sprite editor and pixel art tool lets you create 2D animations for videogames.|https://github.com/LibreSprite/LibreSprite|{{AUR|libresprite}}}}<br />
* {{App|Pixelorama|2D sprite editor with animation support, made by Orama Interactive in the Godot Engine using GDScript.|https://www.orama-interactive.com/pixelorama|{{AUR|pixelorama-bin}}}}<br />
* {{App|Tiled|General purpose 2D level editor with powerful tile map editing features. It’s built to be easy to use and is suitable for many type of games.|https://www.mapeditor.org/|{{Pkg|tiled}}}}<br />
* {{App|[[Unity3D|Unity]]|Unity is a flexible and powerful development platform for creating multi-platform 3D and 2D games. Proprietary, but a free version is available for certain use-cases (see [https://store.unity.com/compare-plans here] for more details).|https://unity3d.com/unity|{{AUR|unity-editor}}}}<br />
<br />
==== Repository managers ====<br />
<br />
{{Style|Redirects to company blogs should not be here.}}<br />
<br />
* {{App|Nexus 2|Nexus 2 Repository Manager (OSS)|https://www.sonatype.com/nexus-repository-oss|{{AUR|nexus}}}}<br />
* {{App|Nexus 3|Nexus 3 Repository OSS|https://www.sonatype.com/nexus-repository-oss|{{AUR|nexus-oss}}}}<br />
* {{App|Artifactory|Artifactory is an advanced Binary Repository Manager for use by build tools, dependency management tools and build servers|https://bintray.com/jfrog/product/JFrog-Artifactory-Oss/view|{{AUR|artifactory-oss}}}}<br />
<br />
=== Text input ===<br />
<br />
==== Character selectors ====<br />
<br />
* {{App|GNOME Characters|Character map application for GNOME.|https://gitlab.gnome.org/GNOME/gnome-characters|{{Pkg|gnome-characters}}}}<br />
* {{App|[[Wikipedia:GNOME Character Map|gucharmap]]|GTK 3 character selector for GNOME.|https://wiki.gnome.org/Apps/Gucharmap|{{pkg|gucharmap}}}}<br />
* {{App|KCharSelect|Tool to select special characters from all installed fonts and copy them into the clipboard. Part of {{Grp|kde-utilities}}.|https://utils.kde.org/projects/kcharselect/|{{Pkg|kcharselect}}}}<br />
<br />
==== On-screen keyboards ====<br />
<br />
* {{App|CellWriter|Grid-entry handwriting recognition input panel.|https://github.com/risujin/cellwriter|{{AUR|cellwriter}}}}<br />
* {{App|eekboard|Easy to use virtual keyboard toolkit.|https://github.com/ueno/eekboard|{{AUR|eekboard}}}}<br />
* {{App|Florence|Extensible scalable on-screen virtual keyboard for GNOME that stays out of your way when not needed.|https://sourceforge.net/projects/florence/|{{AUR|florence}}}}<br />
* {{App|Onboard|Onscreen keyboard useful for tablet PC users and for mobility impaired users.|https://launchpad.net/onboard|{{Pkg|onboard}}}}<br />
* {{App|qtvkbd|Virtual keyboard written in Qt, a fork of kvkbd.|https://github.com/Alexander-r/qtvkbd|{{AUR|qtvkbd}}}}<br />
* {{App|QVKbd|Virtual keyboard written in Qt.|https://github.com/KivApple/qvkbd|{{Pkg|qvkbd}}}}<br />
* {{App|Squeekboard|GTK 3 virtual keyboard for [[Wayland]], written in Rust/C.|https://source.puri.sm/Librem5/squeekboard|{{AUR|squeekboard}}}}<br />
* {{App|theShell On Screen Keyboard|Touchscreen keyboard for theShell.|https://github.com/vicr123/ts-kbd|{{AUR|ts-kbd}}}}<br />
* {{App|xvkbd|Virtual keyboard for X window system.|http://t-sato.in.coocan.jp/xvkbd/|{{AUR|xvkbd}}}}<br />
<br />
==== Keyboard layout switchers ====<br />
<br />
* {{App|fbxkb|A NETWM compliant keyboard indicator and switcher. It shows a flag of current keyboard in a systray area and allows you to switch to another one.|http://fbxkb.sourceforge.net/|{{AUR|fbxkb}}}}<br />
* {{App|xxkb|A lightweight keyboard layout indicator and switcher.|https://sourceforge.net/projects/xxkb/|{{Pkg|xxkb}}}}<br />
* {{App|gxkb|X11 keyboard layout indicator and switcher.|https://github.com/zen-tools/gxkb|{{Pkg|gxkb}}}}<br />
* {{App|qxkb|A keyboard switcher written in Qt.|https://github.com/disels/qxkb|{{AUR|qxkb}}}}<br />
* {{App|[[Wikipedia:X Neural Switcher|X Neural Switcher]]|A text analyser, it detects the language of the input and corrects the keyboard layout if needed.|https://xneur.ru/|{{AUR|gxneur}} (GUI)}}<br />
<br />
==== Keybinding managers ====<br />
<br />
See [[Keyboard shortcuts#Xorg]].<br />
<br />
==== Input methods ====<br />
<br />
See the main article: [[Input method]].<br />
<br />
=== Disks ===<br />
<br />
==== Partitioning tools ====<br />
<br />
See [[Partitioning#Partitioning tools]].<br />
<br />
==== Formatting tools ====<br />
<br />
See [[File systems#Types of file systems]].<br />
<br />
==== Cloning tools ====<br />
<br />
See [[Disk cloning#Disk cloning software]].<br />
<br />
==== Mount tools ====<br />
<br />
See also [[udisks#Mount helpers]].<br />
<br />
* {{App|9mount|Mount 9p filesystems.|http://sqweek.net/code/9mount/|{{AUR|9mount}}}}<br />
* {{App|cryptmount|Mount an encrypted file system as a regular user.|https://sourceforge.net/projects/cryptmount/|{{AUR|cryptmount}}}}<br />
* {{App|KDiskFree|Displays information about hard disks and other storage devices. It also allows to mount and unmount drives and view them in a file manager.|https://kde.org/applications/en/system/org.kde.kdf|{{Pkg|kdf}}}}<br />
* {{App|ldm|A lightweight daemon that mounts drives automagically using ''udev''|https://github.com/LemonBoy/ldm|{{AUR|ldm}}}}<br />
* {{App|pmount|Mount ''source'' as a regular user to an automatically created destination {{ic|/media/''source_name''}}.|https://wiki.debian.org/pmount|{{AUR|pmount}}}}<br />
* {{App|pmount-safe-removal|Mount removable devices as regular user with safe removal|https://mywaytoarch.tumblr.com/post/13111098534/pmount-safe-removal-of-usb-device|{{AUR|pmount-safe-removal}}}}<br />
* {{App|udevil|Mounts removable devices as a regular user, show device info, and monitor device changes. Only depends on ''udev'' and glib.|https://ignorantguru.github.io/udevil|{{Pkg|udevil}}}}<br />
* {{App|ws|Mount Windows network shares ([[Wikipedia:Server Message Block|CIFS]] and [[Wikipedia:Virtual file system|VFS]]).|https://sourceforge.net/projects/winshares/|{{AUR|ws}}}}<br />
* {{App|zulucrypt|A GUI frontend for cryptsetup to create, manage and mount encrypted volumes; supports encfs as well|https://mhogomchungu.github.io/zuluCrypt/|{{AUR|zulucrypt}}}}<br />
<br />
==== Disk usage display ====<br />
<br />
===== Console =====<br />
<br />
* {{App|duc|A library and suite of tools for inspecting disk usage.|https://duc.zevv.nl/|{{AUR|duc}}}}<br />
* {{App|gdu|Disk usage analyzer with console interface written in Go.|https://github.com/Dundee/gdu|{{AUR|gdu}}}}<br />
* {{App|gt5|Diff-capable "du-browser".|http://gt5.sourceforge.net|{{AUR|gt5}}}}<br />
* {{App|ncdu|Simple ncurses disk usage analyzer.|https://dev.yorhel.nl/ncdu|{{Pkg|ncdu}}}}<br />
<br />
===== Graphical =====<br />
* {{App|[[Wikipedia:Filelight|Filelight]]|Disk usage analyzer that creates an interactive map of concentric, segmented rings that help visualise disk usage on your computer.|https://www.kde.org/applications/utilities/filelight|{{Pkg|filelight}}}}<br />
* {{App|[[Wikipedia:Disk Usage Analyzer|GNOME Disk Usage Analyzer]]|Disk usage analyzer for the [[GNOME]] desktop to check folder sizes and available disk space.|https://wiki.gnome.org/Apps/DiskUsageAnalyzer|{{Pkg|baobab}}}}<br />
* {{App|Graphical Disk Map|Disk usage analyzer that draws a map of rectangles sized according to file or dir sizes.|http://gdmap.sourceforge.net/|{{Pkg|gdmap}}}}<br />
* {{App|MATE Disk Usage Analyzer|Disk usage analyzing tool for MATE Desktop.|https://github.com/mate-desktop/mate-utils|{{Pkg|mate-utils}}}}<br />
* {{App|qdirstat|Qt-based directory statistics (KDirStat/K4DirStat without any KDE - from the original KDirStat author).|https://github.com/shundhammer/qdirstat|{{AUR|qdirstat}}}}<br />
<br />
==== Disk health status ====<br />
<br />
See [[S.M.A.R.T.#GUI applications]].<br />
<br />
==== File recovery tools ====<br />
<br />
See [[File recovery#List of utilities]].<br />
<br />
==== Disk cleaning ====<br />
<br />
===== Console =====<br />
<br />
* {{App|duff|A command-line utility for quickly finding duplicates in a given set of files.|https://github.com/elmindreda/duff|{{AUR|duff}}}}<br />
* {{App|fclones|Very fast duplicate file Finder written in rust.|https://github.com/pkolaczk/fclones|{{AUR|fclones-git}}}}<br />
* {{App|[[Wikipedia:fdupes|fdupes]]|Program for identifying or deleting duplicate files residing within specified directories.|https://github.com/adrianlopezroche/fdupes|{{Pkg|fdupes}}}}<br />
* {{App|jdupes|Identify and take actions upon duplicate files.|https://github.com/jbruchon/jdupes|{{AUR|jdupes}}}}<br />
* {{App|rdfind|Command line tool that finds duplicate files. It compares files based on their content.|https://github.com/pauldreik/rdfind|{{AUR|rdfind}}}}<br />
* {{App|rmlint|Tool to quickly find (and optionally remove) duplicate files and other lint.|https://github.com/sahib/rmlint|{{Pkg|rmlint}}}}<br />
<br />
===== Graphical =====<br />
<br />
* {{App|[[Wikipedia:BleachBit|BleachBit]]|Frees disk space and guards your privacy; frees cache, deletes cookies, clears Internet history, shreds temporary files, deletes logs, and discards junk you did not know was there.|https://www.bleachbit.org/|{{Pkg|bleachbit}}}}<br />
* {{App|dupeGuru|GUI tool to find duplicate files in a system.|https://dupeguru.voltaicideas.net/|{{AUR|dupeguru}}}}<br />
* {{App|FSlint|A utility to find and clean various forms of lint on a filesystem.|https://www.pixelbeat.org/fslint/|{{AUR|fslint}}}}<br />
* {{App|GConf Cleaner|cleans up the unknown/invalid GConf keys that still sitting down on your GConf database.|https://code.google.com/archive/p/gconf-cleaner/|{{AUR|gconf-cleaner}}}}<br />
* {{App|Shredder|Graphical user interface for rmlint.|https://github.com/sahib/rmlint|{{Pkg|rmlint-shredder}}}}<br />
* {{App|Sweeper|System cleaning utility for KDE.|https://kde.org/applications/utilities/org.kde.sweeper/|{{Pkg|sweeper}}}}<br />
<br />
==== Disk image writing ====<br />
<br />
See also [[Wikipedia:List of tools to create Live USB systems]].<br />
<br />
{{Warning|Some disk image writing tools are known to be [[w:adware|adware]], for example [https://github.com/balena-io/etcher/issues/2057 etcher].}}<br />
<br />
* {{App|Deepin Boot Maker|Tool to make boot disk for Deepin OS.|https://www.deepin.org/en/original/deepin-boot-maker/|{{Pkg|deepin-boot-maker}}}}<br />
* {{App|[[Wikipedia:Fedora Media Writer|Fedora Media Writer]]|Tool that helps users put Fedora images on their portable drives such as flash disks.|https://github.com/FedoraQt/MediaWriter|{{AUR|mediawriter}}}}<br />
* {{App|GNOME MultiWriter|Write an ISO file to multiple USB devices at once.|https://wiki.gnome.org/Apps/MultiWriter|{{Pkg|gnome-multi-writer}}}}<br />
* {{App|Image Burner|Simple imageburner designed for elementary OS.|https://github.com/artemanufrij/imageburner|{{AUR|imageburner}}}}<br />
* {{App|ISOImageWriter|Tool to write a .iso file to a USB disk.|https://community.kde.org/ISOImageWriter|{{AUR|isoimagewriter}}}}<br />
* {{App|LiveUSB Install|Install various Linux distributions and operating systems on removable flash drive or external disk drive.|http://live.learnfree.eu/|{{AUR|live-usb-install}}}}<br />
* {{App|MultiBootUSB|Install multiple live Linux on a USB disk non destructively and option to uninstall distros.|http://multibootusb.org/|{{AUR|multibootusb}}}}<br />
* {{App|MultiSystem|GUI tool to create a USB system that can boot multiple distro's.|http://liveusb.info/|{{AUR|multisystem}}}}<br />
* {{App|Popsicle|Utility for flashing multiple USB devices in parallel, written in Rust.|https://github.com/pop-os/popsicle|{{AUR|popsicle-git}}}}<br />
* {{App|[[Wikipedia:SUSE Studio ImageWriter|SUSE Studio ImageWriter]]|Utility for writing raw disk images & hybrid isos to USB keys.|https://github.com/openSUSE/imagewriter|{{AUR|imagewriter}}}}<br />
* {{App|[[Wikipedia:UNetbootin|UNetbootin]]|Installs Linux/BSD distributions to a partition or USB drive.|https://unetbootin.github.io/|{{AUR|unetbootin}}}}<br />
* {{App|WoeUSB|Simple tool to create USB stick windows installer from an ISO image or a real DVD. (Fork of WinUSB).|https://github.com/WoeUSB/WoeUSB-frontend-wxgtk| {{AUR|woeusb}}}}<br />
* {{App|windows2usb|Windows 7/8/8.1/10 ISO to Flash Drive burning utility for Linux with MBR/GPT, BIOS/UEFI, FAT32/NTFS support|https://github.com/ValdikSS/windows2usb|{{AUR|windows2usb-git}}}}<br />
<br />
=== System ===<br />
<br />
==== Task managers ====<br />
<br />
* {{App|Deepin System Monitor|Monitor system process status for Deepin desktop.|https://www.deepin.org/en/original/deepin-system-monitor/|{{Pkg|deepin-system-monitor}}}}<br />
* {{App|GNOME System Monitor|System monitor for [[GNOME]] to view and manage system resources.|https://wiki.gnome.org/Apps/SystemMonitor|{{Pkg|gnome-system-monitor}}}}<br />
* {{App|GNOME Usage|View information about use of system resources, like memory and disk space.|https://wiki.gnome.org/Apps/Usage|{{Pkg|gnome-usage}}}}<br />
* {{App|[[Wikipedia:Htop|htop]]|Simple, ncurses interactive process viewer.|http://htop.sourceforge.net/|{{Pkg|htop}}}}<br />
* {{App|bpytop|Htop but more lightweight with more features.|https://github.com/aristocratos/bpytop|{{Pkg|bpytop}}}}<br />
* {{App|[[Wikipedia:KDE System Guard|KSysGuard]]|System monitor for [[KDE]] to monitor running processes and system performance.|https://userbase.kde.org/KSysGuard|{{Pkg|ksysguard}}}}<br />
* {{App|Linux Process Explorer|Graphical process explorer for Linux.|https://sourceforge.net/projects/procexp/|{{AUR|procexp}}}}<br />
* {{App|LXTask|Lightweight task manager for [[LXDE]].|https://wiki.lxde.org/en/LXTask|{{Pkg|lxtask}}}}<br />
* {{App|qps|Lightweight task manager for [[LXQt]].|https://github.com/lxqt/qps|{{AUR|qps}}}}<br />
* {{App|MATE System Monitor|System monitor for [[MATE]].|https://github.com/mate-desktop/mate-system-monitor|{{Pkg|mate-system-monitor}}}}<br />
* {{App|Stacer|System optimizer and application monitor that helps users to manage entire system with different aspects, its an all in one system utility.|https://oguzhaninan.github.io/Stacer-Web/|{{AUR|stacer}}}}<br />
* {{App|Task Manager|GTK2/GTK3 based process manager with basic system resource monitor for [[Xfce]].|https://goodies.xfce.org/projects/applications/xfce4-taskmanager|{{Pkg|xfce4-taskmanager}}}}<br />
<br />
==== System monitors ====<br />
<br />
See also [[:Category:Monitoring]].<br />
<br />
* {{App|[[Conky]]|Lightweight, scriptable system monitor.|https://github.com/brndnmtthws/conky|{{Pkg|conky}}}}<br />
* {{App|Collectd|Simple, extensible system monitoring daemon based on [http://oss.oetiker.ch/rrdtool/ rrdtool]. It has a small footprint and can be set up either stand-alone or as a server/client application.|https://collectd.org/|{{Pkg|collectd}}}}<br />
* {{App|collectl|Collectl is a light-weight performance monitoring tool capable of reporting interactively as well as logging to disk. It reports statistics on cpu, disk, infiniband, lustre, memory, network, nfs, process, quadrics, slabs and more in easy to read format.|http://collectl.sourceforge.net/|{{AUR|collectl}}}}<br />
* {{App|dstat|Versatile resource statistics tool.|http://dag.wiee.rs/home-made/dstat/|{{Pkg|dstat}}}}<br />
* {{App|Fsniper|Daemon to run scripts based on changes in files monitored by inotify.|https://github.com/l3ib/fsniper|{{AUR|fsniper}}}}<br />
* {{App|[[Wikipedia:GKrellM|GKrellM]]|Simple, flexible system monitor package for [[GTK]] with many plug-ins.|https://billw2.github.io/gkrellm/gkrellm.html|{{Pkg|gkrellm}}}}<br />
* {{App|glances|CLI curses-based monitoring tool in Python.|https://nicolargo.github.io/glances/|{{Pkg|glances}}}}<br />
* {{App|kmon|Linux kernel manager and activity monitor.|https://github.com/orhun/kmon|{{Pkg|kmon}}}}<br />
* {{App|Nagstamon|Status monitor that connects to multiple Nagios, Icinga, Opsview, Centreon, Op5 Monitor/Ninja, Checkmk and Thruk monitoring servers.|https://github.com/orhun/kmon|{{AUR|nagstamon}}}}<br />
* {{App|netdata|Web-based real-time performance monitor.|https://github.com/firehol/netdata/wiki|{{Pkg|netdata}}}}<br />
* {{App|[[Telegraf]]|Agent written in Go for collecting, processing, aggregating, and writing metrics.|https://docs.influxdata.com/telegraf/latest/|{{AUR|telegraf}}}}<br />
* {{App|[[Paramano]]|Light battery monitor and a CPU frequency scaler. Forked from [http://trayfreq.sourceforge.net/ trayfreq]|https://github.com/phillid/paramano|{{AUR|paramano}}}}<br />
* {{app|Sysstat|Collection of resource monitoring tools: iostat, isag, mpstat, pidstat, sadf, sar.|http://sebastien.godard.pagesperso-orange.fr/|{{Pkg|sysstat}}}}<br />
* {{App|xosview|System monitor that resembles gr_osview from SGI IRIX.|http://www.pogo.org.uk/~mark/xosview/|{{AUR|xosview}}}}<br />
* {{App|zps|A small utility for listing and reaping zombie processes on GNU/Linux.|https://github.com/orhun/zps|{{Pkg|zps}}}}<br />
<br />
==== Hardware sensor monitoring ====<br />
<br />
See [[lm_sensors#Graphical front-ends]].<br />
<br />
==== System information viewers ====<br />
<br />
===== Console =====<br />
<br />
* {{App|alsi|A system information tool for Arch Linux. It can be configured for every other system without even touching the source code of the script.|https://trizenx.blogspot.com/2012/08/alsi.html|{{AUR|alsi}}}}<br />
* {{App|[[archey3]]|Python script to display system infomation alongside the Arch Linux logo.|https://lclarkmichalek.github.io/archey3|{{Pkg|archey3}}}}<br />
* {{App|dmidecode|It reports information about your system's hardware as described in your system BIOS according to the SMBIOS/DMI standard.|http://www.nongnu.org/dmidecode/|{{Pkg|dmidecode}}}}<br />
* {{App|hwdetect|Simple script to list modules that are exported in {{ic|/sys/}}.|https://projects.archlinux.org/|{{Pkg|hwdetect}}}}<br />
* {{App|hwinfo|Powerful hardware detection tool come from openSUSE.|https://github.com/openSUSE/hwinfo|{{Pkg|hwinfo}}}}<br />
* {{App|hw-probe|Tool to probe for hardware, check operability and find drivers with the help of [https://linux-hardware.org/ Linux Hardware Database].|https://github.com/linuxhw/hw-probe|{{AUR|hw-probe}}}}<br />
* {{App|inxi|A script to get system information.|https://github.com/smxi/inxi|{{AUR|inxi}}}}<br />
* {{App|neofetch|A fast, highly customizable system info script that supports displaying images with w3m.|https://github.com/dylanaraps/neofetch|{{Pkg|neofetch}}}}<br />
* {{App|nmon|Console based application for monitoring various system components.|http://nmon.sourceforge.net/|{{Pkg|nmon}}}}<br />
* {{App|pfetch|A pretty system information tool written in POSIX sh.|https://github.com/dylanaraps/pfetch|{{AUR|pfetch}}}}<br />
* {{App|screenfetch|Similar to archey but has an option to take a screenshot. Written in bash.|https://github.com/KittyKatt/screenFetch|{{Pkg|screenfetch}}}}<br />
<br />
===== Graphical =====<br />
<br />
* {{App|GPU-Viewer|GUI to glxinfo, vulkaninfo, clinfo and es2_info; written in Python with GTK.|https://github.com/arunsivaramanneo/GPU-Viewer|{{AUR|gpu-viewer}}}}<br />
* {{App|hardinfo|A small application that displays information about your hardware and operating system, it looks like the Device Manager in Windows.|https://www.berlios.de/software/hardinfo/|{{Pkg|hardinfo}}}}<br />
* {{App|i-Nex|An application that gathers information for hardware components available on your system and displays it using an user interface similar to the popular Windows tool CPU-Z.|http://i-nex.linux.pl/|{{AUR|i-nex-git}}}}<br />
* {{App|lshw|A small tool to provide detailed information on the hardware configuration of the machine with CLI and GTK interfaces.|https://ezix.org/project/wiki/HardwareLiSter|{{Pkg|lshw}}}}<br />
* {{App|[[Wikipedia:KInfoCenter|KInfoCenter]]|Centralized and convenient overview of system information for KDE.|https://userbase.kde.org/KInfoCenter|{{Pkg|kinfocenter}}}}<br />
* {{App|USBView|Display the topology of devices on the USB bus.|http://www.kroah.com/linux/usb/|{{Pkg|usbview}}}}<br />
<br />
==== System log viewers ====<br />
<br />
* {{App|GNOME Logs|Viewer for the systemd journal. Part of {{Grp|gnome}}.|https://wiki.gnome.org/Apps/Logs|{{Pkg|gnome-logs}}}}<br />
* {{App|GNOME System Log|System log viewer for GNOME.|https://gitlab.gnome.org/GNOME/gnome-system-log|{{Pkg|gnome-system-log}}}}<br />
* {{App|KSystemLog|System log viewer tool for KDE.|https://www.kde.org/applications/system/ksystemlog/|{{Pkg|ksystemlog}}}}<br />
* {{App|MATE System Log|System log viewer for MATE.|https://github.com/mate-desktop/mate-utils|{{Pkg|mate-utils}}}}<br />
* {{App|Pacman Log Viewer|Tool used to inspect pacman log file, in particular it lists installed, removed and upgraded packages letting you to filter by package's name and/or date.|https://www.opendesktop.org/content/show.php?content&#61;150484|{{Pkg|pacmanlogviewer}}}}<br />
* {{App|QJournalctl|Qt-based graphical user interface for systemd's journalctl command.|https://github.com/pentix/qjournalctl|{{Pkg|qjournalctl}}}}<br />
<br />
==== Font viewers ====<br />
<br />
See also [[Wikipedia:Font management software]].<br />
* {{App|Font Manager|Simple font management for GTK desktop environments.|https://fontmanager.github.io/|{{AUR|font-manager}}}}<br />
* {{App|Fonty Python|Manage, view and find your fonts.|https://savannah.nongnu.org/projects/fontypython|{{AUR|fontypython}}}}<br />
* {{App|GNOME Fonts|Font viewer for GNOME.|https://gitlab.gnome.org/GNOME/gnome-font-viewer|{{Pkg|gnome-font-viewer}}}}<br />
* {{App|KFontview|KDE application to view and install different types of fonts.|https://docs.kde.org/trunk5/en/kde-workspace/kfontview/index.html|{{Pkg|plasma-desktop}}}}<br />
* {{App|MATE Font Viewer|Font viewer for MATE.|https://github.com/mate-desktop/mate-control-center|{{Pkg|mate-utils}}}}<br />
<br />
==== Help viewers ====<br />
<br />
See [[man page#Installation]].<br />
<br />
==== Command schedulers ====<br />
<br />
See also [[Cron]].<br />
<br />
* {{App|FcronQ|Fcron GUI, an advanced periodic command scheduler.|http://fcronq.xavion.name/|{{AUR|fcronq}}}}<br />
* {{App|GNOME Schedule|Graphical interface to crontab and at for GNOME.|http://gnome-schedule.sourceforge.net/|{{AUR|gnome-schedule}}}}<br />
* {{App|KCron|Tool for KDE to run applications in the background at regular intervals. It's a graphical interface to the Cron command.|https://userbase.kde.org/System_Settings/Task_Scheduler|{{Pkg|kcron}}}}<br />
* {{App|KTimer|Little tool for KDE to execute programs after some time. It allows you to enter several tasks and to set a timer for each of them. The timers for each task can be started, stopped, changed, or looped.|https://www.kde.org/applications/utilities/ktimer/|{{Pkg|ktimer}}}}<br />
<br />
==== Shutdown timers ====<br />
<br />
* {{App|GShutdown|Advanced shutdown utility which allows you to schedule the shutdown or the restart of your computer, or logout your actual session.|https://gshutdown.tuxfamily.org/|{{AUR|gshutdown}}}}<br />
* {{App|Hsiu-Ming's Timer|Graphical shutdown timer, which enables you to shutdown, turn off monitor, reboot or play sound after a period of time.|https://cges30901.github.io/hmtimer-website/|{{AUR|hmtimer}}}}<br />
* {{App|KShutdown|Graphical shutdown utility, which allows you to turn off or suspend a computer at a specified time. It features various time and delay options, command-line support, and notifications.|https://kshutdown.sourceforge.io/|{{Pkg|kshutdown}}}}<br />
<br />
==== Clock synchronization ====<br />
<br />
See [[Time synchronization]].<br />
<br />
==== Screen management ====<br />
<br />
See [[Xrandr#Graphical front-ends]].<br />
<br />
==== Backlight management ====<br />
<br />
See [[Backlight#Backlight utilities]].<br />
<br />
==== Color management ====<br />
<br />
See [[ICC profiles#Utilities]] and [[Backlight#Color correction]].<br />
<br />
==== Printer management ====<br />
<br />
See [[CUPS#GUI applications]].<br />
<br />
==== Bluetooth management ====<br />
<br />
See [[Bluetooth#Front-ends]].<br />
<br />
==== Power management ====<br />
<br />
See [[Power management#Userspace tools]].<br />
<br />
==== System management ====<br />
<br />
See [[Systemd#GUI configuration tools]].<br />
<br />
==== Boot management ====<br />
<br />
See [[GRUB/Tips and tricks#GUI configuration tools]].<br />
<br />
==== Package management ====<br />
<br />
See [[pacman tips#Utilities]].<br />
<br />
==== Virtualization ====<br />
<br />
See [[Libvirt#Client]] and [[VirtualBox]].<br />
<br />
==== Compatibility layers ====<br />
<br />
See [[Wine]] (Windows) and [https://www.darlinghq.org/ Darling] (MacOS).</div>Pdchttps://wiki.archlinux.org/index.php?title=Booster&diff=654496Booster2021-03-11T09:01:51Z<p>Pdc: /* rEFInd */ Put "linux" last in extra_kernel_version_strings; see https://www.rodsbooks.com/refind/configfile.html#adjusting</p>
<hr />
<div>[[Category:Initramfs]]<br />
[[Category:Kernel]]<br />
[[ja:Booster]]<br />
{{Related articles start}}<br />
{{Related|Kernel modules}}<br />
{{Related|Minimal initramfs}}<br />
{{Related|Boot debugging}}<br />
{{Related|Mkinitcpio}}<br />
{{Related|dracut}}<br />
{{Related articles end}}<br />
<br />
[https://github.com/anatol/booster Booster] is a fast [[initramfs]] generator similar to [[mkinitcpio]] and [[dracut]].<br />
Booster is inspired by [https://michael.stapelberg.ch/posts/2020-01-21-initramfs-from-scratch-golang/ distri project] and aims to create a small and fast init image.<br />
<br />
Booster consists of two major components:<br />
<br />
* Initramfs generator {{ic|/usr/bin/booster}} user-space tool. It is responsible for initramfs image generation.<br />
* Generated images that are usually located at {{ic|/boot/}} and used by the system boot loader to boot Linux OS.<br />
<br />
== Install ==<br />
<br />
[[Install]] {{pkg|booster}}. The package installation hook will generate initramfs images, one per installed kernel (e.g. for {{Pkg|linux}}, {{Pkg|linux-lts}}). The images are located under {{ic|/boot}} directory:<br />
<br />
{{hc|$ ls -lh /boot/booster*|<br />
-rwxr-xr-x 1 root root 4.0M Dec 16 16:20 /boot/booster-linux.img<br />
}}<br />
<br />
Or the image can be built manually:<br />
<br />
$ booster -output mybooster.img<br />
<br />
== Configuration ==<br />
<br />
Booster generator configuration is located at {{ic|/etc/booster.yaml}}. If there is no configuration file then the default configuration (host-specific images, no network) is used.<br />
<br />
The configuration file helps to override the default behaviour. Here is a sample configuration:<br />
<br />
{{hc|/etc/booster.yaml|<br />
network:<br />
dhcp: on<br />
# 'dhcp' cannot be used together with 'ip'<br />
ip: 10.0.2.15/24<br />
gateway: 10.0.2.255<br />
universal: false<br />
modules: nvidia,kernel/sound/usb/<br />
compression: none<br />
}}<br />
<br />
{{ic|network}} is for network configuration. If this node is omitted then no network is initialized at the boot time. The network can be configured with static ip (nodes {{ic|ip}} and {{ic|gateway}}) or with dhcp4 (node {{ic|dhcp}}).<br />
<br />
{{ic|universal}} option enables universal images. Universal images include a large set of kernel drivers/tools. By default a host-specific image is generated, such images contain modules used by the current host only.<br />
<br />
{{ic|modules}} adds extra modules to the generated image. You can use reference modules either by its name or file path or path to directory with modules (directory name always ends with {{ic|/}} symbol). Note that the booster generator resolves module dependencies and adds them to the image as well.<br />
<br />
{{ic|compression}} specifies compression for the output image. By default {{ic|zstd}} is used. Other possible values are {{ic|gzip}} and {{ic|none}}.<br />
<br />
== Boot loader configuration ==<br />
<br />
Once the image is generated it is time to configure the [[boot loader]].<br />
<br />
=== rEFInd ===<br />
[[rEFInd]] supports [https://sourceforge.net/p/refind/code/ci/778878f7f30f68b7fa0282074e5dd8fc5894a212/ configurationless detection] by telling it the kernel names the machine has, e.g.:<br />
<br />
> cat /efi/EFI/Boot/refind.conf<br />
extra_kernel_version_strings linux-hardened,linux-lts,linux-zen,linux-git,linux<br />
fold_linux_kernels false<br />
default_selection "linux from"<br />
<br />
=== systemd-boot ===<br />
<br />
To enable the new initramfs image with [[systemd-boot]] simply create a new boot loader entry like this one:<br />
<br />
{{hc|/boot/loader/entries/booster.conf|2=<br />
title Arch Linux with booster<br />
linux /vmlinuz-linux<br />
initrd /booster-linux.img<br />
options root=UUID=08f83949-bcbb-47bb-bc17-089aaa59e17e rw<br />
}}<br />
<br />
Where the root filesystem is referenced by {{ic|1=UUID=08f83949-bcbb-47bb-bc17-089aaa59e17e}}. To find your root device UUID run {{ic|blkid /dev/''ROOTDEVICE''}}. <br />
<br />
== Enable encryption ==<br />
<br />
Booster supports LUKS based full disk encryption out of the box. Generator does not need any extra configuration. And for initramfs you need to append information about the LUKS partition where the root resides. This is done with either {{ic|1=rd.luks.uuid=''LUKSUUID''}} or {{ic|1=rd.luks.name=''LUKSUUID''=''LUKSNAME''}} [[kernel parameter]] that you need to specify in your boot loader configuration file. {{ic|''LUKSUUID''}} specifies [[UUID]] of the encrypted LUKS partition that needs to be unlocked by booster. Pay attention that the UUID does not contain any quotes. {{ic|''LUKSNAME''}} specifies name of the unlocked partition (as in {{ic|/dev/mapper/''NAME''}}).<br />
<br />
No image rebuild is required. Once the boot loader configuration is done, reboot the computer. After that you will see a {{ic|Enter passphrase for ''YOURROOT'':}} prompt at the boot time asking for a password for the encrypted root partition.<br />
<br />
=== Clevis encryption ===<br />
<br />
{{Note|Create a separate page for non-booster specific clevis information}}<br />
<br />
Passwords manually entered by a user is a traditional and widely used way to unlock encrypted LUKS partitions. But it has a few disadvantages:<br />
<br />
* It requires manual intervention and thus does not work with setups that require automatic boot (e.g. a large server farm).<br />
* An average human brain is capable of remembering relatively simple passwords (~20-30 bits of entropy) that are much weaker than keys used for modern block ciphers (128/256 bits).<br />
<br />
A solution for it would be encrypting data with a strong key stored securely somewhere else, for example at your [[TPM]] chip or [[YubiKey]] or some network service. [https://github.com/latchset/clevis/ Clevis] is a framework that implements this idea. It allows to encrypt (in terms of clevis ''bind'') data with a pluggable ''pin''. Currently clevis implements 3 pins:<br />
<br />
* TPM2 data binding<br />
* Network service (called [https://github.com/latchset/tang Tang]) data binding<br />
* [[Wikipedia:Shamir's Secret Sharing|Shamir's Secret Sharing]] that allows you to combine other pins.<br />
<br />
Booster supports all 3 types of pin.<br />
<br />
To use clevis please install {{pkg|clevis}} package. Here is an example of data binding with TPM2 (works only if you have a [[TPM]] chip at your computer):<br />
<br />
{{hc|$ clevis encrypt tpm2 '{}' <<< 'hello, world'|<br />
eyJhbGciOiJkaXIiLCJjbGV2aXMiOnsicGluIjoidHBtMiIsInRwbTIiOnsiaGFzaCI6InNoYTI1NiIsImp3a19wcml2IjoiQU80QUlJQkxxT3FVenVDU1FmWkprNmdDN2wzMW43V3M2Y2FZd0VZS1BSR3Q0OHJEQUJBV2Z4M3pTUUNUTmtHZE9BM2FZd2RTZk9GcXZWdnVlQ3lPamFsWldCT2R4RlJKSzl5ZVRCM0pkNFktcF9HalhhNmlnLWxxNmtmMHZTWWkzOWMxVEpES1RYRVZTdnlXSlpEbGdxQ0JPMVNxeGJBd2tfSnIyRlRNY3hvNGtpSmNtMEVjbWd5dFdyME00QmcySlg4aVo3MEt1MTVjNzFORU5Ra3RjdGMtREhBVGFQcHJ2VzI2Z3d1YmUxckRfX19aV2tHaG9mX053M0M1OHlOcXF2RUpPZUwzNTZHNXJHNVVtYmUtWWV4Ujl2SEppZWlua3ZaNTJoMFVRYWVNSm9LYjJuNjlVTGZHb2J1NElTN20iLCJqd2tfcHViIjoiQUM0QUNBQUxBQUFFMGdBQUFCQUFJQ2poWDBVeTJKZVpSNU9pRU0ySktSeEtnUElYQ3dGNnRNR09NTDZ0ZnE5aiIsImtleSI6ImVjYyJ9fSwiZW5jIjoiQTI1NkdDTSJ9..1P2Emag_4k-GlhyY.MuQQYPa8QHrysZ74uA.0ddDxfZA3R-cCmaKu5yUZA<br />
}}<br />
<br />
This long base64-encoded message is our text encrypted with an internal TPM key. It can be decrypted at the current computer only. Trying to decrypt it from another computer (or rather with another TPM chip) will return an error.<br />
<br />
{{hc|$ clevis decrypt tpm2 '{}' <<< 'eyJhbGciOiJkaXIiLCJjbGV2aXMiOnsicGluIjoidHBtMiIsInRwbTIiOnsiaGFzaCI6InNoYTI1NiIsImp3a19wcml2IjoiQU80QUlJQkxxT3FVenVDU1FmWkprNmdDN2wzMW43V3M2Y2FZd0VZS1BSR3Q0OHJEQUJBV2Z4M3pTUUNUTmtHZE9BM2FZd2RTZk9GcXZWdnVlQ3lPamFsWldCT2R4RlJKSzl5ZVRCM0pkNFktcF9HalhhNmlnLWxxNmtmMHZTWWkzOWMxVEpES1RYRVZTdnlXSlpEbGdxQ0JPMVNxeGJBd2tfSnIyRlRNY3hvNGtpSmNtMEVjbWd5dFdyME00QmcySlg4aVo3MEt1MTVjNzFORU5Ra3RjdGMtREhBVGFQcHJ2VzI2Z3d1YmUxckRfX19aV2tHaG9mX053M0M1OHlOcXF2RUpPZUwzNTZHNXJHNVVtYmUtWWV4Ujl2SEppZWlua3ZaNTJoMFVRYWVNSm9LYjJuNjlVTGZHb2J1NElTN20iLCJqd2tfcHViIjoiQUM0QUNBQUxBQUFFMGdBQUFCQUFJQ2poWDBVeTJKZVpSNU9pRU0ySktSeEtnUElYQ3dGNnRNR09NTDZ0ZnE5aiIsImtleSI6ImVjYyJ9fSwiZW5jIjoiQTI1NkdDTSJ9..1P2Emag_4k-GlhyY.MuQQYPa8QHrysZ74uA.0ddDxfZA3R-cCmaKu5yUZA'|<br />
hello, world<br />
}}<br />
<br />
Clevis allows to bind LUKS partitions as well, e.g.<br />
<br />
# clevis luks bind -d /dev/nvme0n1p2 tpm2 '{}'<br />
<br />
Creates a LUKS slot with a password encrypted by your TPM chip. It can be verified by running<br />
<br />
{{hc|# cryptsetup luksDump /dev/nvme0n1p2|<br />
...<br />
Tokens:<br />
0: clevis<br />
Keyslot: 1<br />
...<br />
}}<br />
<br />
It shows that one ''clevis'' token appeared. LUKS uses these tokens to store metadata about passwords stored ''somewhere else'' (e.g. at TPM chip). Please refer to clevis documentation for more information.<br />
<br />
Booster is able to read the LUKS tokens, decode clevis information, reconstruct the password and unlock the partition automatically.<br />
<br />
Partitions bound to ''tpm2'' or ''sss'' pins do not require any booster-side configuration. ''Tang'' (network binding) pin requires network enabled. Please refer to [[#Configuration]] section for more information on network configuration.<br />
<br />
== Debug ==<br />
<br />
If booster has issues and does not work as expected then please enable debug output that provides extra information about what is going on:<br />
<br />
* for generator there is a {{ic|-debug}} command line flag: {{ic|booster -debug}}.<br />
* for init there is a {{ic|1=booster.debug=1}} [[kernel parameter]].<br />
<br />
If you believe it is an issue with booster itself then please file a ticket here https://github.com/anatol/booster/issues<br />
<br />
== See also ==<br />
<br />
* [https://github.com/anatol/booster/blob/master/README.md upstream README]</div>Pdchttps://wiki.archlinux.org/index.php?title=Perl&diff=648605Perl2021-01-09T16:17:40Z<p>Pdc: /* Perl 5 */ Remove reference to base group, which no longer exists</p>
<hr />
<div>[[Category:Programming languages]]<br />
[[ja:Perl]]<br />
{{Related articles start}}<br />
{{Related|Perl Policy}}<br />
{{Related|Perl package guidelines}}<br />
{{Related|mod_perl}}<br />
{{Related articles end}}<br />
<br />
From [[Wikipedia:Perl|Wikipedia]]:<br />
:Perl is a family of high-level, general-purpose, interpreted, dynamic programming languages. The languages in this family include Perl 5 and Raku (formerly Perl 6).<br />
:The Perl languages borrow features from other programming languages including C, shell script (sh), AWK, and sed. They provide powerful text processing facilities without the arbitrary data-length limits of many contemporary Unix commandline tools, facilitating easy manipulation of text files. Perl 5 gained widespread popularity in the late 1990s as a CGI scripting language, in part due to its then unsurpassed regular expression and string parsing abilities.<br />
<br />
== Installation ==<br />
<br />
=== Perl 5 ===<br />
<br />
[[Install]] {{Pkg|perl}}.<br />
<br />
=== Raku ===<br />
<br />
A Raku compiler is provided by {{AUR|rakudo}} that targets MoarVM and JVM. This AUR package has {{AUR|moarvm}} as a dependency.<br />
<br />
== Commands ==<br />
<br />
=== Perl 5 ===<br />
<br />
The Perl language interpreter:<br />
<br />
$ perl<br />
<br />
Perl bug reporting:<br />
<br />
$ perlbug<br />
<br />
Lookup the Perl documentation in [[Wikipedia:Plain Old Documentation|POD]] format:<br />
<br />
$ perldoc<br />
<br />
Send the Perl authors and maintainers a thank you message:<br />
<br />
$ perlthanks<br />
<br />
=== Raku ===<br />
<br />
Rakudo "raku" compiler:<br />
<br />
$ raku<br />
<br />
== Perl 5 examples ==<br />
<br />
Classic "Hello, World!" for calling with {{ic|$ perl hello-world.pl}}:<br />
<br />
{{hc|hello-world.pl|<br />
use strict;<br />
use warnings;<br />
<br />
print "Hello, World!\n";<br />
}}<br />
<br />
With the executable bit set for calling with {{ic|$ ./hello-you}}:<br />
<br />
{{hc|hello-you|<nowiki><br />
#!/usr/bin/env perl<br />
<br />
use strict;<br />
use warnings;<br />
<br />
print "Please enter your name: ";<br />
my $name = <STDIN>;<br />
chomp ($name);<br />
print "Hello $name. Glad to meet you.\n";<br />
</nowiki>}}<br />
<br />
A one liner to print the first 10 Fibonacci numbers:<br />
<br />
$ perl -le'$==1,(1x$_)=~/(^)(1|11\1)*(?{$=++})^/,print$=for 0..10'<br />
<br />
== Package management ==<br />
<br />
The [https://www.cpan.org/ Comprehensive Perl Archive Network (CPAN)] is a repository of over 250,000 software modules and accompanying documentation written in the Perl programming language by over 12,000 contributors.<br />
<br />
CPAN is also the name of a Perl module, CPAN.pm, which is used to download and install Perl software from the CPAN archive.<br />
<br />
=== pacman and AUR ===<br />
<br />
A number of popular CPAN modules are available as [https://archlinux.org/packages/?q=cpan packages] in the Arch repositories. There are further modules available in the [https://aur.archlinux.org/packages/?K=cpan AUR].<br />
<br />
=== CPAN.pm ===<br />
<br />
The CPAN.pm module is included with Perl. It can be used interactively from the shell or in Perl scripts.<br />
<br />
==== Configuring cpan ====<br />
<br />
Before first use, the module needs to be configured. This is done interactively from the shell with (some output omitted):<br />
<br />
{{hc|$ cpan|<br />
CPAN.pm requires configuration, but most of it can be done automatically.<br />
If you answer 'no' below, you will enter an interactive dialog for each<br />
configuration option instead.<br />
<br />
Would you like to configure as much as possible automatically? [yes]<br />
}}<br />
<br />
Automated configuration will suit most users. Answering yes, the configuration will continue with:<br />
<br />
{{bc|<br />
To install modules, you need to configure a local Perl library directory or<br />
escalate your privileges. CPAN can help you by bootstrapping the local::lib<br />
module or by configuring itself to use 'sudo' (if available). You may also<br />
resolve this problem manually if you need to customize your setup.<br />
<br />
What approach do you want? (Choose 'local::lib', 'sudo' or 'manual')<br />
[local::lib]<br />
}}<br />
<br />
If you want {{ic|cpan}} to install modules in your home directory choose {{ic|local::lib}}. To install them system-wide choose {{ic|sudo}}. Choosing {{ic|sudo}} the configuration ends:<br />
<br />
{{bc|<br />
Autoconfiguration complete.<br />
<br />
commit: wrote '/home/''username''/.cpan/CPAN/MyConfig.pm'<br />
}}<br />
<br />
Choosing the {{ic|local::lib}} option will result in addition modules being installed.<br />
<br />
Choosing not to use automated configuration allows the user to set {{ic|cpan}} options interactively in the shell. The table below shows some option names with a brief description and default value. More detailed information is displayed for each option during configuration.<br />
<br />
{| class="wikitable"<br />
! Name !! Description !! Default<br />
|-<br />
| cpan_home || CPAN build and cache directory || $HOME/.cpan<br />
|-<br />
| keep_source_where || Download target directory || $HOME/.cpan/sources<br />
|-<br />
| build_dir || Build process directory || $HOME/.cpan/build<br />
|-<br />
| prefs_dir || Customizable modules options directory || $HOME/.cpan/prefs<br />
|-<br />
| build_cache || Cache size for build directory || 100MB<br />
|-<br />
| cleanup_after_install || Remove build directory after successful install || No<br />
|-<br />
| shell || Preferred shell || /bin/bash<br />
|-<br />
| halt_on_failure || Halt on failure || No<br />
|-<br />
| colorize_output || Turn on colored output || No<br />
|-<br />
| histfile || History file location || $HOME/.cpan/histfile<br />
|-<br />
| histsize || History file size || 100 lines<br />
|}<br />
<br />
The configuration file $HOME/.cpan/CPAN/MyConfig.pm can be edited with your text editor of choice.<br />
<br />
==== Usage examples ====<br />
<br />
To simply install a modules pass them as parameters to {{ic|cpan}} (multiple module names are separated by spaces):<br />
<br />
$ cpan Acme::MetaSyntactic<br />
<br />
The following examples are all in the {{ic|cpan}} interactive shell, started with:<br />
<br />
$ cpan<br />
<br />
Display information on a module:<br />
<br />
{{hc|cpan[1]> m Acme::MetaSyntactic|2=<br />
Reading '/home/''username''/.cpan/Metadata'<br />
Database was generated on Fri, 08 Dec 2017 02:17:03 GMT<br />
Module id = Acme::MetaSyntactic<br />
CPAN_USERID BOOK (Philippe Bruhat (BooK) <book@cpan.org>)<br />
CPAN_VERSION 1.014<br />
CPAN_FILE B/BO/BOOK/Acme-MetaSyntactic-1.014.tar.gz<br />
INST_FILE (not installed)<br />
}}<br />
<br />
View module README:<br />
<br />
{{hc|cpan[2]> readme Acme::MetaSyntactic|2=<br />
Acme::MetaSyntactic - Themed metasyntactic variables<br />
<br />
DESCRIPTION<br />
<br />
When writing code examples, it's always easy at the beginning:<br />
<br />
my $foo = "bar";<br />
$foo .= "baz"; # barbaz<br />
...<br />
}}<br />
<br />
Install a module:<br />
<br />
cpan[3]> install Acme::MetaSyntactic<br />
<br />
== Widget bindings ==<br />
<br />
The following [[Wikipedia:Widget toolkit|widget toolkit]] bindings are available:<br />
<br />
* {{App|gtk2-perl|GTK2 bindings|http://gtk2-perl.sourceforge.net/|{{Pkg|gtk2-perl}}}}<br />
* {{App|perl-gtk3|GTK3 bindings|https://metacpan.org/release/Gtk3|{{Pkg|perl-gtk3}}}}<br />
* {{App|Perl/TK|Tk bindings|http://search.cpan.org/dist/Tk/|{{Pkg|perl-tk}}}}<br />
* {{App|perlqt|[[Qt]] bindings|https://github.com/KDE/perlqt|perlqt}}<br />
* {{App|wxPerl|wxWidgets bindings|http://www.wxperl.it/|{{AUR|perl-wx}}}}<br />
* {{App|Prima|a perl multiplatform graphic toolkit|https://metacpan.org/release/Prima|{{AUR|perl-prima}}}}<br />
<br />
Or you can just draw asci art to create simple gui/webpage user interface:<br />
<br />
* {{App|GUIDeFATE|Graphical User Interface Design From A Text Editor|https://metacpan.org/pod/GUIDeFATE|{{AUR|perl-guidefate}}{{Broken package link|package not found}}}}<br />
<br />
To use these with Perl, you may need to install the associated widget kits.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Improved module management ===<br />
<br />
==== cpanminus ====<br />
<br />
[https://metacpan.org/release/App-cpanminus cpanminus] extends module management and aims to be zero configuration and integrates with {{ic|local::db}}.<br />
<br />
[[Install]] the {{Pkg|cpanminus}} package.<br />
<br />
The [https://metacpan.org/pod/distribution/App-cpanminus/bin/cpanm cpanminus documentation] gives examples.<br />
<br />
==== ucpan ====<br />
<br />
[https://metacpan.org/pod/release/KPEE/App-ucpan-1.13/script/ucpan ucpan] is a nice, fully automatic updater for CPAN modules (especially installed in local-lib). To install use:<br />
<br />
cpan App::ucpan<br />
<br />
==== Bundle::CPAN ====<br />
<br />
Installing the [https://metacpan.org/release/Bundle-CPAN Bundle::CPAN] distribution will add a lot of nice functionality to CPAN.pm.<br />
<br />
$ cpan Bundle::CPAN<br />
<br />
=== Re-run cpan configuration ===<br />
<br />
$ cpan<br />
cpan[1]> o conf init<br />
<br />
<br />
=== Create new module ===<br />
<br />
==== module-starter ====<br />
<br />
[https://metacpan.org/pod/distribution/Module-Starter/bin/module-starter Module::Starter] helps you create your new module... Install:<br />
<br />
cpanm Module::Starter<br />
<br />
Usage:<br />
<br />
module-starter --module=App::foobar --author="My name here" --email=my@email.here --mb<br />
<br />
This going to create your module tree...<br />
<br />
{{Note|Option {{ic|--mb}} create module which will use [https://metacpan.org/release/Module-Build Module::Build]. The next part assumes that you are using this module.}}<br />
<br />
To add dependiences, put {{ic|<nowiki>module_name => version_or_0</nowiki>}} inside {{ic|$builder -> requires}} in file {{ic|Build.PL}}<br />
<br />
To install required dependiences for your project, run inside {{ic|App-foobar}} folder:<br />
<br />
cpanm --installdeps .<br />
<br />
To skip git folder, add under {{ic|$builder}}<br />
<br />
add_to_manifest_skip => [ '.git' ],<br />
<br />
Adding scripts can by done like this:<br />
<br />
mkdir bin<br />
touch bin/foobar<br />
<br />
To run this script:<br />
<br />
perl -Ilib bin/foobar<br />
<br />
You can change your project version here: {{ic|lib/App/foobar.pm}}<br />
<br />
To install your module run this command in module root folder:<br />
<br />
cpanm .<br />
<br />
See more on: [https://metacpan.org/release/Module-Build cpan page], [https://metacpan.org/pod/Module::Build::Cookbook cookbook]<br />
<br />
== See also ==<br />
<br />
=== Perl 5 ===<br />
<br />
* [https://www.perl.org/ The Perl Programming Language (Perl homepage)]<br />
* [[Wikipedia:Perl]]<br />
* [https://learn.perl.org/tutorials/ Perl Tutorials]<br />
* {{man|1perl|perl}}<br />
* {{man|1perl|perldoc}}<br />
<br />
=== Raku ===<br />
<br />
* [https://raku.org/ The Raku Programming Language]<br />
* [[Wikipedia:Raku_(programming_language)]]<br />
* [https://raku.org/getting-started/ Getting started with Perl 6]<br />
* [https://rakudo.org Rakudo]<br />
* [[wikipedia:Rakudo]]<br />
* {{man|1|perl6|url=https://manpages.debian.org/unstable/rakudo/raku.1.en.html}}<br />
<br />
=== CPAN ===<br />
<br />
* [https://www.cpan.org Comprehensive Perl Archive Network]<br />
* [[wikipedia:CPAN]]<br />
* [http://joshr.com/src/docs/CPANQuickReference.pdf CPAN / CPAN Shell / CPANPLUS Quick Reference Guide]<br />
<br />
=== Tutorials ===<br />
<br />
* [http://perldoc.perl.org/index-tutorials.html Tutorials at perldoc]<br />
* [http://learnperl.scratchcomputing.com/tutorials/configuration/ cpan configuration]<br />
* [http://www.perlmonks.org/?node=Tutorials PerlMonks Tutorials]<br />
<br />
=== Miscellaneous ===<br />
<br />
* [https://www.reddit.com/r/perl/comments/68bd1j/perl_5_vs_6/ Perl 5 vs 6]</div>Pdchttps://wiki.archlinux.org/index.php?title=Environment_variables&diff=642043Environment variables2020-11-21T16:58:45Z<p>Pdc: /* Using pam_env */ pam_env is deprecated and will be removed at some point in the future</p>
<hr />
<div>[[Category:System administration]]<br />
[[de:Umgebungsvariablen]]<br />
[[es:Environment variables]]<br />
[[ja:環境変数]]<br />
[[pt:Environment variables]]<br />
[[ru:Environment variables]]<br />
[[zh-hans:Environment variables]]<br />
{{Related articles start}}<br />
{{Related|Default applications}}<br />
{{Related articles end}}<br />
<br />
An environment variable is a named object that contains data used by one or more applications. In simple terms, it is a variable with a name and a value. The value of an environmental variable can for example be the location of all executable files in the file system, the default editor that should be used, or the system locale settings. Users new to Linux may often find this way of managing settings a bit unmanageable. However, environment variables provide a simple way to share configuration settings between multiple applications and processes in Linux.<br />
<br />
== Utilities ==<br />
<br />
The {{Pkg|coreutils}} package contains the programs ''printenv'' and ''env''. To list the current environmental variables with values: <br />
<br />
$ printenv<br />
<br />
{{Note|Some environment variables are user-specific. Check by comparing the outputs of ''printenv'' as an unprivileged user and as ''root''.}}<br />
<br />
The ''env'' utility can be used to run a command under a modified environment. The following example will launch ''xterm'' with the environment variable {{ic|EDITOR}} set to {{ic|vim}}. This will not affect the global environment variable {{ic|EDITOR}}.<br />
<br />
$ env EDITOR=vim xterm<br />
<br />
The [[Bash]] builtin ''set'' allows you to change the values of shell options and set the positional parameters, or to display the names and values of shell variables. For more information, see [https://www.gnu.org/software/bash/manual/bash.html#The-Set-Builtin the set builtin documentation].<br />
<br />
Each process stores their environment in the {{ic|/proc/$PID/environ}} file. This file contains each key value pair delimited by a nul character ({{ic|\x0}}). A more human readable format can be obtained with [[sed]], e.g. {{ic|sed 's:\x0:\n:g' /proc/$PID/environ}}.<br />
<br />
== Defining variables ==<br />
<br />
=== Globally ===<br />
<br />
Most Linux distributions tell you to change or add environment variable definitions in {{ic|/etc/profile}} or other locations. Keep in mind that there are also package-specific configuration files containing variable settings such as {{ic|/etc/locale.conf}}. Be sure to maintain and manage the environment variables and pay attention to the numerous files that can contain environment variables. In principle, any shell script can be used for initializing environmental variables, but following traditional UNIX conventions, these statements should only be present in some particular files. <br />
<br />
The following files should be used for defining global environment variables on your system: {{ic|/etc/environment}}, {{ic|/etc/profile}} and shell specific configuration files. Each of these files has different limitations, so you should carefully select the appropriate one for your purposes.<br />
<br />
* {{ic|/etc/environment}} is used by the pam_env module and is shell agnostic so scripting or glob expansion cannot be used. The file only accepts {{ic|1=''variable=value''}} pairs. See {{man|8|pam_env}} and {{man|5|pam_env.conf}} for details.<br />
* Global configuration files of your [[shell]], initializes variables and runs scripts. For example [[Bash#Configuration files]] or [[Zsh#Startup/Shutdown files]].<br />
* {{ic|/etc/profile}} initializes variables for login shells ''only''. It does, however, run scripts and can be used by all [[wikipedia:Bourne shell|Bourne shell]] compatible shells.<br />
<br />
In this example, we add {{ic|~/bin}} directory to the {{ic|PATH}} for respective user. To do this, just put this in your preferred global environment variable config file ({{ic|/etc/profile}} or {{ic|/etc/bash.bashrc}}):<br />
<br />
{{bc|<nowiki><br />
# If user ID is greater than or equal to 1000 & if ~/bin exists and is a directory & if ~/bin is not already in your $PATH<br />
# then export ~/bin to your $PATH.<br />
if [[ $UID -ge 1000 && -d $HOME/bin && -z $(echo $PATH | grep -o $HOME/bin) ]]<br />
then<br />
export PATH="${PATH}:$HOME/bin"<br />
fi<br />
</nowiki>}}<br />
<br />
=== Per user ===<br />
<br />
You do not always want to define an environment variable globally. For instance, you might want to add {{ic|/home/my_user/bin}} to the {{ic|PATH}} variable but do not want all other users on your system to have that in their {{ic|PATH}} too. Local environment variables can be defined in many different files:<br />
<br />
* {{ic|~/.pam_environment}} is the user specific equivalent of {{ic|/etc/security/pam_env.conf}} [https://github.com/linux-pam/linux-pam/issues/6], used by pam_env module. See {{man|8|pam_env}} and {{man|5|pam_env.conf}} for details.<br />
* User configuration files of your [[shell]], for example [[Bash#Configuration files]] or [[Zsh#Startup/Shutdown files]].<br />
* [[systemd]] will load environment variables from {{ic|~/.config/environment.d/*.conf}} see {{man|5|environment.d}} and https://wiki.gnome.org/Initiatives/Wayland/SessionStart.<br />
<br />
To add a directory to the {{ic|PATH}} for local usage, put following in {{ic|~/.bash_profile}}:<br />
<br />
export PATH="${PATH}:/home/my_user/bin"<br />
<br />
To update the variable, re-login or [[source]] the file: {{ic|$ source ~/.bash_profile}}.<br />
<br />
{{Note|<br />
* The dbus daemon and the user instance of systemd do not inherit any of the environment variables set in places like {{ic|~/.bashrc}} etc. This means that, for example, dbus activated programs like Gnome Files will not use them by default. See [[Systemd/User#Environment variables]].<br />
* Reading {{ic|~/.pam_environment}} [https://github.com/linux-pam/linux-pam/commit/ecd526743a27157c5210b0ce9867c43a2fa27784 is deprecated] and the feature will be removed at some point in the future.<br />
}}<br />
<br />
==== Graphical environment ====<br />
<br />
Environment variables for [[Xorg]] applications can be set in [[xinitrc]], or in [[xprofile]] when using a [[display manager]], for example:<br />
<br />
{{hc|~/.xinitrc|2=<br />
export PATH="${PATH}:${HOME}/scripts"<br />
export GUIVAR=value<br />
}}<br />
<br />
{{Accuracy|{{man|5|environment.d}} only affects systemd user services.[https://github.com/systemd/systemd/issues/7641] Setting up environment variables listed in {{ic|~/.config/environment.d/}} on Wayland sessions is [[GDM]]-specific behavior.}}<br />
<br />
Applications running on [[Wayland]] may use [[Systemd/User#Environment variables|systemd user environment variables]] instead, as Wayland does not initiate any Xorg related files:<br />
<br />
{{hc|~/.config/environment.d/envvars.conf|2=<br />
PATH=$PATH:$HOME/scripts<br />
GUIVAR=value<br />
}}<br />
<br />
To set environment variables only for a specific application instead of the whole session, edit the application's ''.desktop'' file. See [[Desktop entries#Modify environment variables]] for instructions.<br />
<br />
{{Tip|[[KDE Plasma]] supports executing shell scripts at login and even before launching Plasma, they can be used to set environment variables. See [[KDE#Autostart]].}}<br />
<br />
=== Per session ===<br />
<br />
Sometimes even stricter definitions are required. One might want to temporarily run executables from a specific directory created without having to type the absolute path to each one, or editing shell configuration files for the short time needed to run them.<br />
<br />
In this case, you can define the {{ic|PATH}} variable in your current session, combined with the ''export'' command. As long as you do not log out, the {{ic|PATH}} variable will be using the temporary settings. To add a session-specific directory to {{ic|PATH}}, issue:<br />
<br />
$ export PATH="${PATH}:/home/my_user/tmp/usr/bin"<br />
<br />
== Examples ==<br />
<br />
The following section lists a number of common environment variables used by a Linux system and describes their values.<br />
<br />
* {{ic|DE}} indicates the ''D''esktop ''E''nvironment being used. [[xdg-open]] will use it to choose more user-friendly file-opener application that desktop environment provides. Some packages need to be installed to use this feature. For [[GNOME]], that would be {{AUR|libgnome}}; for [[Xfce]] this is {{pkg|exo}}. Recognised values of {{ic|DE}} variable are: {{ic|gnome}}, {{ic|kde}}, {{ic|xfce}}, {{ic|lxde}} and {{ic|mate}}.<br />
<br />
:The {{ic|DE}} environment variable needs to be exported before starting the window manager. For example:<br />
<br />
{{hc|~/.xinitrc|2=<br />
export DE="xfce"<br />
exec openbox<br />
}}<br />
<br />
:This will make ''xdg-open'' use the more user-friendly ''exo-open'', because it assumes it is running inside Xfce. Use ''exo-preferred-applications'' for configuring.<br />
<br />
* {{ic|DESKTOP_SESSION}} is similar to {{ic|DE}}, but used in [[LXDE]] desktop environment: when {{ic|DESKTOP_SESSION}} is set to {{ic|LXDE}}, ''xdg-open'' will use [[pcmanfm]] file associations.<br />
<br />
* {{ic|PATH}} contains a colon-separated list of directories in which your system looks for executable files. When a regular command (e.g. ''ls'', ''systemctl'' or ''pacman'') is interpreted by the shell (e.g. ''bash'' or ''zsh''), the shell looks for an executable file with the same name as your command in the listed directories, and executes it. To run executables that are not listed in {{ic|PATH}}, a relative or absolute path to the executable must be given, e.g. {{ic|./a.out}} or {{ic|/bin/ls}}.<br />
<br />
{{Note|It is advised not to include the current working directory ({{ic|.}}) into your {{ic|PATH}} for security reasons, as it may trick the user to execute vicious commands.}}<br />
<br />
* {{ic|HOME}} contains the path to the home directory of the current user. This variable can be used by applications to associate configuration files and such like with the user running it.<br />
<br />
* {{ic|PWD}} contains the path to your working directory.<br />
<br />
* {{ic|OLDPWD}} contains the path to your previous working directory, that is, the value of {{ic|PWD}} before last ''cd'' was executed.<br />
<br />
* {{ic|TERM}} contains the type of the running terminal, e.g. {{ic|xterm-256color}}. It is used by programs running in the terminal that wish to use terminal-specific capabilities.<br />
<br />
* {{ic|MAIL}} contains the location of incoming email. The traditional setting is {{ic|/var/spool/mail/$LOGNAME}}.<br />
<br />
* {{ic|ftp_proxy}} and {{ic|http_proxy}} contains FTP and HTTP proxy server, respectively:<br />
ftp_proxy="<nowiki>ftp://192.168.0.1:21</nowiki>"<br />
http_proxy="<nowiki>http://192.168.0.1:80</nowiki>"<br />
<br />
* {{ic|MANPATH}} contains a colon-separated list of directories in which ''man'' searches for the man pages.<br />
{{Note|In {{ic|/etc/profile}}, there is a comment that states "Man is much better than us at figuring this out", so this variable should generally be left unset. See {{man|5|manpath}}.<br />
}}<br />
<br />
* {{ic|INFODIR}} contains a colon-separated list of directories in which the ''info'' command searches for the info pages, e.g., {{ic|/usr/share/info:/usr/local/share/info}}<br />
<br />
* {{ic|TZ}} can be used to to set a time zone different to the system zone for a user. The zones listed in {{ic|/usr/share/zoneinfo/}} can be used as reference, for example {{ic|1=TZ=":/usr/share/zoneinfo/Pacific/Fiji"}}. When pointing the {{ic|TZ}} variable to a zoneinfo file, it should start with a colon per [https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html the GNU manual].<br />
<br />
=== Default programs ===<br />
<br />
* {{ic|SHELL}} contains the path to the user's [http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03 preferred shell]. Note that this is not necessarily the shell that is currently running, although [[Bash]] sets this variable on startup.<br />
<br />
* {{ic|PAGER}} contains command to run the program used to list the contents of files, e.g., {{ic|/bin/less}}.<br />
<br />
* {{ic|EDITOR}} contains the command to run the lightweight program used for editing files, e.g., {{ic|/usr/bin/nano}}. For example, you can write an interactive switch between ''gedit'' under [[X]] or ''nano'', in this example:<br />
<br />
export EDITOR="$(if <nowiki>[[</nowiki> -n $DISPLAY <nowiki>]]</nowiki>; then echo 'gedit'; else echo 'nano'; fi)"<br />
<br />
* {{ic|VISUAL}} contains command to run the full-fledged editor that is used for more demanding tasks, such as editing mail (e.g., {{ic|vi}}, [[vim]], [[emacs]] etc).<br />
<br />
* {{ic|BROWSER}} contains the path to the web browser. Helpful to set in an interactive shell configuration file so that it may be dynamically altered depending on the availability of a graphic environment, such as [[X]]:<br />
<br />
if <nowiki>[</nowiki> -n "$DISPLAY" <nowiki>]</nowiki>; then<br />
export BROWSER=firefox<br />
else <br />
export BROWSER=links<br />
fi<br />
<br />
=== Using pam_env ===<br />
<br />
{{Warning|As of PAM 1.5.0 reading of the user environment using pam_env is deprecated and will be removed<br />
at some point in the future. See https://github.com/linux-pam/linux-pam/releases/tag/v1.5.0}}<br />
<br />
The [[PAM]] module {{man|8|pam_env}} loads the variables to be set in the environment from the following files: {{ic|/etc/security/pam_env.conf}}, {{ic|/etc/environment}} and {{ic|~/.pam_environment}}.<br />
<br />
* {{ic|/etc/environment}} must consist of simple {{ic|1=''VARIABLE''=''value''}} pairs on separate lines, for example: {{bc|1=EDITOR=nano}}<br />
* {{ic|/etc/security/pam_env.conf}} and {{ic|~/.pam_environment}} share the same following format: {{bc|1=VARIABLE [DEFAULT=''value''] [OVERRIDE=''value'']}} {{ic|@{HOME} }} and {{ic|@{SHELL} }} are special variables that expand to what is defined in {{ic|/etc/passwd}}. The following example illustrates how to expand the {{ic|HOME}} environment variable into another variable: {{bc|1=XDG_CONFIG_HOME DEFAULT=@{HOME}/.config}} {{Note|The variables {{ic|${HOME} }} and {{ic|${SHELL} }} are not linked to the {{ic|HOME}} and {{ic|SHELL}} environment variables, they are not set by default.}} The format also allows to expand already defined variables in the values of other variables using {{ic|${''VARIABLE''} }}, like this: {{bc|1=GNUPGHOME DEFAULT=${XDG_CONFIG_HOME}/gnupg}} {{ic|1=''VARIABLE''=''value''}} pairs are also allowed, but variable expansion is not supported in those pairs. See {{man|5|pam_env.conf}} for more information. <br />
<br />
{{Note|These files are read before other files, in particular before {{ic|~/.profile}}, {{ic|~/.bash_profile}} and {{ic|~/.zshenv}}. }}<br />
<br />
== See also ==<br />
<br />
* [https://wiki.gentoo.org/wiki/Handbook:X86/Working/EnvVar Gentoo Linux Documentation]<br />
* [https://help.ubuntu.com/community/EnvironmentVariables Ubuntu Community Wiki - Environment Variables]</div>Pdchttps://wiki.archlinux.org/index.php?title=KornShell&diff=641707KornShell2020-11-16T17:57:26Z<p>Pdc: /* Installation */ mksh site is http only</p>
<hr />
<div>[[Category:Command-line shells]]<br />
[[ja:Ksh]]<br />
The [[Wikipedia:KornShell|KornShell]] (ksh) is a standard/restricted command and programming language developed by AT&T.<br />
<br />
== Installation ==<br />
<br />
First, [[install]] an implementation from the [[official repositories]]:<br />
<br />
* {{App|MirBSD™ Korn Shell|Enhanced version of the public domain ksh.|http://www.mirbsd.org/mksh.htm|{{Pkg|mksh}}}}<br />
* {{App|[[Wikipedia:Korn_shell|AT&T Korn shell]]|Official AT&T version.|http://www.kornshell.com/|{{Pkg|ksh}}}}<br />
<br />
More implementations are provided in the [[Arch User Repository]]:<br />
* {{App|loksh|A Linux port of OpenBSD's ksh|https://github.com/dimkr/loksh|{{AUR|loksh-git}}}}<br />
* {{App|OpenBSDs Korn Shell|Porting of the OpenBSD version of ksh to GNU/Linux.|https://github.com/ibara/oksh/|{{AUR|oksh}}}}<br />
<br />
== Making a ksh implementation your default login shell ==<br />
<br />
Change the default shell for the current user:<br />
<br />
$ chsh -s /bin/''ksh implementation''<br />
<br />
== Uninstallation ==<br />
<br />
Change the default shell before removing the [[#Installation|ksh packages]].<br />
<br />
{{Warning|Failure to follow the below procedure may result in users no longer having access to a working shell.}}<br />
<br />
Run following command:<br />
<br />
$ chsh -s /bin/bash ''user''<br />
<br />
Use it for every user with m/ksh set as their login shell (including root if needed). When completed, the {{Pkg|mksh}} package can be removed.<br />
<br />
Alternatively, change the default shell back to Bash by editing {{ic|/etc/passwd}} as root. <br />
<br />
{{Warning|It is strongly recommended to use {{ic|vipw}} when editing {{ic|/etc/passwd}} as it helps prevent invalid entries and/or syntax errors.}}<br />
<br />
For example, change the following:<br />
<br />
''username'':x:1000:1000:''Full Name'',,,:/home/''username'':/bin/mksh<br />
<br />
To this:<br />
<br />
''username'':x:1000:1000:''Full Name'',,,:/home/''username'':/bin/bash<br />
<br />
== See Also ==<br />
<br />
* [http://www.mirbsd.org/mksh.htm mksh - The MirBSD Korn Shell]</div>Pdchttps://wiki.archlinux.org/index.php?title=KornShell&diff=640008KornShell2020-10-29T20:22:41Z<p>Pdc: /* See Also */ mksh site is http only</p>
<hr />
<div>[[Category:Command-line shells]]<br />
[[ja:Ksh]]<br />
The [[Wikipedia:KornShell|KornShell]] (ksh) is a standard/restricted command and programming language developed by AT&T.<br />
<br />
== Installation ==<br />
<br />
First, [[install]] an implementation from the [[official repositories]]:<br />
<br />
* {{App|MirBSD™ Korn Shell|Enhanced version of the public domain ksh.|https://www.mirbsd.org/mksh.htm|{{Pkg|mksh}}}}<br />
* {{App|[[Wikipedia:Korn_shell|AT&T Korn shell]]|Official AT&T version.|http://www.kornshell.com/|{{Pkg|ksh}}}}<br />
<br />
More implementations are provided in the [[Arch User Repository]]:<br />
* {{App|loksh|A Linux port of OpenBSD's ksh|https://github.com/dimkr/loksh|{{AUR|loksh-git}}}}<br />
* {{App|OpenBSDs Korn Shell|Porting of the OpenBSD version of ksh to GNU/Linux.|https://github.com/ibara/oksh/|{{AUR|oksh}}}}<br />
<br />
== Making a ksh implementation your default login shell ==<br />
<br />
Change the default shell for the current user:<br />
<br />
$ chsh -s /bin/''ksh implementation''<br />
<br />
== Uninstallation ==<br />
<br />
Change the default shell before removing the [[#Installation|ksh packages]].<br />
<br />
{{Warning|Failure to follow the below procedure may result in users no longer having access to a working shell.}}<br />
<br />
Run following command:<br />
<br />
$ chsh -s /bin/bash ''user''<br />
<br />
Use it for every user with m/ksh set as their login shell (including root if needed). When completed, the {{Pkg|mksh}} package can be removed.<br />
<br />
Alternatively, change the default shell back to Bash by editing {{ic|/etc/passwd}} as root. <br />
<br />
{{Warning|It is strongly recommended to use {{ic|vipw}} when editing {{ic|/etc/passwd}} as it helps prevent invalid entries and/or syntax errors.}}<br />
<br />
For example, change the following:<br />
<br />
''username'':x:1000:1000:''Full Name'',,,:/home/''username'':/bin/mksh<br />
<br />
To this:<br />
<br />
''username'':x:1000:1000:''Full Name'',,,:/home/''username'':/bin/bash<br />
<br />
== See Also ==<br />
<br />
* [http://www.mirbsd.org/mksh.htm mksh - The MirBSD Korn Shell]</div>Pdchttps://wiki.archlinux.org/index.php?title=Mirrors&diff=639236Mirrors2020-10-19T22:12:09Z<p>Pdc: Undo revision 639232 by MatinB (talk) Pacman-mirrors is Manjaro-specific: it is not available on Arch</p>
<hr />
<div>[[Category:About Arch]]<br />
[[Category:Package management]]<br />
[[ar:Mirrors]]<br />
[[es:Mirrors]]<br />
[[fr:Miroirs]]<br />
[[it:Mirrors]]<br />
[[ja:ミラー]]<br />
[[pt:Mirrors]]<br />
[[ru:Mirrors]]<br />
[[zh-hans:Mirrors]]<br />
{{Related articles start}}<br />
{{Related|Unofficial mirrors}}<br />
{{Related|pacman}}<br />
{{Related articles end}}<br />
<br />
This page is a guide to selecting and configuring your mirrors, and a listing of current available mirrors.<br />
<br />
== Official mirrors ==<br />
<br />
The official Arch Linux mirror list is available from the {{pkg|pacman-mirrorlist}} package. To get an even more up-to-date list of mirrors, use the [https://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator] page on the main site.<br />
<br />
Check the status of the Arch mirrors by visiting the [https://www.archlinux.org/mirrors/status/ Mirror Status] page. It is recommended to only use mirrors that are up to date, i.e. not out of sync.<br />
<br />
If you want your mirror to be added to the official list, see [[DeveloperWiki:NewMirrors]]. In the meantime, add it to the [[Unofficial mirrors]] article.<br />
<br />
=== IPv6-ready mirrors ===<br />
<br />
The [https://www.archlinux.org/mirrorlist/?ip_version=6 Pacman Mirrorlist Generator] can also be used to find a list of current IPv6 mirrors.<br />
<br />
== Enabling a specific mirror ==<br />
<br />
To enable mirrors, edit {{ic|/etc/pacman.d/mirrorlist}} and locate your geographic region. Uncomment mirrors you would like to use.<br />
<br />
Example:<br />
<br />
# Any<br />
# Server = <nowiki>http://mirrors.kernel.org/archlinux/$repo/os/$arch</nowiki><br />
'''Server = <nowiki>https://mirrors.kernel.org/archlinux/$repo/os/$arch</nowiki>'''<br />
<br />
See [[#Sorting mirrors]] for tools that help choosing mirrors.<br />
<br />
{{Tip|<br />
* Uncomment 5 favorite mirrors and place them at the top of the mirrorlist file. That way it's easy to find them and move them around if the first mirror on the list has problems. It also makes merging mirrorlist updates easier.<br />
* HTTP mirrors are faster than FTP due to [[Wikipedia:HTTP persistent connection|persistent HTTP connection]]: with FTP, a new connection to server has to be established each time ''pacman'' requests a package to be downloaded, which results in a brief pause.<br />
}}<br />
<br />
It is also possible to specify mirrors in {{ic|/etc/pacman.conf}}. For the ''[core]'' repository, the default setup is:<br />
[core]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
To use the ''HostEurope'' mirror as a default mirror, add it before the {{ic|Include}} line:<br />
[core]<br />
'''Server = <nowiki>http://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/$arch</nowiki>'''<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
pacman will now try to connect to this mirror first. Proceed to do the same for ''[testing]'', ''[extra]'', and ''[community]'', if applicable.<br />
<br />
{{Note|If mirrors have been stated directly in {{ic|pacman.conf}}, remember to use the same mirror for all repositories. Otherwise packages that are incompatible to each other may be installed, like linux from ''[core]'' and an older kernel module from ''[extra]''.}}<br />
<br />
=== Force pacman to refresh the package lists ===<br />
<br />
Mirrors can be out of sync and the package list from the old mirror may not correspond to the package list of the new mirror, even though the dates of the lists may suggest that they do.<br />
<br />
After creating/editing {{ic|/etc/pacman.d/mirrorlist}}, issue the following command:<br />
# pacman -Syyu<br />
<br />
Passing two {{ic|--refresh}}/{{ic|-y}} flags forces pacman to refresh all package lists even if they are considered to be up to date. Issuing {{ic|pacman -Syyu}} is an unnecessary waste of bandwidth in most cases, but can sometimes fix issues when switching from a broken mirror to a working mirror. See also [https://bbs.archlinux.org/viewtopic.php?id=163124 Is -Syy safe?].<br />
<br />
{{Warning|In most cases if you force refresh the pacman database, you will want to force downgrade any potentially too-new packages to correspond to the versions offered by the new mirror. This prevents issues where packages are inconsistently upgraded, leading to a partial update.<br />
# pacman -Syyuu<br />
This is not necessary when using timestamps to ensure the mirrors are only upgraded.<br />
}}<br />
<br />
== Sorting mirrors ==<br />
<br />
When downloading packages, pacman uses the mirrors in the order they are listed in {{ic|/etc/pacman.d/mirrorlist}}. The order servers appear in the list sets their priority.<br />
<br />
It is not optimal to only rank mirrors based on speed since the fastest servers might be out-of-sync. Instead, make a list of mirrors sorted by their [[#List by speed|speed]], then remove those from the list that are out of sync according to their [https://www.archlinux.org/mirrors/status/ status].<br />
<br />
It is recommended to repeat this process before every system upgrade to keep the list of mirrors up-to-date.<br />
<br />
=== List by speed ===<br />
====Ranking an existing mirror list====<br />
The {{Pkg|pacman-contrib}} package provides a Bash script, {{ic|/usr/bin/rankmirrors}}, which can be used to rank the mirrors according to their connection and opening speeds to take advantage of using the fastest local mirror.<br />
<br />
Back up the existing {{ic|/etc/pacman.d/mirrorlist}}:<br />
<br />
# cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup<br />
<br />
To prepare {{ic|mirrorlist.backup}} for ranking with ''rankmirrors'', the following actions can be carried out:<br />
<br />
* Edit {{ic|mirrorlist.backup}} and uncomment the servers to be tested<br />
<br />
* If the servers in the file are grouped by country, one can extract all the servers of a specific country by using: {{bc|1=$ awk '/^## ''Country Name''$/{f=1; next}f==0{next}/^$/{exit}{print substr($0, 1);}' /etc/pacman.d/mirrorlist.backup}}<br />
<br />
* To uncomment every mirror, run the following {{ic|sed}} line: {{bc|# sed -i 's/^#Server/Server/' /etc/pacman.d/mirrorlist.backup}}<br />
<br />
Finally, rank the mirrors, here with the operand {{ic|-n 6}} to only output the 6 fastest mirrors:<br />
<br />
# rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist<br />
<br />
====Fetching and ranking a live mirror list====<br />
<br />
In order to start with a shortlist of up-to-date mirrors based in some countries and feed it to ''rankmirrors'' one can fetch the list from the ''Pacman Mirrorlist Generator''.<br />
The command below pulls the up-to-date mirrors in either ''France'' or the ''United Kingdom'' which support the ''https'' protocol, it uncomments the servers in the list and then ranks them and outputs the 5 fastest.<br />
<br />
$ curl -s "https://www.archlinux.org/mirrorlist/?country=FR&country=GB&protocol=https&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 -<br />
<br />
{{Tip|This procedure can be done interactively by navigating to {{ic|1=https://www.archlinux.org/mirrorlist}} with any text-based browser, for example {{man|1|elinks}}.}}<br />
<br />
=== Server-side ranking ===<br />
<br />
The official [https://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator] provides an easy way to obtain a ranked list of mirrors. Because all ranking is done on a single server that takes multiple factors into account, the amount of load on the mirrors and the clients is significantly lower compared to ranking on each individual client.<br />
<br />
Another popular alternative is the following tool:<br />
<br />
{{App|[[Reflector]]|Retrieves the latest mirrorlist from the [https://www.archlinux.org/mirrors/status/ MirrorStatus] page, filters and sorts them by speed and overwrites {{ic|/etc/pacman.d/mirrorlist}}|https://xyne.archlinux.ca/projects/reflector/|{{pkg|reflector}}}}<br />
<br />
== Troubleshooting ==<br />
<br />
In case you encounter the following error:<br />
error: config file /etc/pacman.d/mirrorlist could not be read: No such file or directory<br />
<br />
Get the mirrorlist directly from the website:<br />
# curl -o /etc/pacman.d/mirrorlist <nowiki>https://www.archlinux.org/mirrorlist/all/</nowiki><br />
<br />
Be sure to uncomment a preferred mirror as described above, then:<br />
# pacman -Syu pacman-mirrorlist<br />
<br />
== See also ==<br />
* [https://github.com/archlinux/archweb/blob/master/mirrors/views/mirrorlist.py GitHub archweb mirrorlist.py] - source code of the archweb mirrorlist generator</div>Pdchttps://wiki.archlinux.org/index.php?title=Domain_name_resolution&diff=634332Domain name resolution2020-09-04T11:38:52Z<p>Pdc: /* DNS servers */ mention redis backend for unbound</p>
<hr />
<div>[[Category:Domain Name System]]<br />
[[Category:Network configuration]]<br />
[[de:Resolv.conf]]<br />
[[es:Domain name resolution]]<br />
[[fr:Resolv.conf]]<br />
[[it:Domain name resolution]]<br />
[[ja:ドメイン名前解決]]<br />
[[pt:Domain name resolution]]<br />
[[zh-hans:Domain name resolution]]<br />
{{Related articles start}}<br />
{{Related|Network configuration}}<br />
{{Related|DNS over HTTPS servers}}<br />
{{Related articles end}}<br />
In general, a [[Wikipedia:Domain name|domain name]] represents an IP address and is associated to it in the [[Wikipedia:Domain Name System|Domain Name System]] (DNS).<br />
This article explains how to configure domain name resolution and resolve domain names.<br />
<br />
== Name Service Switch ==<br />
<br />
{{Expansion|Mention {{Pkg|nss-mdns}}, {{AUR|nss-tls-git}} and others.}}<br />
<br />
The [[Wikipedia:Name Service Switch|Name Service Switch]] (NSS) facility is part of the GNU C Library ({{Pkg|glibc}}) and backs the {{man|3|getaddrinfo}} API, used to resolve domain names. NSS allows system databases to be provided by separate services, whose search order can be configured by the administrator in {{man|5|nsswitch.conf}}. The database responsible for domain name resolution is the ''hosts'' database, for which glibc offers the following services:<br />
<br />
* ''file'': reads the {{ic|/etc/hosts}} file, see {{man|5|hosts}}<br />
* ''dns'': the [[#Glibc resolver|glibc resolver]] which reads {{ic|/etc/resolv.conf}}, see {{man|5|resolv.conf}}<br />
<br />
[[Systemd]] provides three NSS services for hostname resolution:<br />
<br />
* {{man|8|nss-resolve}} - a caching DNS stub resolver, described in [[systemd-resolved]]<br />
* {{man|8|nss-myhostname}} - provides hostname resolution without having to edit {{ic|/etc/hosts}}, described in [[Network configuration#Local hostname resolution]]<br />
* {{man|8|nss-mymachines}} - provides hostname resolution for the names of local {{man|8|systemd-machined}} containers <br />
<br />
=== Resolve a domain name using NSS ===<br />
<br />
NSS databases can be queried with {{man|1|getent}}. A domain name can be resolved through NSS using:<br />
<br />
$ getent hosts ''domain_name''<br />
<br />
{{Note|While most programs resolve domain names using NSS, some may read {{ic|/etc/resolv.conf}} and/or {{ic|/etc/hosts}} directly. See [[Network configuration#Local hostname resolution]].}}<br />
<br />
== Glibc resolver ==<br />
<br />
The glibc resolver reads {{ic|/etc/resolv.conf}} for every resolution to determine the nameservers and options to use. <br />
<br />
{{man|5|resolv.conf}} lists nameservers together with some configuration options.<br />
Nameservers listed first are tried first, up to three nameservers may be listed. Lines starting with a number sign ({{ic|#}}) are ignored.<br />
<br />
{{Note|The glibc resolver does not cache queries. To improve query lookup time you can set up a caching resolver. Glibc resolver also can not validate DNSSEC. A DNSSEC capable validator resolver is required for that one. See [[#DNS servers]] for more information.}}<br />
<br />
=== Overwriting of /etc/resolv.conf ===<br />
<br />
[[Network manager]]s tend to overwrite {{ic|/etc/resolv.conf}}, for specifics see the corresponding section:<br />
<br />
* [[dhcpcd#/etc/resolv.conf]]<br />
* [[netctl#resolv.conf]]<br />
* [[NetworkManager#/etc/resolv.conf]]<br />
<br />
To prevent programs from overwriting {{ic|/etc/resolv.conf}}, it is also possible to write-protect it by setting the immutable [[file attribute]]:<br />
<br />
# chattr +i /etc/resolv.conf<br />
<br />
{{Tip|If you want multiple processes to write to {{ic|/etc/resolv.conf}}, you can use [[resolvconf]].}}<br />
<br />
=== Limit lookup time ===<br />
<br />
If you are confronted with a very long hostname lookup (may it be in [[pacman]] or while browsing), it often helps to define a small timeout after which an alternative nameserver is used. To do so, put the following in {{ic|/etc/resolv.conf}}.<br />
<br />
options timeout:1<br />
<br />
=== Hostname lookup delayed with IPv6 ===<br />
<br />
If you experience a 5 second delay when resolving hostnames it might be due to a DNS-server/Firewall misbehaving and only giving one reply to a parallel A and AAAA request.[https://udrepper.livejournal.com/20948.html] You can fix that by setting the following option in {{ic|/etc/resolv.conf}}:<br />
<br />
options single-request<br />
<br />
=== Local domain names ===<br />
<br />
To be able to use the hostname of local machine names without the fully qualified domain name, add a line to {{ic|/etc/resolv.conf}} with the local domain such as:<br />
domain example.org<br />
That way you can refer to local hosts such as {{ic|mainmachine1.example.org}} as simply {{ic|mainmachine1}} when using the ''ssh'' command, but the [[#Lookup utilities|drill]] command still requires the fully qualified domain names in order to perform lookups.<br />
<br />
== Lookup utilities ==<br />
<br />
To query specific DNS servers and DNS/[[DNSSEC]] records you can use dedicated DNS lookup utilities. These tools implement DNS themselves and do not use [[#Name Service Switch|NSS]].<br />
<br />
{{Pkg|ldns}} provides {{man|1|drill}}, which is a tool designed to retrieve information out of the DNS.<br />
<br />
For example, to query a specific nameserver with ''drill'' for the TXT records of a domain:<br />
<br />
$ drill @''nameserver'' TXT ''domain''<br />
<br />
Unless a DNS server is specified, ''drill'' will use the nameservers defined in {{ic|/etc/resolv.conf}}.<br />
<br />
{{Tip|Some DNS servers ship with their own DNS lookup utilities. E.g.<br />
<br />
* {{Pkg|knot}} provides {{man|1|khost}} and {{man|1|kdig}}.<br />
* [[Unbound]] has {{man|1|unbound-host}}.<br />
* [[BIND]] has {{man|1|dig}}, {{man|1|host}}, {{man|1|nslookup}} and a bunch of {{ic|dnssec-}} tools.<br />
<br />
}}<br />
<br />
== Resolver performance ==<br />
<br />
The Glibc resolver does not cache queries. To implement local caching, use [[systemd-resolved]] or set up a local caching [[#DNS servers|DNS server]] and use it as the name server by setting {{ic|127.0.0.1}} and {{ic|::1}} as the name servers in {{ic|/etc/resolv.conf}} or in {{ic|/etc/resolvconf.conf}} if using [[openresolv]].<br />
<br />
{{Tip|<br />
* The ''drill'' or ''dig'' [[#Lookup utilities|lookup utilities]] report the query time.<br />
* A router usually sets its own caching resolver as the network's DNS server thus providing DNS cache for the whole network. <br />
* If it takes too long to switch to the next DNS server you can try [[#Limit lookup time|decreasing the timeout]].}}<br />
<br />
== Privacy and security ==<br />
<br />
The DNS protocol is unencrypted and does not account for confidentiality, integrity or authentication, so if you use an untrusted network or a malicious ISP, your DNS queries can be eavesdropped and the responses [[Wikipedia:Man-in-the-middle attack|manipulated]]. Furthermore, DNS servers can conduct [[Wikipedia:DNS hijacking|DNS hijacking]].<br />
<br />
You need to trust your DNS server to treat your queries confidentially. DNS servers are provided by ISPs and [[#Third-party DNS services|third-parties]]. Alternatively you can run your own [[#DNS servers|recursive name server]], which however takes more effort. If you use a [[DHCP]] client in untrusted networks, be sure to set static name servers to avoid using and being subject to arbitrary DNS servers. To secure your communication with a remote DNS server you can use an encrypted protocol, like [[Wikipedia:DNS over TLS|DNS over TLS]] ([[RFC:7858|RFC 7858]]), [[Wikipedia:DNS over HTTPS|DNS over HTTPS]] ([[RFC:8484|RFC 8484]]), or [[Wikipedia:DNSCrypt|DNSCrypt]], provided that both the upstream server and your [[#DNS servers|resolver]] support the protocol. An alternative can be a dedicated software to encrypt and decrypt the communication, such as [[stunnel]]. To verify that responses are actually from [[Wikipedia:Authoritative name server|authoritative name servers]], you can validate [[DNSSEC]], provided that both the upstream server(s) and your [[#DNS servers|resolver]] support it.<br />
<br />
=== Application-level DNS ===<br />
<br />
Be aware that some client software, such as major web browsers[https://hacks.mozilla.org/2018/05/a-cartoon-intro-to-dns-over-https/#trr-and-doh][https://www.chromium.org/developers/dns-over-https], are starting to implement DNS over HTTPS. While the encryption of queries may often be seen as a bonus, it also means the software sidetracks queries around the system resolver configuration.[https://blog.powerdns.com/2019/09/25/centralised-doh-is-bad-for-privacy-in-2019-and-beyond/]<br />
<br />
[https://support.mozilla.org/en-US/kb/configuring-networks-disable-dns-over-https Mozilla has proposed] disabling application-level DNS if the system resolver cannot resolve the domain "[http://use-application-dns.net/ use-application-dns.net]". Currently this check is only implemented in [[Firefox]].<br />
<br />
{{Expansion|Explain why is it necessary or what are the benefits of configuring DNS over HTTPS in web browsers over running a [[#DNS servers|stub resolver]].}}<br />
<br />
==== Configuring DNS over HTTPS in Firefox ====<br />
<br />
In order to configure DNS over HTTPS in [[Firefox]], follow the [https://support.mozilla.org/en-US/kb/firefox-dns-over-https official instructions].<br />
<br />
== Third-party DNS services ==<br />
<br />
{{Note|Before using a third-party DNS service, check its privacy policy for information on how user data is handled. User data has value and can be sold to other parties.}}<br />
<br />
There are various [[Wikipedia:Public recursive name server#List of public DNS service operators|third-party DNS services]] available, some of which also have dedicated software:<br />
<br />
* {{App|dingo|A DNS client for Google DNS over HTTPS|https://github.com/pforemski/dingo|{{AUR|dingo-git}}}}<br />
* {{App|opennic-up|Automates the renewal of the DNS servers with the most responsive OpenNIC servers|https://github.com/kewlfft/opennic-up|{{AUR|opennic-up}}}}<br />
<br />
{{Expansion|Add [[cloudflared]]?}}<br />
<br />
== DNS servers ==<br />
<br />
[[DNS]] servers can be [[Wikipedia:Authoritative name server|authoritative]] and [[Wikipedia:Name server#Recursive query|recursive]]. If they are neither, they are called '''stub resolvers''' and simply forward all queries to another recursive name server. Stub resolvers are typically used to introduce DNS caching on the local host or network. Note that the same can also be achieved with a fully-fledged name server. This section compares the available DNS servers, for a more detailed comparison, refer to [[Wikipedia:Comparison of DNS server software]].<br />
<br />
{{Expansion|Fill in the unknowns.}}<br />
<br />
{| class="wikitable sortable" style="text-align:center"<br />
! rowspan=2 | Name !! rowspan=2 | Package !! colspan=4 | Capabilities !! rowspan=2 | [[resolvconf]] !! colspan=4 | Supported protocols<br />
|-<br />
! [[Wikipedia:Authoritative name server|Authoritative]] !! [[Wikipedia:Name server#Recursive query|Recursive]] !! [[Wikipedia:Name server#Caching name server|Cache]] !! [[Wikipedia:Domain Name System Security Extensions#The lookup procedure|Validates]]<br>[[DNSSEC]] !! [[Wikipedia:Domain Name System|DNS]] !! [[Wikipedia:DNSCrypt|DNSCrypt]] !! [[Wikipedia:DNS over TLS|DNS<br>over TLS]] !! [[Wikipedia:DNS over HTTPS|DNS<br>over HTTPS]]<br />
|-<br />
! [[dnscrypt-proxy]]<br />
| {{Pkg|dnscrypt-proxy}} || {{No}} || {{No}} || {{Yes}} || {{No}} || {{No}} || {{Y|Server}} || {{Y|Resolver}} || {{No}} || {{Yes}}<br />
|-<br />
! [[Rescached]]<br />
| {{AUR|rescached-git}} || {{No}} || {{No}} || {{Yes}} || {{No}} || {{Yes|https://github.com/shuLhan/rescached-go#integration-with-openresolv}} || {{Yes}} || {{No}} || {{No}} || {{Y|Limited}}<sup>1</sup><br />
|-<br />
! [[Stubby]]<br />
| {{Pkg|stubby}} || {{No}} || {{No}} || {{No}} || {{Yes}} || {{No}} || {{Y|Server}} || {{No}} || {{Y|Resolver}} || {{No}}<br />
|-<br />
!style="white-space: nowrap;"| [[systemd-resolved]]<br />
| {{Pkg|systemd}} || {{No}} || {{No}} || {{Yes}} || {{Yes}} || {{G|[[systemd-resolvconf|Yes]]}} || {{Y|Resolver and [https://github.com/systemd/systemd/issues/4621#issuecomment-260050033 limited server]}} || {{No}} || {{Y|Resolver}} || {{No|https://github.com/systemd/systemd/issues/8639}}<br />
|-<br />
! [[dnsmasq]]<br />
| {{Pkg|dnsmasq}} || {{Y|Partial}}<sup>2</sup> || {{No}} || {{Yes}} || {{Yes}} || {{G|[[openresolv#Subscribers|Yes]]}} || {{Yes}} || {{No}} || {{No|http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2018q2/012131.html}} || {{No}}<br />
|-<br />
! [[BIND]]<br />
| {{Pkg|bind}} || {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|[[openresolv#Subscribers|Yes]]}} || {{Yes}} || {{No}} || {{Y|[[stunnel#DNS over TLS]]}}|| {{No}}<br />
|-<br />
! [[Knot Resolver]]<br />
| {{AUR|knot-resolver}} || {{No}} || {{Yes}} || {{Yes}} || {{Yes}} || {{No}} || {{Yes}} || {{No}} || {{Yes}} || {{Y|[https://knot-resolver.readthedocs.io/en/stable/modules-http-doh.html Server]}}<br />
|-<br />
! [[Wikipedia:MaraDNS|MaraDNS]]<br />
| {{AUR|maradns}} || {{Yes}} || {{Yes}} || {{Yes}} || {{No}} || {{No}} || {{Yes}} || {{No}} || {{No}} || {{No}}<br />
|-<br />
! [[pdnsd]]<br />
| {{Pkg|pdnsd}} || {{Yes}} || {{Yes}} || {{G|Permanent}} || {{No}} || {{G|[[openresolv#Subscribers|Yes]]}} || {{Yes}} || {{No}} || {{No}} || {{No}}<br />
|-<br />
! [[Wikipedia:PowerDNS#Recursor|PowerDNS Recursor]]<br />
| {{Pkg|powerdns-recursor}} || {{No}} || {{Yes}} || {{Yes}} || {{Yes}} || {{G|[[openresolv#Subscribers|Yes]]}} || {{Yes}} || {{No}} || {{No}} || {{No}}<br />
|-<br />
! [[Unbound]]<br />
| {{Pkg|unbound}} || {{Y|Partial}} || {{Yes}} || {{Yes}}<sup>3</sup> || {{Yes}} || {{G|[[openresolv#Subscribers|Yes]]}} || {{Yes}} || {{Y|Server}} || {{Yes}} || {{No|1=https://nlnetlabs.nl/bugs-script/show_bug.cgi?id=1200}}<br />
|-<br />
! [https://github.com/pymumu/smartdns SmartDNS]<br />
| {{Pkg|smartdns}} || {{No}} || {{No}} || {{Yes}} || {{No|https://github.com/pymumu/smartdns/issues/19}} || ? || {{Yes}} || {{No}} || {{Y|Resolver}} || {{Y|Resolver}}<br />
|-<br />
! [https://maradns.samiam.org/deadwood/ Deadwood]<br />
| {{AUR|deadwood}} || ? || ? || ? || ? || ? || ? || ? || ? || ?<br />
|-<br />
! [https://coredns.io/ CoreDNS]<br />
| {{AUR|coredns}} or {{AUR|coredns-bin}} || ? || ? || ? || ? || ? || ? || ? || ? || ?<br />
|}<br />
<br />
# Only forwards using DNS over HTTPS when Rescached itself is queried using DNS over HTTPS.[https://github.com/shuLhan/rescached-go#integration-with-dns-over-https]<br />
# From [[Wikipedia:Comparison of DNS server software#cite_note-masqauth-28|Wikipedia]]: dnsmasq has limited authoritative support, intended for internal network use rather than public Internet use.<br />
# The redis backend can be used to provide a persistent cache for unbound.<br />
<br />
=== Authoritative-only servers ===<br />
<br />
{| class="wikitable sortable" style="text-align:center"<br />
! Name !! Package !! [[DNSSEC]] !! Geographic<br>balancing<br />
|-<br />
! gdnsd<br />
| {{Pkg|gdnsd}} || {{No}} || {{Yes}}<br />
|-<br />
! [[Wikipedia:Knot DNS|Knot DNS]]<br />
| {{Pkg|knot}} || {{Yes}} || {{Yes|https://www.knot-dns.cz/docs/2.7/singlehtml/#geoip-geography-based-responses}}<br />
|-<br />
! [[NSD]]<br />
| {{Pkg|nsd}} || {{No}} || {{No}}<br />
|-<br />
! [[PowerDNS]]<br />
| {{Pkg|powerdns}} || {{Yes}} || {{Yes}}<br />
|}<br />
<br />
=== Conditional forwarding ===<br />
<br />
It is possible to use specific DNS resolvers when querying specific domain names. This is particularly useful when connecting to a VPN, so that queries to the VPN network are resolved by the VPN's DNS, while queries to the internet will still be resolved by your standard DNS resolver. It can also be used on local networks.<br />
<br />
To implement it, you need to use a [[#DNS servers|local resolver]] because glibc does not support it.<br />
<br />
In a dynamic environment (laptops and to some extents desktops), you need to configure your resolver based on the network(s) you are connected to. The best way to do that is to use [[openresolv]] because it supports [[openresolv#Subscribers|multiple subscribers]]. Some [[network manager]]s support it, either through openresolv, or by configuring the resolver directly. NetworkManager [[NetworkManager#DNS caching and conditional forwarding|supports conditional forwarding without openresolv]].<br />
<br />
{{Note|Although you could use other conditions for forwarding (for example, source IP address), "conditional forwarding" appears to be the name used for the "domain queried" condition.}}<br />
<br />
== See also ==<br />
<br />
* [https://www.tldp.org/LDP/nag2/x-087-2-resolv.html Linux Network Administrators Guide]<br />
* [https://www.debian.org/doc/manuals/debian-handbook/sect.hostname-name-service.en.html#sect.name-resolution Debian Handbook]<br />
* [[RFC:7706]] - Decreasing Access Time to Root Servers by Running One on Loopback<br />
* [http://linux-ip.net/pages/diagrams.html#domain-name-system-overview Domain name system overview] - Diagram about DNS<br />
* [[Alternative DNS services]]</div>Pdchttps://wiki.archlinux.org/index.php?title=Autostarting&diff=632384Autostarting2020-08-17T21:35:53Z<p>Pdc: /* On filesystem events */ Add systemd.path</p>
<hr />
<div>[[Category:System administration]]<br />
[[es:Autostarting]]<br />
[[ja:自動起動]]<br />
[[pt:Autostarting]]<br />
[[ru:Autostarting]]<br />
[[zh-hans:Autostarting]]<br />
{{Related articles start}}<br />
{{Related|Daemons}}<br />
{{Related articles end}}<br />
<br />
This article links to various methods to launch scripts or applications automatically when some particular event is taking place.<br />
<br />
== On bootup / shutdown ==<br />
<br />
Use [[systemd]] services.<br />
<br />
== On user login / logout ==<br />
<br />
Use [[systemd/User]] services.<br />
<br />
== On device plug in / unplug ==<br />
<br />
Use [[udev]] rules.<br />
<br />
== On time events ==<br />
<br />
Periodically at certain times, dates or intervals:<br />
<br />
* [[systemd/Timers]]<br />
* [[Cron]]<br />
<br />
Once at a date and time:<br />
<br />
* [[systemd/Timers]]<br />
* {{Pkg|at}}<br />
<br />
== On filesystem events ==<br />
<br />
Use an [[Wikipedia:inotify|inotify]] event watcher:<br />
<br />
* {{Pkg|inotify-tools}}, see {{man|1|inotifywait}}<br />
* [[incron]]<br />
* {{AUR|fswatch}}<br />
* [[systemd]] can activate units on filesystem events using {{man|5|systemd.path}} files<br />
<br />
== On shell login / logout ==<br />
<br />
See [[Command-line shell#Configuration files]].<br />
<br />
== On Xorg startup ==<br />
<br />
* [[xinitrc]] if you are starting [[Xorg]] manually with [[xinit]].<br />
* [[xprofile]] if you are using a [[display manager]].<br />
<br />
== On desktop environment startup ==<br />
<br />
Most [[desktop environment]]s implement [[XDG Autostart]].<br />
<br />
If the desktop environments has an article, see its ''Autostart'' section.<br />
<br />
* [[GNOME#Autostart]]<br />
* [[KDE#Autostart]]<br />
* [[Xfce#Autostart]]<br />
* [[LXDE#Autostart]]<br />
* [[LXQt#Autostart]]<br />
<br />
== On window manager startup ==<br />
<br />
Many [[window manager]]s implement [[XDG Autostart]].<br />
<br />
If the [[window manager]] has an article, see its ''Autostart'' section.<br />
<br />
* [[Fluxbox#Autostart]]<br />
* [[Openbox#Autostart]]<br />
* [[Awesome#Autostart]]<br />
* [[i3#Autostart]]</div>Pdchttps://wiki.archlinux.org/index.php?title=List_of_applications/Multimedia&diff=630648List of applications/Multimedia2020-08-09T15:29:54Z<p>Pdc: /* Graphical image viewers */ pqiv is in [Community]</p>
<hr />
<div><noinclude><br />
[[Category:Applications]]<br />
[[Category:Multimedia]]<br />
[[Category:Lists of software]]<br />
[[es:List of applications (Español)/Multimedia]]<br />
[[it:List of applications (Italiano)/Multimedia]]<br />
[[ja:アプリケーション一覧/マルチメディア]]<br />
[[pt:List of applications (Português)/Multimedia]]<br />
[[ru:List of applications (Русский)/Multimedia]]<br />
[[zh-hans:List of applications (简体中文)/Multimedia]]<br />
[[zh-hant:List of applications (正體中文)/Multimedia]]<br />
{{List of applications navigation}}<br />
</noinclude><br />
== Multimedia ==<br />
<br />
=== Codecs ===<br />
<br />
See the main article: [[Codecs]].<br />
<br />
=== Image ===<br />
<br />
==== Image viewers ====<br />
<br />
See also [[Wikipedia:Comparison of image viewers]].<br />
<br />
===== Framebuffer image viewers =====<br />
<br />
* {{App|fbi|Image viewer for the linux framebuffer console.|https://www.kraxel.org/blog/linux/fbida/|{{Pkg|fbida}}}}<br />
* {{App|fbv|Very simple graphic file viewer for the framebuffer console.|http://s-tech.elsat.net.pl/fbv/|{{Pkg|fbv}}}}<br />
* {{App|fim|Highly customizable and scriptable framebuffer image viewer based on fbi.|http://www.nongnu.org/fbi-improved/|{{AUR|fim}}}}<br />
* {{App|jfbview|Framebuffer PDF and image viewer based on Imlib2. Features include Vim-like controls, rotation and zoom, zoom-to-fit, and fast multi-threaded rendering.|https://github.com/jichu4n/jfbview|{{AUR|jfbview}}}}<br />
<br />
===== Graphical image viewers =====<br />
<br />
* {{App|Deepin Image Viewer|Image viewer for Deepin desktop.|https://www.deepin.org/en/original/deepin-image-viewer/|{{Pkg|deepin-image-viewer}}}}<br />
* {{App|Ephoto|A light image viewer based on EFL.|https://www.enlightenment.org/about-ephoto|{{AUR|ephoto}}}}<br />
* {{App|[[Wikipedia:Eye_of_GNOME|Eye of GNOME]]|Image viewing and cataloging program, which is a part of the GNOME desktop environment.|https://wiki.gnome.org/Apps/EyeOfGnome|{{Pkg|eog}}}}<br />
* {{App|Eye of MATE|Simple graphics viewer for the MATE desktop.|https://github.com/mate-desktop/eom|{{Pkg|eom}}}}<br />
* {{App|EyeSight|Image viewer for the Hawaii desktop environment.|https://github.com/hawaii-desktop/eyesight|{{AUR|eyesight}}}}<br />
* {{App|[[feh]]|Fast, lightweight image viewer that uses imlib2.|https://feh.finalrewind.org/|{{Pkg|feh}}}}<br />
* {{App|GalaPix|OpenGL-based image viewer for simultaneously viewing and zooming large collections of image files,|https://github.com/Galapix/galapix|{{AUR|galapix}}}}<br />
* {{App|[[Wikipedia:Geeqie|Geeqie]]|Image browser and viewer (fork of GQview) that adds additional functionality such as support for RAW files.|http://geeqie.org/|{{Pkg|geeqie}}}}<br />
* {{App|GPicView|Simple and fast image viewer for X, which is part of the [[LXDE]] desktop.|http://lxde.sourceforge.net/gpicview/|GTK 2: {{Pkg|gpicview}}, GTK 3: {{Pkg|gpicview-gtk3}}}}<br />
* {{App|[[Wikipedia:Gwenview|Gwenview]]|Fast and easy to use image viewer for the KDE desktop.|https://userbase.kde.org/Gwenview|{{Pkg|gwenview}}}}<br />
* {{App|ida|X11 application (Motif based) for viewing images.|https://www.kraxel.org/blog/linux/fbida/|{{Pkg|fbida}}}}<br />
* {{App|imv|Lightweight image viewer with support for Wayland and animated GIFs which uses FreeImage.|https://www.github.com/eXeC64/imv/|{{Pkg|imv}}}}<br />
* {{App|LxImage-Qt|The LXQt image viewer.|https://github.com/lxde/lximage-qt|{{Pkg|lximage-qt}}}}<br />
* {{App|meh|meh is a small, simple, super fast image viewer using raw XLib.|https://www.johnhawthorn.com/meh/|{{AUR|meh-git}}}}<br />
* {{App|Mirage|PyGTK image viewer featuring support for crop and resize, custom actions and a thumbnail panel.|https://sourceforge.net/projects/mirageiv.berlios/|{{AUR|mirage}}}}<br />
* {{App|nomacs|Qt image viewer. It is feature-rich but starts fast and can be configured to show additional widgets or only the image.|https://nomacs.org/|{{Pkg|nomacs}}}}<br />
* {{App|Phototonic|Fast and functional image viewer and browser (Qt).|https://github.com/oferkv/phototonic/|{{Pkg|phototonic}}}}<br />
* {{App|PhotoQt|Fast and highly configurable image viewer with a simple and nice interface.|https://photoqt.org/|{{AUR|photoqt}}}}<br />
* {{App|pqiv|GTK 3 based command-line image viewer with a minimal UI supporting images in compressed archives, rewrite of qiv.|https://github.com/phillipberndt/pqiv/|{{Pkg|pqiv}}}}<br />
* {{App|qimgv|Fast and easy to use Qt5 image viewer. Supports webm/mp4 playback via mpv.|https://github.com/easymodo/qimgv/|{{AUR|qimgv}}}}<br />
* {{App|Quick Image Viewer|Very small and fast image viewer based on GTK and imlib2.|http://spiegl.de/qiv/|{{Pkg|qiv}}}}<br />
* {{App|qView|Qt image viewer designed with minimalism and usability in mind.|https://interversehq.com/qview/|{{AUR|qview}}}}<br />
* {{App|Ristretto|Fast and lightweight image viewer for the Xfce desktop environment.|https://docs.xfce.org/apps/ristretto/start|{{Pkg|ristretto}}}}<br />
* {{App|shufti|shufti non-destructively saves and restores the zoom level, rotation, window size, desktop location and viewing area on a per-image/file location basis|https://github.com/danboid/shufti|{{AUR|shufti}}}}<br />
* {{App|[[sxiv]]|Simple image viewer based on imlib2 that works well with tiling window managers.|https://github.com/muennich/sxiv|{{Pkg|sxiv}}}}<br />
* {{App|Viewnior|Minimalistic GTK image viewer featuring support for flipping, rotating, animations and configurable mouse actions.|http://siyanpanayotov.com/project/viewnior|{{Pkg|viewnior}}}}<br />
* {{App|Vimiv|An image viewer with vim-like keybindings. It is written in python3 using the Gtk3 toolkit.|http://karlch.github.io/vimiv/|{{Pkg|vimiv}}}}<br />
* {{App|vpv|Image viewer designed for scientific image visualization.|https://github.com/kidanger/vpv|{{AUR|vpv}}}}<br />
* {{App|Xloadimage|Classic X image viewer.|https://sioseis.ucsd.edu/xloadimage.html|{{Pkg|xloadimage}}}}<br />
<br />
==== Image organizers ====<br />
<br />
See also [[Wikipedia:Image organizer]].<br />
<br />
* {{App|Deepin Album|Photo manager for viewing and organizing pictures, for Deepin desktop.|https://github.com/linuxdeepin/deepin-album|{{Pkg|deepin-album}}}}<br />
* {{App|[[Wikipedia:digiKam|digiKam]]|KDE-based image organizer with built-in editing features via a plugin architecture. digiKam asserts it is more full featured than similar applications with a larger set of image manipulation features including RAW image import and manipulation.|https://www.digikam.org/|{{Pkg|digikam}}}}<br />
* {{App|Frogr|Small application for the GNOME desktop that allows users to manage their accounts in the Flickr image hosting website.|https://wiki.gnome.org/Apps/Frogr|{{AUR|frogr}}}}<br />
* {{App|GNOME Photos|Access, organize, and share your photos on GNOME.|https://wiki.gnome.org/Apps/Photos|{{Pkg|gnome-photos}}}}<br />
* {{App|[[Wikipedia:GThumb|gThumb]]|Image viewer and browser for the GNOME desktop.|https://wiki.gnome.org/Apps/Gthumb|{{Pkg|gthumb}}}}<br />
* {{App|[[Wikipedia:KPhotoAlbum|KPhotoAlbum]]|Digital image cataloging software that supports annotation, browsing, searching and viewing of digital images and videos.|https://www.kphotoalbum.org/|{{Pkg|kphotoalbum}}}}<br />
* {{App|Memories|Image viewer and manager designed for elementary OS.|http://anufrij.org/memories/|{{AUR|showmypictures}}}}<br />
* {{App|Pantheon Photos|Photo organizer for Pantheon.|https://launchpad.net/pantheon-photos|{{Pkg|pantheon-photos}}}}<br />
* {{App|Pix|Image viewer and browser based on gthumb. X-Apps Project.|https://github.com/linuxmint/pix|{{AUR|pix}}}}<br />
* {{App|Rapid Photo Downloader|Download photos and videos from cameras, memory cards and portable storage devices.|https://www.damonlynch.net/rapid/|{{Pkg|rapid-photo-downloader}}}}<br />
* {{App|[[Wikipedia:Shotwell_(software)|Shotwell]]|A digital photo organizer designed for the GNOME desktop environment|https://wiki.gnome.org/Apps/Shotwell|{{Pkg|shotwell}}}}<br />
<br />
==== Image processing ====<br />
<br />
* {{App|CairoSVG|SVG to PNG, PDF, PS converter.|https://cairosvg.org/|{{Pkg|python-cairosvg}}}}<br />
* {{App|Converseen|Qt-based batch image converter and resizer.|http://converseen.fasterland.net/|{{Pkg|converseen}}}}<br />
* {{App|CropGUI|GTK utility for lossless cropping and rotation of jpeg files|https://github.com/jepler/cropgui|{{AUR|cropgui}}}}<br />
* {{App|[[Wikipedia:dcraw|dcraw]]|Converts many camera RAW formats.|https://dechifro.org/dcraw/|{{Pkg|dcraw}}}}<br />
* {{App|Fyre|Tool for producing computational artwork based on histograms of iterated chaotic functions.|http://fyre.navi.cx/|{{AUR|fyre}}}}<br />
* {{App|[[Wikipedia:G'MIC|G'MIC]]|Full-featured open-source framework for image processing, providing several different user interfaces to convert/manipulate/filter/visualize generic image datasets, ranging from 1d scalar signals to 3d+t sequences of multi-spectral volumetric images, including 2d color images.|http://www.gmic.eu/|{{Pkg|gmic}}}}<br />
* {{App|[[Wikipedia:GraphicsMagick|GraphicsMagick]]|Fork of ImageMagick designed to have API and command-line stability. It also supports multi-CPU for enhanced performance and thus is used by some large commercial sites (Flickr, etsy) for its performance.|http://www.graphicsmagick.org/|{{Pkg|graphicsmagick}}}}<br />
* {{App|[[ImageMagick]]|Command-line image manipulation program. It is known for its accurate format conversions with support for over 100 formats. Its API enables it to be scripted and it is usually used as a backend processor.|http://www.imagemagick.org/script/index.php|{{Pkg|imagemagick}}}}<br />
* {{App|PosteRazor|Cut an image or PDF into pieces which can be printed and assembled to a poster|https://posterazor.sourceforge.io/|{{Pkg|posterazor}}}}<br />
<br />
===== Image compression =====<br />
<br />
====== Console ======<br />
<br />
* {{App|[[Wikipedia:Guetzli|Guetzli]]|A perceptual JPEG encoder, aiming for excellent compression density at high visual quality.|https://github.com/google/guetzli|{{Pkg|guetzli}}}}<br />
* {{App|jpegoptim|JPEG optimization utility providing lossless and lossy compression.|https://www.kokkonen.net/tjko/projects.html#jpegoptim|{{Pkg|jpegoptim}}}}<br />
* {{App|optipng|Lossless PNG compressor.|http://optipng.sourceforge.net/|{{Pkg|optipng}}}}<br />
* {{App|pngcrush|Tool for optimizing the compression of PNG files.|https://pmt.sourceforge.io/pngcrush/|{{Pkg|pngcrush}}}}<br />
* {{App|pngquant|Lossy compression of PNG images.|https://pngquant.org/|{{Pkg|pngquant}}}}<br />
* {{App|zopflipng|Highly efficient PNG optimisation tool using Google's zopfli library|https://github.com/google/zopfli|{{AUR|zopflipng-git}}}}<br />
<br />
====== Graphical ======<br />
<br />
* {{App|Image Optimizer|Simple lossless image optimizer built with Vala and Gtk for Elementary OS.|https://github.com/GijsGoudzwaard/Image-Optimizer|{{AUR|image-optimizer-git}}}}<br />
* {{App|ImCompressor|GTK-based image compressor, supporting PNG and JPEG file types.|https://github.com/Huluti/ImCompressor|{{AUR|imcompressor}}}}<br />
* {{App|Trimage|Qt-based tool for optimizing PNG and JPG files.|https://trimage.org/|{{AUR|trimage}}}}<br />
<br />
==== Raster graphics editors ====<br />
<br />
See also [[Wikipedia:Comparison of raster graphics editors]].<br />
<br />
* {{App|AzPainter|Painting software for illustration drawing.|https://github.com/Symbian9/azpainter|{{AUR|azpainter}}}}<br />
* {{App|Deepin Draw|Lightweight drawing tool for Deepin desktop.|https://github.com/linuxdeepin/deepin-draw|{{Pkg|deepin-draw}}}}<br />
* {{App|Drawing|Drawing application for the GNOME desktop, using Cairo and GdkPixbuf for basic drawing operations.|https://github.com/maoschanz/drawing|{{Pkg|drawing}}}}<br />
* {{App|Drawpile|Collaborative drawing program that allows multiple users to sketch on the same canvas simultaneously.|https://drawpile.net/|{{AUR|drawpile}}}}<br />
* {{App|[[GIMP]]|Image editing suite in the vein of proprietary editors such as [[Wikipedia:Adobe Photoshop|Adobe Photoshop]]. GIMP ([[GNU]] Image Manipulation Program) has been started in the mid 1990s and has acquired a large number of [[CMYK support in The GIMP|plugins]] and additional tools.|https://www.gimp.org/|{{Pkg|gimp}}}}<br />
* {{App|Glimpse|A fork of GIMP, usability-focused free software application capable of expert level image manipulation.|https://glimpse-editor.github.io/|{{AUR|glimpse-editor-git}}}}<br />
* {{App|[[Wikipedia:GNU Paint|Gpaint]]|[[Wikipedia:PC_Paintbrush|Paintbrush]] clone for GNOME.|https://www.gnu.org/software/gpaint/|{{AUR|gpaint}}}}<br />
* {{App|[[Wikipedia:GrafX2|GrafX2]]|Bitmap paint program specialized in 256 color drawing.|http://grafx2.chez.com/|{{Pkg|grafx2}}}}<br />
* {{App|ImEditor|Simple and versatile image editor.|https://imeditor.github.io/|{{AUR|imeditor}}}}<br />
* {{App|[[Wikipedia:KolourPaint|KolourPaint]]|Free raster graphics editor for KDE, similar to Microsoft's Paint application before Windows 7, but with some additional features such as support for transparency. Part of {{Grp|kde-applications}} and {{Grp|kde-graphics}} groups.|http://kolourpaint.org|{{Pkg|kolourpaint}}}}<br />
* {{App|[[Wikipedia:Krita|Krita]]|Digital painting and illustration software included based on the KDE platform.|https://krita.org/|{{Pkg|krita}}}}<br />
* {{App|mtPaint|Graphics editing program geared towards creating indexed palette images and pixel art.|http://mtpaint.sourceforge.net/|{{Pkg|mtpaint}}}}<br />
* {{App|[[Wikipedia:MyPaint|MyPaint]]|Free software graphics application for digital painters.|http://mypaint.org|{{Pkg|mypaint}}}}<br />
* {{App|PhotoFlare|Simple but powerful image editor originally inspired by PhotoFiltre.|https://photoflare.io/|{{Pkg|photoflare}}}}<br />
* {{App|[[Wikipedia:Pinta (software)|Pinta]]|Drawing and editing program modeled after [[Wikipedia:Paint.net|Paint.NET]]. Its goal is to provide a simplified alternative to GIMP for casual users.|https://pinta-project.com/|{{AUR|pinta}}}}<br />
* {{App|[[Wikipedia:XPaint|XPaint]]|Color image editing tool which features most standard paint program options.|https://sourceforge.net/projects/sf-xpaint/|{{AUR|xpaint}}}}<br />
<br />
Some image viewers and organizers like [[Wikipedia:digiKam|digiKam]], Ephoto, GNOME Photos, [[Wikipedia:GThumb|gThumb]], ida, nomacs, Pantheon Photos, Phototonic and [[Wikipedia:Shotwell_(software)|Shotwell]] also provide some basic image manipulation functionality.<br />
<br />
==== Specialized photo editors ====<br />
<br />
* {{App|[[Wikipedia:darktable|darktable]]|Photography workflow and RAW development application.|http://www.darktable.org/|{{Pkg|darktable}}}}<br />
* {{App|[[Wikipedia:Hugin (software)|Hugin]]|Panorama photo stitcher.|http://hugin.sourceforge.net/|{{Pkg|hugin}}}}<br />
* {{App|[[Wikipedia:LightZone|LightZone]]|Professional-level digital darkroom and photo editor comparable to Photoshop Lightroom.|http://lightzoneproject.org/|{{AUR|lightzone}}}}<br />
* {{App|[[Wikipedia:Luminance HDR|Luminance HDR]]|Open source graphical user interface application that aims to provide a workflow for HDR imaging.|http://qtpfsgui.sourceforge.net/|{{Pkg|luminancehdr}}}}<br />
* {{App|[[Wikipedia:UFRaw|nUFRaw]]|Utility to read and manipulate raw images from digital cameras using DCRaw.|https://sourceforge.net/projects/nufraw/|{{Pkg|gimp-nufraw}}}}<br />
* {{App|Oqapy|Photographic workflow application.|https://oqapy.eu/|{{AUR|oqapy}}}}<br />
* {{App|[[Wikipedia:Rawstudio|Rawstudio]]|Raw-image converter written in GTK.|https://rawstudio.org/|{{AUR|rawstudio}}}}<br />
* {{App|[[Wikipedia:RawTherapee|RawTherapee]]|A powerful cross-platform raw image processing program.|http://www.rawtherapee.com/|{{Pkg|rawtherapee}}}}<br />
<br />
==== Vector graphics editors ====<br />
<br />
See also [[Wikipedia:Comparison of vector graphics editors]].<br />
<br />
* {{App|[[Wikipedia:Dia (software)|Dia]]|GTK-based diagram creation program.|https://wiki.gnome.org/Apps/Dia|{{Pkg|dia}}}}<br />
* {{App|diagrams.net|Diagram drawing application built on web technology. Based on the [https://electronjs.org/ Electron] platform.|https://www.diagrams.net/|{{AUR|drawio-desktop}}}}<br />
* {{App|Gravit Designer|Proprietary vector design application. Based on the [https://electronjs.org/ Electron] platform.|https://designer.io/|{{AUR|gravit-designer-bin}}}}<br />
* {{App|[[Inkscape]]|Vector graphics editor, with capabilities similar to [[Wikipedia:Adobe Illustrator|Illustrator]], [[Wikipedia:CorelDRAW|CorelDraw]], or [[Wikipedia:Xara X|Xara X]], using the SVG (Scalable Vector Graphics) file format. Inkscape supports many advanced SVG features (markers, clones, alpha blending, etc.) and great care is taken in designing a streamlined interface. It is very easy to edit nodes, perform complex path operations, trace bitmaps and much more. It's developers also aim to maintain a thriving user and developer community by using open, community-oriented development.|https://inkscape.org/|{{Pkg|inkscape}}}}<br />
* {{App|[[Wikipedia:Karbon (software)|Karbon]]|Vector graphics editor, part of the Calligra Suite.|https://www.calligra.org/karbon/|{{Pkg|calligra}}}}<br />
* {{App|[[LibreOffice|LibreOffice Draw]]|Vector graphics editor and diagramming tool included in the LibreOffice suite similar to Microsoft Visio.|https://www.libreoffice.org/discover/draw/|{{Pkg|libreoffice-still}} or {{Pkg|libreoffice-fresh}}}}<br />
* {{App|Milton|Infinite-canvas paint program.|https://www.miltonpaint.com/|{{AUR|milton}}}}<br />
* {{App|Mockingbot|Proprietary prototyping & collaboration design tool. Based on the [https://electronjs.org/ Electron] platform.|https://mockingbot.com/|{{AUR|mockingbot}}}}<br />
* {{App|[[OpenOffice|OpenOffice Draw]]|Vector graphics editor and diagramming tool included in the OpenOffice suite.|http://www.openoffice.org/product/draw.html|{{AUR|openoffice}}}}<br />
* {{App|[[Wikipedia:Pencil2D|Pencil Project]]|GUI prototyping and mockup tool. Based on the [https://electronjs.org/ Electron] platform.|http://pencil.evolus.vn/|{{AUR|pencil}}}}<br />
* {{App|[[Wikipedia:SK1 (program)|sK1]]|Replacement for Adobe Illustrator or CorelDraw, oriented for "prepress ready" PostScript & PDF output.|https://sk1project.net/|{{AUR|sk1}}}}<br />
* {{App|SvgVi|SVG viewer and editor using XML declarations.|https://gitlab.com/pwmc/svgvi|{{AUR|svgvi}}}}<br />
* {{App|[[Wikipedia:yEd|yEd]]|General-purpose proprietary diagramming program for flowcharts, network diagrams, UML diagrams, BPMN diagrams, mind maps, organization charts, and Entity Relationship diagrams.|https://www.yworks.com/products/yed|{{AUR|yed}}}}<br />
* {{App|[[Wikipedia:Xfig|Xfig]]|Interactive drawing tool.|http://mcj.sourceforge.net/|{{AUR|xfig}}}}<br />
<br />
==== Font editors ====<br />
<br />
See also [[Wikipedia:Comparison of font editors]].<br />
<br />
* {{App|Birdfont|Font editor which lets you create vector graphics and export TTF, EOT and SVG fonts.|https://birdfont.org/|{{Pkg|birdfont}}}}<br />
* {{App|[[Wikipedia:FontForge|FontForge]]|Outline font editor.|https://fontforge.github.io/|{{Pkg|fontforge}}}}<br />
* {{App|TruFont|Font-editing application.|http://trufont.github.io/|{{AUR|trufont}}}}<br />
<br />
==== 2D animation ====<br />
<br />
* {{App|[[Wikipedia:Toonz|OpenToonz]]|2D animation creation software.|https://opentoonz.github.io/e/|{{Pkg|opentoonz}}}}<br />
* {{App|[[Wikipedia:Pencil2D|Pencil2D]]|Easy, intuitive tool to make 2D hand-drawn animations.|https://www.pencil2d.org/|{{Pkg|pencil2d}}}}<br />
* {{App|qStopMotion|Application for creating stop-motion animation movies. The users will be able to create stop-motions from pictures imported from a camera or from the harddrive and export the animation to different video formats such as mpeg or avi.|http://qstopmotion.org/|{{Pkg|qstopmotion}}}}<br />
* {{App|Stopmotion|Application to create stop-motion animations. It helps you capture and edit the frames of your animation and export them as a single file.|http://linuxstopmotion.org/|{{AUR|stopmotion}}}}<br />
* {{App|[[Wikipedia:Synfig|Synfig Studio]]|2D animation software, designed as powerful industrial-strength solution for creating film-quality animation using a vector and bitmap artwork.|https://www.synfig.org/|{{Pkg|synfigstudio}}}}<br />
* {{App|[[Wikipedia:Tupi (software)|TupiTube Desk]]|Desktop application to create and share 2D animations, focused on kids and teenagers.|https://www.maefloresta.com/|{{Pkg|tupitube}}}}<br />
<br />
The drawing application [[Wikipedia:Krita|Krita]] and the 3D editor [[Blender]] (Grease Pencil mode) have both 2D animation features too.<br />
<br />
==== 3D computer graphics ====<br />
<br />
See also [[Wikipedia:Comparison of 3D computer graphics software]].<br />
<br />
* {{App|Art of Illusion|3D modeling and rendering studio written in Java.|http://www.artofillusion.org/|{{AUR|aoi}}}}<br />
* {{App|[[Blender]]|Fully integrated 3D graphics creation suite capable of 3D modeling, texturing, and animation, among other things.|https://www.blender.org/|{{Pkg|blender}}}}<br />
* {{App|Dust3D|3D modeling software. It helps you create a 3D watertight base model in seconds. Use it to speed up your character modeling in game making, 3D printing, and so on.|https://dust3d.org/|{{AUR|dust3d}}}}<br />
* {{App|F3D|A fast and minimalist KISS 3D viewer. Supported file formats: VTK (legacy and XML), STL, GLTF, PLY, OBJ, 3DS, …|https://kitware.github.io/F3D/|{{AUR|f3d}}}}<br />
* {{App|Goxel|Open Source 3D voxel editor.|https://guillaumechereau.github.io/goxel/|{{AUR|goxel}}}}<br />
* {{App|[[Wikipedia:MakeHuman|MakeHuman™]]|Parametrical modeling program for creating human bodies.|http://www.makehumancommunity.org/|{{AUR|makehuman}}}}<br />
* {{App|[[Wikipedia:Sweet_Home_3D|Sweet Home 3D]]|Interior design software application for the planning and development of floor plans|http://sweethome3d.com/|{{Pkg|sweethome3d}}}}<br />
* {{App|[[Wikipedia:POV-Ray|POV-Ray]]|Script-based raytracer for creating 3D graphics.|http://www.povray.org/|{{Pkg|povray}}}}<br />
* {{App|VoxelShop|Extremely intuitive and powerful software to modify and create voxel objects.|https://blackflux.com/node/11|{{AUR|voxelshop}}}}<br />
* {{App|[[Wikipedia:Wings3d|Wings 3D]]|Advanced subdivision modeler that is both powerful and easy to use.|http://www.wings3d.com/|{{Pkg|wings3d}}}}<br />
<br />
==== Color pickers and palettes ====<br />
<br />
* {{App|Agave|Colorscheme designer tool for GNOME.|https://web.archive.org/web/20170327063642/http://home.gna.org/colorscheme/|{{AUR|agave}}}}<br />
* {{App|Chameleon|Simple color picker for X11 which outputs colors to stdout.|https://github.com/seebye/chameleon|{{AUR|chameleon-git}}}}<br />
* {{App|ColorGrab|Cross-platform color picker.|https://github.com/nielssp/colorgrab|{{AUR|colorgrab}}}}<br />
* {{App|Color Palette|Tool for viewing the GNOME color palette as defined by the design guidelines.|https://gitlab.gnome.org/World/design/palette|{{AUR|palette}}}}<br />
* {{App|colorpicker|Click on a pixel on your screen and print its color value in RGB. Written for X11.|https://github.com/Jack12816/colorpicker|{{AUR|colorpicker}}}}<br />
* {{App|Color Picker|Simplistic color picker for the Pantheon desktop.|https://github.com/RonnyDo/ColorPicker|{{AUR|color-picker}}}}<br />
* {{App|Coulr|Color box to help developers and designers.|https://github.com/Huluti/Coulr|{{AUR|coulr}}}}<br />
* {{App|Deepin Picker|Color picker tool for Deepin desktop.|https://www.deepin.org/en/original/deepin-picker/|{{Pkg|deepin-picker}}}}<br />
* {{App|delicolour|Lightweight GTK 3 color finder.|https://github.com/eepp/delicolour|{{AUR|delicolour}}}}<br />
* {{App|gcolor2|Simple GTK 2 color selector.|http://gcolor2.sourceforge.net/|{{Pkg|gcolor2}}}}<br />
* {{App|Gcolor3|Simple GTK 3 color selector.|https://www.hjdskes.nl/projects/gcolor3/|{{Pkg|gcolor3}}}}<br />
* {{App|GPick|Advanced color picker tool.|http://www.gpick.org/|{{Pkg|gpick}}}}<br />
* {{App|KColorChooser|Simple application to select the color from the screen or from a pallete. Part of {{Grp|kde-graphics}}.|https://www.kde.org/applications/graphics/kcolorchooser/|{{Pkg|kcolorchooser}}}}<br />
* {{App|MATE Color Selection|Choose colors from the palette or the screen. Run with {{ic|mate-color-select}}.|https://mate-desktop.org/|{{Pkg|mate-desktop}}}}<br />
* {{App|Pick|Simple color picker tool for the Linux desktop.|https://www.kryogenix.org/code/pick|{{AUR|pick-colour-picker}}}}<br />
* {{App|PrestoPalette|An artist's tool for creating harmonious color palettes.|https://github.com/PrestoPalette/PrestoPalette|{{AUR|prestopalette}}}}<br />
* {{App|xcolor|Lightweight color picker for X11.|https://soft.github.io/xcolor/|{{AUR|xcolor}}}}<br />
<br />
==== Screenshot ====<br />
<br />
See [[Screen capture#Screenshot software]].<br />
<br />
==== Digital camera managers ====<br />
<br />
See [[gPhoto#Installation]].<br />
<br />
=== Audio ===<br />
<br />
==== Audio systems ====<br />
<br />
See also the main article [[Sound system]] and [[Wikipedia:Sound server]].<br />
<br />
==== Audio players ====<br />
<br />
See also [[Wikipedia:Comparison of audio player software]].<br />
<br />
===== Server =====<br />
<br />
* {{App|[[Music Player Daemon]]|Audio player that has a server-client architecture. In order to interface with it, a separate client is needed.|https://www.musicpd.org/|{{Pkg|mpd}}}}<br />
<br />
===== Console =====<br />
<br />
* {{App|[[cmus]]|Very feature-rich ncurses-based music player.|https://cmus.github.io/|{{Pkg|cmus}}}}<br />
* {{App|Cplay|Curses front-end for various audio players (ogg123, mpg123, mpg321, splay, madplay, and mikmod, xmp, and sox).|https://directory.fsf.org/wiki/Cplay|{{AUR|cplay}}}}<br />
* {{App|Herrie|Minimalistic console-based music player with native AudioScrobbler support.|https://github.com/EdSchouten/herrie|{{AUR|herrie}}}}<br />
* {{App|[[MOC]]|Ncurses console audio player with support for the MP3, OGG, and WAV formats.|https://moc.daper.net/|{{Pkg|moc}}}}<br />
* {{App|MPFC|Gstreamer-based audio player with curses interface.|https://code.google.com/archive/p/mpfc/|{{AUR|mpfc}}}}<br />
* {{App|[[Wikipedia:Mpg123|mpg123]]|Fast free MP3 console audio player for Linux, FreeBSD, Solaris, HP-UX and nearly all other UNIX systems (also decodes MP1 and MP2 files).|https://www.mpg123.org/|{{Pkg|mpg123}}}}<br />
* {{App|[[pianobar]]|Console-based frontend for the online radio Pandora.|https://6xq.net/projects/pianobar/|{{Pkg|pianobar}}}}<br />
* {{App|vitunes|Curses-based music player and playlist manager with vim-like keybindings.|http://vitunes.org/|{{AUR|vitunes}}}}<br />
* {{App|whistle|Curses-based commandline audio player.|https://github.com/ap0calypse/whistle/|{{AUR|whistle-git}}}}<br />
* {{App|[[Wikipedia:XMMS2|XMMS2]]|Complete rewrite of the popular music player.|https://xmms2.org|{{Pkg|xmms2}}}}<br />
<br />
===== Graphical =====<br />
<br />
====== GStreamer-based ======<br />
<br />
* {{App|[[Wikipedia:Banshee (media player)|Banshee]]|[[Wikipedia:iTunes|iTunes]] clone, built with GTK and [[Mono]], feature-rich.|http://banshee.fm/|{{AUR|banshee}}}}<br />
* {{App|Byte|Music player designed for elementary OS.|https://github.com/alainm23/byte|{{AUR|byte}}}}<br />
* {{App|[[Wikipedia:Clementine_(software)|Clementine]]|Amarok 1.4 clone, ported to Qt5.|https://www.clementine-player.org/|{{Pkg|clementine}}}}<br />
* {{App|Cozy|Modern audio book player for Linux using GTK 3.|https://github.com/geigi/cozy|{{AUR|cozy-audiobooks}}}}<br />
* {{App|[[Exaile]]|GTK clone of Amarok.|https://www.exaile.org/|{{AUR|exaile}}}}<br />
* {{App|GNOME Internet Radio Locator|Easily find live radio programs based on geographical location of radio broadcasters on the Internet.|https://wiki.gnome.org/Apps/InternetRadioLocator|{{AUR|gnome-internet-radio-locator}}}}<br />
* {{App|GNOME Music|Music is the new GNOME music playing application. It aims to combine an elegant and immersive browsing experience with simple and straightforward controls.|https://wiki.gnome.org/Apps/Music|{{Pkg|gnome-music}}}}<br />
* {{App|Goodvibes|Lightweight internet radio player.|https://gitlab.com/goodvibes/goodvibes|{{AUR|goodvibes}}}}<br />
* {{App|Guayadeque|Full featured media player that can easily manage large collections and uses the GStreamer media framework.|https://www.guayadeque.org/|{{AUR|guayadeque}}}}<br />
* {{App|Lollypop|A GNOME music player.|https://wiki.gnome.org/Apps/Lollypop|{{Pkg|lollypop}}}}<br />
* {{App|Melody|Music player for listening to local music files, online radios and audio CD's.|http://anufrij.org/melody/|{{AUR|playmymusic}}}}<br />
* {{App|[[Wikipedia:Muine|Muine]]|A music player written in C Sharp.|https://gitlab.gnome.org/Archive/muine|{{AUR|muine}}}}<br />
* {{App|Pantheon Music|Simple, fast, and good looking music player. The official elementary music player.|https://github.com/elementary/music|{{Pkg|pantheon-music}}}}<br />
* {{App|Parlatype|Minimal audio player for manual speech transcription, for GNOME. It plays audio sources to transcribe them in your favorite text application.|https://gkarsay.github.io/parlatype/|{{AUR|parlatype}}}}<br />
* {{App|Pithos|Python/GTK Pandora Radio desktop client.|https://pithos.github.io/|{{AUR|pithos}}}}<br />
* {{App|Pragha|A lightweight two-panel GTK music manager written in C.|https://pragha-music-player.github.io/|{{Pkg|pragha}}}}<br />
* {{App|[[Wikipedia:Quod Libet (software)|Quod Libet]]|Audio player written with GTK, Python and GStreamer with support for regular expressions in playlists.|https://github.com/quodlibet/quodlibet/|{{Pkg|quodlibet}}}}<br />
* {{App|Radiotray-NG|Internet radio player systray applet.|https://github.com/ebruck/radiotray-ng|{{AUR|radiotray-ng}}}}<br />
* {{App|[[Rhythmbox]]|GTK clone of iTunes, used by default in GNOME.|https://wiki.gnome.org/Apps/Rhythmbox|{{Pkg|rhythmbox}}}}<br />
* {{App|Sayonara|Small, clear and fast audio player for Linux written in C++, uses the Qt framework.|https://sayonara-player.com/|{{AUR|sayonara-player}}}}<br />
* {{App|Shortwave|GTK 3 application for finding and listening to internet radio stations.|https://gitlab.gnome.org/World/Shortwave|{{AUR|shortwave}}}}<br />
* {{App|Strawberry|Fork of Clementine aimed at audio enthusiasts and music collectors.|https://strawbs.org/|{{Pkg|strawberry}}}}<br />
* {{App|Tauon Music Box|Modern, comfortable and streamlined music player for the playback of your music collection.|https://tauonmusicbox.rocks/|{{AUR|tauon-music-box}}}}<br />
<br />
====== Phonon-based ======<br />
<br />
* {{App|[[Amarok]]|Mature Qt-based player known for its plethora of features.|https://amarok.kde.org/|{{AUR|amarok}}}}<br />
* {{App|[[Wikipedia:JuK|JuK]]|JuK is an audio jukebox application, supporting collections of MP3, Ogg Vorbis, and FLAC audio files.|https://www.kde.org/applications/multimedia/juk/|{{Pkg|juk}}}}<br />
<br />
====== Other ======<br />
<br />
* {{App|[[Wikipedia:Aqualung (software)|Aqualung]]|Advanced music player, which plays audio CDs, internet radio streams and podcasts as well as soundfiles in just about any audio format and has the feature of inserting no gaps between adjacent tracks.|https://aqualung.jeremyevans.net/|{{AUR|aqualung}}}}<br />
* {{App|ArchSimian|Graphical Qt-based playlist creator that mines data from the user's MediaMonkey database.|https://github.com/Harpo3/archsimian|{{AUR|archsimian-git}}}}<br />
* {{App|[[Audacious]]|[[Wikipedia:Winamp|Winamp]] clone like Beep and old XMMS versions.|https://audacious-media-player.org/|{{Pkg|audacious}}}}<br />
* {{App|[[Wikipedia:DeaDBeeF|DeaDBeeF]]|Light and fast music player with many features, no GNOME or KDE dependencies, supports console-only, as well as a GTK GUI, comes with many plugins, and has a metadata editor.|https://deadbeef.sourceforge.io/|{{Pkg|deadbeef}}}}<br />
* {{App|Deepin Music|Awesome music player with brilliant and tweakful UI Deepin-UI based.|https://www.deepin.org/en/original/deepin-music/|{{Pkg|deepin-music}}}}<br />
* {{App|Elisa|Simple music player by the KDE community aiming to provide a nice experience for its users.|https://community.kde.org/Elisa|{{Pkg|elisa}}}}<br />
* {{App|gmusicbrowser|Open-source jukebox for large collections of MP3/OGG/FLAC files.|https://gmusicbrowser.org/|{{AUR|gmusicbrowser}}}}<br />
* {{App|Goggles Music Manager|Music collection manager and player that automatically categorizes your music, supports gapless playback, features easy tag editing, and internet radio support. Uses the [[Wikipedia:Fox toolkit|Fox toolkit]].|https://gogglesmm.github.io/|{{Pkg|gogglesmm}}}}<br />
* {{App|Google Play Music Desktop Player|Beautiful cross platform desktop player for Google Play Music. Based on the [https://electronjs.org/ Electron] platform.|https://googleplaymusicdesktopplayer.com/|{{AUR|gpmdp}}}}<br />
* {{App|LXMusic|A minimalist xmms2-based music player.|https://wiki.lxde.org/en/LXMusic|GTK 2: {{Pkg|lxmusic}}, GTK 3: {{Pkg|lxmusic-gtk3}}}}<br />
* {{App|MellowPlayer|A free, open source and cross-platform Qt-based desktop application that runs web-based music streaming services in its own window and provides integration with your desktop.|https://colinduquesnoy.gitlab.io/MellowPlayer/|{{AUR|mellowplayer}} {{AUR|mellowplayer-git}}}}<br />
* {{App|museeks|Minimalistic and easy to use music player. Based on the [https://electronjs.org/ Electron] platform.|https://museeks.io/|{{AUR|museeks-bin}}}}<br />
* {{App|Musique|Just another music player, only better.|https://flavio.tordini.org/musique|{{AUR|musique}}}}<br />
* {{App|Noson|Fast and smart controller for SONOS devices.|https://janbar.github.io/noson-app/|{{AUR|noson-app}}}}<br />
* {{App|Nuclear|Modern music player focused on streaming from free sources. Based on the [https://electronjs.org/ Electron] platform.|https://nuclear.gumblert.tech/|{{AUR|nuclear-player-bin}}}}<br />
* {{App|[[Wikipedia:qmmp|Qmmp]]|Qt-based multimedia player with a user interface that is similar to Winamp or XMMS.|http://qmmp.ylsoftware.com/|{{Pkg|qmmp}}}}<br />
* {{App|[[Spotify]]|Proprietary music streaming service. It supports local playback and streaming from Spotify's vast library (requires a free account).|https://www.spotify.com/|{{AUR|spotify}}}}<br />
* {{App|Upplay|Qt-based UPnP audio control point.|https://lesbonscomptes.com/upplay/|{{AUR|upplay}}}}<br />
* {{App|Vvave|Tiny Qt music player to keep your favorite songs at hand.|https://vvave.kde.org/|{{Pkg|babe}}}}<br />
* {{App|Yarock|Modern looking music player, packed with features, that doesn’t depend on any specific desktop environment. Yarock is designed to provide an easy and pretty music browser based on cover art.|https://seb-apps.github.io/yarock/|{{AUR|yarock-mpv}}}}<br />
<br />
==== Audio tag editors ====<br />
<br />
===== Console =====<br />
<br />
* {{App|[[Beets]]|Music library organizer, tagger and more.|http://beets.io/|{{Pkg|beets}}}}<br />
* {{App|Demlo|Batch music tagger, encoder, renamer and more.|https://ambrevar.bitbucket.io/demlo/|{{AUR|demlo}}}}<br />
* {{App|id3|Command-line utility to edit ID3 1.x and 2.x tags.|https://squell.github.io/id3/|{{AUR|id3}}}}<br />
* {{App|id3ted|Command line id3 tag editor.|https://muennich.github.io/id3ted/|{{AUR|id3ted}}}}<br />
* {{App|id3v2|Command line editor for id3v2 tags.|http://id3v2.sourceforge.net/|{{Pkg|id3v2}}}}<br />
* {{App|MP3Info|MP3 technical info viewer and ID3 1.x tag editor.|https://ibiblio.org/mp3info/|{{Pkg|mp3info}}}}<br />
* {{App|MP3Unicode|Command line utility to convert ID3 tags in mp3 files between different encodings.|http://mp3unicode.sourceforge.net/|{{Pkg|mp3unicode}}}}<br />
* {{App|Taffy|Simple command-line tag editor for many audio formats.|https://github.com/jangler/taffy|{{AUR|taffy}}}}<br />
* {{App|Tagutil|CLI tool to edit music file's tag. It aims to provide both an easy-to-script interface and ease of use interactively.|https://github.com/kAworu/tagutil|{{AUR|tagutil}}}}<br />
<br />
===== Graphical =====<br />
<br />
* {{App|Audio Tag Tool|Tool to edit tags in MP3 and Ogg Vorbis files.|https://github.com/impegoraro/tagtool|{{AUR|tagtool}}}}<br />
* {{App|Coquillo|Metadata editor for various audio formats.|https://github.com/sjuvonen/coquillo|{{AUR|coquillo}}}}<br />
* {{App|[[Wikipedia:EasyTag|EasyTag]]|Utility for viewing, editing and writing ID3 tags of music files, supports many audio formats.|https://wiki.gnome.org/Apps/EasyTAG|{{Pkg|easytag}}}}<br />
* {{App|[[Wikipedia:Ex Falso (software)|Ex Falso]]|Cross-platform free and open source audio tag editor and library organizer. Run with {{ic|exfalso}}.|https://github.com/quodlibet/quodlibet/|{{Pkg|quodlibet}}}}<br />
* {{App|GabTag|Audio tagging tool written in GTK.|https://github.com/lachhebo/gabtag|{{AUR|gabtag}}}}<br />
* {{App|Kid3|MP3, Ogg/Vorbis, FLAC, MPC, MP4/AAC, MP2, Speex, TrueAudio, WavPack, WMA, WAV and AIFF files tag editor.|https://kid3.kde.org/|KDE: {{Pkg|kid3}}, Qt: {{Pkg|kid3-qt}}}}<br />
* {{App|KTag Editor|ID3v tag editor developed in Qt5 framework. Supported files are mp3, wav, ogg, wma, flac, asf.|http://karoljkocmaros.blogspot.com/p/ktag-editor.html|{{AUR|ktageditor}}}}<br />
* {{App|MP3Info GUI|MP3 technical info viewer and ID3 1.x tag editor. The graphical interface can be launched with the {{ic|gmp3info}} command.|https://ibiblio.org/mp3info/|{{Pkg|mp3info}}}}<br />
* {{App|[[Wikipedia:MusicBrainz Picard|Picard]]|Cross-platform audio tag editor written in Python (the official [[Wikipedia:MusicBrainz|MusicBrainz]] tagger).|https://picard.musicbrainz.org/|{{Pkg|picard}}}}<br />
* {{App|[[Wikipedia:Puddletag|Puddletag]]|Replacement for the famous MP3tag for Windows.|http://docs.puddletag.net/|{{AUR|puddletag}}}}<br />
* {{App|Qoobar|Universal Qt-based audio tagger (specialized for classical music).|http://qoobar.sourceforge.net/en/index.htm|{{AUR|qoobar}}}}<br />
* {{App|Tag Editor|A tag editor with Qt GUI and command-line interface supporting MP4/M4A/AAC (iTunes), ID3v1/ID3v2, Vorbis, Opus, FLAC and Matroska.|https://github.com/Martchus/tageditor|{{AUR|tageditor}}}}<br />
* {{App|Thunar Media Tags Plugin|Adds special features for media files to the Thunar File Manager, including the ability to edit tags.|https://goodies.xfce.org/projects/thunar-plugins/thunar-media-tags-plugin|{{Pkg|thunar-media-tags-plugin}}}}<br />
<br />
==== Lyrics ====<br />
<br />
===== Lyrics players =====<br />
<br />
* {{App|Floodlight Presenter|Presentation and lyrics program for churches to display lyrics and media.|https://floodlight.gitlab.io/|{{AUR|floodlight-presenter}}}}<br />
* {{App|Lyrics|Display lyrics on media players with [[MPRIS]] interface.|https://github.com/naaando/lyrics|{{AUR|lyrics}}}}<br />
* {{App|OSD Lyrics|Lyric show compatible with various media players.|https://github.com/osdlyrics/osdlyrics|{{Pkg|osdlyrics}}}}<br />
<br />
===== Lyrics downloaders =====<br />
<br />
* {{App|clyrics|Extensible lyrics fetcher, with daemon support for cmus and mocp.|https://github.com/trizen/clyrics|{{AUR|clyrics}}}}<br />
* {{App|glyrc|Command-line music related metadata searchengine, including support for downloading lyrics.|https://github.com/sahib/glyr|{{Pkg|glyr}}}}<br />
<br />
===== Lyrics editors =====<br />
<br />
* {{App|Karaoke Lyrics Editor|Lyrics editor and CD+G/video exporter for Karaoke.|https://www.ulduzsoft.com/linux/karaoke-lyrics-editor/|{{AUR|karlyriceditor}}}}<br />
* {{App|LyricsX|Lyrics editor.|https://github.com/timxx/lyricsx|{{AUR|lyricsx}}}}<br />
<br />
==== Audio converters ====<br />
<br />
* {{App|Caudec|A multiprocess command line audio converter that supports many formats (FLAC, MP3, Ogg Vorbis, Windows codecs and many more)|http://caudec.cocatre.net/|{{AUR|caudec}}}}<br />
* {{App|[[Wikipedia:Ecasound|Ecasound]]|Command line tools designed for multitrack audio processing. It can be used for simple tasks like audio playback, recording and format conversions, as well as for multitrack effect processing, mixing, recording and signal recycling.|https://nosignal.fi/ecasound/|{{Pkg|ecasound}}}}<br />
* {{App|FFaudioConverter|Batch audio converter and effects processor. It can convert files or whole folders containing music and video files to other audio formats with FFmpeg.|https://github.com/Bleuzen/FFaudioConverter|{{AUR|ffaudioconverter}}}}<br />
* {{App|Flacon|Extracts individual tracks from one big audio file containing the entire album of music and saves them as separate audio files.|https://flacon.github.io/|{{AUR|flacon}}}}<br />
* {{App|[[Wikipedia:Fre:ac|fre:ac]]|Audio converter and CD ripper with support for various popular formats and encoders.|https://freac.org/|{{AUR|freac}}}}<br />
* {{App|Gnac|Audio converter for GNOME.|http://gnac.sourceforge.net/|{{Pkg|gnac}}}}<br />
* {{App|SoundConverter|A graphical application to convert audio files into different formats.|https://soundconverter.org/|{{pkg|soundconverter}}}}<br />
* {{App|soundKonverter|Qt-based GUI front-end to various audio converters.|https://github.com/dfaust/soundkonverter|{{pkg|soundkonverter}}}}<br />
* {{App|[[Wikipedia:SoX|SoX]]|Command line utility that can convert various formats of computer audio files into other formats.|http://sox.sourceforge.net/|{{Pkg|sox}}}}<br />
* {{App|XCFA|Tool to extract the content of audio CDs and convert files to various formats.|http://www.xcfa.tuxfamily.org/|{{AUR|xcfa}}}}<br />
<br />
==== Audio editors ====<br />
<br />
See also [[Wikipedia:Comparison of digital audio editors]].<br />
<br />
* {{App|[[Wikipedia:Audacity (audio editor)|Audacity]]|Program that lets you manipulate digital audio waveforms.|https://www.audacityteam.org/|{{Pkg|audacity}}}}<br />
* {{App|GNOME Sound Recorder|The Sound Recorder application enables you to record and play .flac, .ogg (OGG audio, or .oga), and .wav sound files.|https://wiki.gnome.org/Apps/SoundRecorder|{{Pkg|gnome-sound-recorder}}}}<br />
* {{App|[[Wikipedia:Gnome Wave Cleaner|Gnome Wave Cleaner]]|Digital audio editor to denoise, dehiss and amplify audio files.|http://gwc.sourceforge.net/|{{AUR|gwc}}}}<br />
* {{App|Kwave|Sound editor for KDE.|http://kwave.sourceforge.net/|{{Pkg|kwave}}}}<br />
* {{App|mhWaveEdit|Graphical program for editing, playing and recording sound files.|https://github.com/magnush/mhwaveedit/|{{AUR|mhwaveedit}}}}<br />
* {{App|[[Wikipedia:Mp3splt|Mp3splt]]|Utility to split mp3, ogg vorbis and native FLAC files selecting a begin and an end time position, without decoding.|http://mp3splt.sourceforge.net/|CLI: {{Pkg|mp3splt}}, GUI: {{Pkg|mp3splt-gtk}}}}<br />
* {{App|ocenaudio|Proprietary cross-platform, easy to use, fast and functional audio editor.|https://www.ocenaudio.com/en/|{{AUR|ocenaudio-bin}} or {{AUR|ocenaudio}}}}<br />
* {{App|Play it Slowly|Play back audio files at a different speed or pitch.|https://29a.ch/playitslowly|{{Pkg|playitslowly}}}}<br />
* {{App|Polyphone|A soundfont editor to create and edit a musical instrument based on samples, using the sf2 format.|https://www.polyphone-soundfonts.com/|{{Pkg|polyphone}}}}<br />
* {{App|[[Wikipedia:Sweep (software)|Sweep]]|Audio editor and live playback tool.|http://www.metadecks.org/software/sweep/|{{Pkg|sweep}}}}<br />
* {{App|[[Wikipedia:WaveSurfer|WaveSurfer]]|Tool for sound visualization and manipulation. Typical applications are speech/sound analysis and sound annotation/transcription.|https://www.speech.kth.se/wavesurfer/|{{AUR|wavesurfer}}}}<br />
<br />
==== Digital audio workstations ====<br />
<br />
See also [[Professional audio]].<br />
<br />
* {{App|[[Wikipedia:Ardour (software)|Ardour]]|Multichannel hard disk recorder and digital audio workstation.|https://ardour.org/|{{Pkg|ardour}}}}<br />
* {{App|[[Wikipedia:Bitwig Studio|Bitwig Studio]]|Proprietary professional digital audio workstation.|https://www.bitwig.com/en/home.html|{{AUR|bitwig-studio}}}}<br />
* {{App|Frinika|Digital audio workstation, features sequencer, soft-synths, realtime effects and audio recording.|http://www.frinika.com/|{{AUR|frinika}}}}<br />
* {{App|[[LMMS]]|Digital audio workstation which allows you to produce music with your computer.|https://lmms.io/|{{Pkg|lmms}}}}<br />
* {{App|[[Wikipedia:MusE|MusE]]|MIDI/Audio sequencer (digital audio workstation) with recording and editing capabilities, aims to be a complete multitrack virtual studio for Linux.|https://muse-sequencer.github.io//|{{Pkg|muse}}}}<br />
* {{App|Non|Modular digital audio workstation composed of four main parts: Timeline, Sequencer, Mixer and Session Manager.|https://non.tuxfamily.org/|{{Pkg|non-timeline}}, {{Pkg|non-sequencer}}, {{Pkg|non-mixer}}, {{Pkg|new-session-manager}}}}<br />
* {{App|[[Wikipedia:Qtractor|Qtractor]]|Qt-based hard disk recorder and digital audio workstation application that aims to provide digital audio workstation software simple enough for the average home user, and yet powerful enough for the professional user.|https://qtractor.sourceforge.io/qtractor-index.html|{{Pkg|qtractor}}}}<br />
* {{App|[[Wikipedia:REAPER|REAPER]]|Proprietary digital audio workstation, offering a full multitrack audio and MIDI recording, editing, processing, mixing and mastering toolset.|https://www.reaper.fm/|{{AUR|reaper-bin}}}}<br />
* {{App|[[Wikipedia:Rosegarden|Rosegarden]]|Digital audio workstation program developed with ALSA and Qt that acts as an audio and MIDI sequencer, scorewriter and musical composition and editing tool.|https://www.rosegardenmusic.com/|{{Pkg|rosegarden}}}}<br />
* {{App|[[Wikipedia:Tracktion Waveform|Tracktion Waveform]]|Proprietary digital audio workstation, specifically designed for the needs of modern music producers.|https://www.tracktion.com/|{{AUR|tracktion-waveform}}}}<br />
* {{App|[[Wikipedia:Traverso DAW|Traverso]]|Multitrack audio recorder and editor with a very clean and intuitive interface which supports ALSA and Jack as the sound driver.|https://traverso-daw.org/|{{AUR|traverso}}}}<br />
<br />
==== Audio analyzers ====<br />
<br />
* {{App|audioprism|Spectrogram tool for PulseAudio input and WAV files.|https://github.com/vsergeev/audioprism|{{AUR|audioprism}}}}<br />
* {{App|[[Wikipedia:BRP-PACU|BRP-PACU]]|Dual channel FFT based acoustic analysis tool to help engineers analyze live professional sound systems using the transfer function.|https://sourceforge.net/projects/brp-pacu/|{{AUR|brp-pacu}}}}<br />
* {{App|Baudline|Proprietary time-frequency and spectrogram analyzer|http://www.baudline.com/index.html|{{AUR|baudline-bin}}}}<br />
* {{App|FMIT|Graphical utility for tuning your musical instruments, with error and volume history and advanced features.|http://gillesdegottex.github.io/fmit/|{{AUR|fmit}}}}<br />
* {{App|Friture|Real-time audio analyzer.|http://friture.org/|{{AUR|friture}}}}<br />
* {{App|rtspeccy|Real time audio spectrum analyzer.|https://www.uninformativ.de/git/rtspeccy/|{{AUR|rtspeccy-git}}}}<br />
* {{App|sndpeek|Real-time audio visualization tool.|https://soundlab.cs.princeton.edu/software/sndpeek/|ALSA: {{AUR|sndpeek-alsa}}, JACK: {{AUR|sndpeek-jack}}}}<br />
* {{App|[[Wikipedia:Sonic Visualiser|Sonic Visualiser]]|Viewing and analyzing the contents of music audio files.|https://www.sonicvisualiser.org/|{{Pkg|sonic-visualiser}}}}<br />
* {{App|Spek|Helps to analyse your audio files by showing their spectrogram.|http://spek.cc/|{{AUR|spek}}}}<br />
<br />
==== Scorewriters ====<br />
<br />
See also [[LilyPond#Front-ends]] and [[Wikipedia:Comparison of scorewriters]].<br />
<br />
* {{App|Aria Maestosa|MIDI sequencer/editor. It lets you compose, edit and play MIDI files with a few clicks in a user-friendly interface offering score, keyboard, guitar, drum and controller views.|https://ariamaestosa.github.io/ariamaestosa/docs/index.html|{{AUR|ariamaestosa}}}}<br />
* {{App|[[Wikipedia:Canorus|Canorus]]|Music score editor. It supports an unlimited number and length of staffs, polyphony, a MIDI playback of notes, chord markings, lyrics, import/export filters to formats like MIDI, MusicXML, ABC Music, MusiXTeX and LilyPond.|https://sourceforge.net/projects/canorus/|{{Pkg|canorus}}}}<br />
* {{App|[[Wikipedia:Impro-Visor|Impro-Visor]]|Music notation program designed to help jazz musicians compose and hear solos similar to ones that might be improvised.|https://www.cs.hmc.edu/~keller/jazz/improvisor/|{{AUR|impro-visor}}}}<br />
* {{App|[[LilyPond]]|Music engraving program, devoted to producing the highest-quality sheet music possible.|https://lilypond.org/|{{Pkg|lilypond}}}}<br />
* {{App|[[Wikipedia:MuseScore|MuseScore]]|Create, playback, and print sheet music.|https://musescore.org/|{{Pkg|musescore}}}}<br />
* {{App|[[Wikipedia:TuxGuitar|TuxGuitar]]|Multitrack guitar tablature editor and player.|http://tuxguitar.com.ar/|{{AUR|tuxguitar}}}}<br />
<br />
==== Audio synthesis environments ====<br />
<br />
See also [[Wikipedia:Comparison of audio synthesis environments]].<br />
<br />
* {{App|Blue|Music composition environment for Csound, written in Java.|https://blue.kunstmusik.com/|{{AUR|csound-blue}}}}<br />
* {{App|Cabbage|Framework for audio software development using simple markup text and the Csound audio synthesis language.|https://cabbageaudio.com/|{{AUR|cabbage}}}}<br />
* {{App|[[Wikipedia:ChucK|ChucK]]|Strongly-timed, concurrent, and on-the-fly music programming language.|https://chuck.cs.princeton.edu/|{{Pkg|chuck}}}}<br />
* {{App|[[Wikipedia:Csound|Csound]]|Sound and music computing system.|https://csound.com/|{{Pkg|csound}}}}<br />
* {{App|CsoundQt|Frontend for Csound featuring a highlighting editor with autocomplete, interactive widgets and integrated help.|https://csoundqt.github.io/|{{Pkg|csoundqt}}}}<br />
* {{App|FoxDot|Live Coding with Python and SuperCollider.|https://foxdot.org/|{{Pkg|foxdot}}}}<br />
* {{App|[[Wikipedia:Pure Data|Pure Data]]|Real-time music and multimedia environment.|http://msp.ucsd.edu/software.html|{{Pkg|pd}}}}<br />
* {{App|[[Wikipedia:Sonic Pi|Sonic Pi]]|Code-based music creation and performance tool.|https://sonic-pi.net/|{{Pkg|sonic-pi}}}}<br />
* {{App|[[Wikipedia:SuperCollider|SuperCollider]]|Platform for audio synthesis and algorithmic composition, used by musicians, artists, and researchers working with sound.|https://supercollider.github.io/|{{Pkg|supercollider}}}}<br />
* {{App|[[VCV Rack]]| Virtual Eurorack DAW. Use a plugin systems to add more [[WIkipedia:Eurorack|Eurorack]] emulated modules.|https://vcvrack.com/|{{AUR|vcvrack}}}}<br />
<br />
==== Sound generators ====<br />
<br />
This section contains [[Wikipedia:Drum machine|drum machines]], [[Wikipedia:Software sampler|software samplers]] and [[Wikipedia:Software synthesizer|software synthesizers]].<br />
<br />
* {{App|ams|Alsa Modular Synth. Realtime modular synthesizer and effect processor.|http://alsamodular.sourceforge.net/|{{Pkg|ams}}}}<br />
* {{App|[[Wikipedia:Amsynth|amsynth]]|Analog Modelling SYNTHesizer. Easy-to-use software synthesizer with a classic subtractive synthesizer topology.|https://amsynth.github.io/|{{Pkg|amsynth}}}}<br />
* {{App|[[Wikipedia:Din (din is noise)|DIN]]|Sound synthesizer and musical instrument.|https://dinisnoise.org/|{{Pkg|din}}}}<br />
* {{App|Drumstick|Set of MIDI tools: drum grid, MIDI player, virtual piano.|https://drumstick.sourceforge.io/|{{Pkg|drumstick}}}}<br />
* {{App|Element|A modular LV2/VST3 audio plugin host.|https://kushview.net/element/|{{Pkg|element}}}}<br />
* {{App|Fluajho|SF2 soundfont sample player for JACK based on Fluidsynth.|https://www.laborejo.org/fluajho/|{{Pkg|fluajho}}}}<br />
* {{App|[[FluidSynth]]|Real-time software synthesizer based on the SoundFont 2 specifications.|http://www.fluidsynth.org/|{{Pkg|fluidsynth}}}}<br />
* {{App|Geonkick|Synthesizer that can synthesize elements of percussion. The most basic examples are: kicks, snares, hit-hats, shakers, claps.|https://gitlab.com/iurie-sw/geonkick|{{Pkg|geonkick}}}}<br />
* {{App|Gigedit|Graphical instrument editor for sample based virtual instruments, based on the GigaStudio/Gigasampler file format.|http://doc.linuxsampler.org/Gigedit/|{{Pkg|gigedit}}}}<br />
* {{App|GSequencer|Provides various tools to play, create, edit and mix your own music. It features a step sequencer, piano roll, automation and wave-form editor.|https://nongnu.org/gsequencer/|{{AUR|gsequencer}}}}<br />
* {{App|Helm|Software synthesizer to create electronic music on your computer.|https://tytel.org/helm/|{{Pkg|helm-synth}}}}<br />
* {{App|[[Wikipedia:Hydrogen (software)|Hydrogen]]|Advanced drum machine to create drum sequences.|https://github.com/hydrogen-music/hydrogen|{{Pkg|hydrogen}}}}<br />
* {{App|JSampler|Java GUI for [[LinuxSampler]] software audio sampler.|http://jsampler.sourceforge.net/|{{Pkg|jsampler}}}}<br />
* {{App|Patroneo|Easy to use pattern based midi sequencer.|https://www.laborejo.org/patroneo/|{{Pkg|patroneo}}}}<br />
* {{App|[[Wikipedia:PySynth|PySynth]]|Suite of simple music synthesizers and helper scripts written in Python 3.|https://mdoege.github.io/PySynth/|{{AUR|python-pysynth-git}}}}<br />
* {{App|QMidiArp|Advanced MIDI arpeggiator, programmable step sequencer and LFO.|http://qmidiarp.sourceforge.net/|{{Pkg|qmidiarp}}}}<br />
* {{App|QMidiRoute|MIDI router and processor for ALSA.|http://alsamodular.sourceforge.net/|{{Pkg|qmidiroute}}}}<br />
* {{App|Qsampler|Qt GUI for [[LinuxSampler]] software audio sampler.|https://qsampler.sourceforge.io/|{{Pkg|qsampler}}}}<br />
* {{App|Qsynth|Qt GUI for Fluidsynth.|https://qsynth.sourceforge.io/|{{Pkg|qsynth}}}}<br />
* {{App|Qwertone|Simple music synthesizer app (like a toy-piano), but based on usual qwerty-keyboard for input.|https://gitlab.com/azymohliad/qwertone|{{AUR|qwertone-git}}}}<br />
* {{App|setBfree|DSP tonewheel organ.|http://setbfree.org/|{{Pkg|setbfree}}}}<br />
* {{App|SpectMorph|Analyze samples of musical instruments and combine them (morphing).|http://spectmorph.org/|{{Pkg|spectmorph}}}}<br />
* {{App|[[Timidity|TiMidity++]]|Software synthesizer, which can play MIDI files by converting them into PCM waveform data.|http://timidity.sourceforge.net/|{{Pkg|timidity++}}}}<br />
* {{App|Vee One Suite|Old-school software instruments: synthv1, a polyphonic subtractive synthesizer; samplv1, a polyphonic sampler synthesizer; drumkv1, yet another drum-kit sampler; padthv1, a polyphonic additive synthesizer.|https://www.rncbc.org/|{{Pkg|synthv1}}, {{Pkg|samplv1}}, {{Pkg|drumkv1}}, {{Pkg|padthv1}}}}<br />
* {{App|Vico|Minimalistic Midi sequencer that is intended to be used in parallel with other software.|https://www.laborejo.org/vico/|{{Pkg|vico}}}}<br />
* {{App|VMPK|Virtual MIDI Piano Keyboard. MIDI events generator and receiver. It can use midi SoundFonts to generate sound by itself, or can be used to drive a MIDI synthesizer.|https://vmpk.sourceforge.io/|{{Pkg|vmpk}}}}<br />
* {{App|[[Wikipedia:Yoshimi (synthesizer)|Yoshimi]]|Software synthesizer, a fork of ZynAddSubFX.|http://yoshimi.sourceforge.net/|{{Pkg|yoshimi}}}}<br />
* {{App|[[Wikipedia:ZynAddSubFX|ZynAddSubFX]]|Fully featured software synthesizer capable of making a countless number of instruments, from some common heard from expensive hardware to interesting sounds that you will boost to an amazing universe of sounds.|https://zynaddsubfx.sourceforge.io/|{{Pkg|zynaddsubfx}}}}<br />
<br />
==== Music trackers ====<br />
<br />
* {{App|[[Wikipedia:Buzztrax|Buzztrax]]|Music studio to compose songs using only a computer with a soundcard.|https://news.buzztrax.org/|{{AUR|buzztrax}}}}<br />
* {{App|klystrack|Tracker for making C64/NES/Amiga-style chiptunes on a modern platform.|https://kometbomb.github.io/klystrack/|{{AUR|klystrack-git}}}}<br />
* {{App|[[Wikipedia:MilkyTracker|MilkyTracker]]|Music application for creating .MOD and .XM module files.|https://milkytracker.titandemo.org/|{{Pkg|milkytracker}}}}<br />
* {{App|[[Wikipedia:OpenMPT|OpenMPT]]|Tracker software to create and play back some great music on your computer.|https://openmpt.org/|{{AUR|openmpt}}}}<br />
* {{App|Radium|Music editor with a new type of interface.|https://users.notam02.no/~kjetism/radium/|{{AUR|radium}}}}<br />
* {{App|Schism Tracker|Create high quality music without the requirements of specialized, expensive equipment, and with a unique "finger feel" that is difficult to replicate in part.|http://schismtracker.org/|{{AUR|schismtracker}}}}<br />
<br />
==== DJ ====<br />
<br />
* {{App|Giada|Minimal, hardcore audio tool for DJs, live performers and electronic musicians.|https://giadamusic.com/|{{Pkg|giada}}}}<br />
* {{App|IDJC|Powerful yet easy to use source-client for individuals interested in streaming live radio shows over the Internet using Shoutcast or Icecast servers.|http://idjc.sourceforge.net/|{{AUR|idjc}}}}<br />
* {{App|Luppp|Music creation tool, intended for live use. The focus is on real time processing and a fast and intuitive workflow.|http://openavproductions.com/luppp/|{{Pkg|luppp}}}}<br />
* {{App|[[Wikipedia:Mixxx|Mixxx]]|Integrates the tools DJs need to perform creative live mixes with digital music files.|https://mixxx.org/|{{Pkg|mixxx}}}}<br />
* {{App|[[Seq24]]|Minimal loop based MIDI sequencer for a live performance with a very simple interface for editing and playing MIDI 'loops'.|http://filter24.org/seq24/|{{AUR|seq24-bzr}}}}<br />
* {{App|[[Wikipedia:xwax|xwax]]|Digital Vinyl System (DVS) for Linux. It allows DJs and turntablists to playback digital audio files (MP3, Ogg Vorbis, FLAC, AAC and more), controlled using a normal pair of turntables via timecoded vinyls.|http://xwax.org/|{{Pkg|xwax}}}}<br />
<br />
==== Audio effects ====<br />
<br />
* {{App|Calf Plugin Pack for JACK|Process and produce sounds using a set of plugins with JACK interface. ({{ic|calfjackhost}})|https://calf-studio-gear.org/|{{Pkg|calf}}}}<br />
* {{App|Carla|Audio plugin host, with support for many audio drivers and plugin formats.|https://kxstudio.linuxaudio.org/Applications:Carla|{{Pkg|carla}}}}<br />
* {{App|guitarix|Virtual guitar amplifier for JACK.|https://guitarix.org/|{{Pkg|guitarix}}}}<br />
* {{App|PulseEffects|Apply effects to Pulseaudio applications and input sources|https://github.com/wwmm/pulseeffects|{{Pkg|pulseeffects}}}}<br />
* {{App|Rakarrack|Richly featured multi-effects processor emulating a guitar effects pedalboard.|http://rakarrack.sourceforge.net/|{{AUR|rakarrack}}}}<br />
<br />
==== Audio visualizers ====<br />
<br />
* {{App|C.A.V.A.|Console-based audio visualizer for ALSA, MPD and PulseAudio.|https://karlstav.github.io/cava/|{{AUR|cava}}}}<br />
* {{App|Cavalcade|GTK GUI for C.A.V.A.|https://github.com/worron/cavalcade/|{{AUR|cavalcade}}}}<br />
* {{App|cli-visualizer|Highly configurable CLI-based audio visualizer.|https://github.com/dpayne/cli-visualizer|{{AUR|cli-visualizer}}}}<br />
* {{App|GLava|OpenGL audio spectrum visualizer. Its primary use case is for desktop windows or backgrounds.|https://github.com/wacossusca34/glava|{{Pkg|glava}}}}<br />
* {{App|GLMViz|Fully configurable OpenGL music visualizer.|https://github.com/hannesha/GLMViz|{{AUR|glmviz-git}}}}<br />
* {{App|[[projectM]]|Music visualizer which uses 3D accelerated iterative image-based rendering.|https://github.com/projectM-visualizer/projectm|{{Pkg|projectm-pulseaudio}}}}<br />
* {{App|[[Wikipedia:VSXu|VSXu]]|OpenGL-based (hardware-accelerated), modular programming environment with its main purpose to visualize music and create graphic effects in real-time.|http://www.vsxu.com/|{{AUR|vsxu}}}}<br />
<br />
==== Volume control ====<br />
<br />
See also [[PulseAudio#Front-ends]].<br />
<br />
* {{App|[[Wikipedia:alsamixer|alsamixer]]|Soundcard mixer for ALSA soundcard driver, with ncurses interface.|https://alsa-project.org/|{{Pkg|alsa-utils}}}}<br />
* {{App|ALSA Tray|Provides a systray icon and a command line interface for setting the volume of the ALSA Mixers.|https://projects.flogisoft.com/alsa-tray/|{{AUR|alsa-tray}}}}<br />
* {{App|AlsaVolume|Tray ALSA volume changer written using gtkmm.|https://github.com/Vitozz/cppAlsaVolume|{{AUR|cpp-alsa-volume}}}}<br />
* {{App|AMixST|Volume wheel using ALSA and Qt5.|https://github.com/FenixFyreX/amixst|{{AUR|amixst}}}}<br />
* {{App|Emixer|Utility to control volume levels. Part of Enlightenment.|https://www.enlightenment.org/about-enlightenment|{{Pkg|enlightenment}}}}<br />
* {{App|GNOME ALSA Mixer|ALSA mixer for GNOME.|https://launchpad.net/gnome-alsamixer|{{AUR|gnome-alsamixer}}}}<br />
* {{App|GVolWheel|Audio mixer which lets you control the volume through a tray icon.|https://sourceforge.net/projects/gvolwheel/|{{AUR|gvolwheel}}}}<br />
* {{App|KMix|KDE volume control program.|https://kde.org/applications/multimedia/kmix/|{{Pkg|kmix}}}}<br />
* {{App|MATE Volume Control|Audio mixer application and system tray applet for MATE to mix audio and adjust volume levels of various audio mixer devices.|https://github.com/mate-desktop/mate-media|{{Pkg|mate-media}}}}<br />
* {{App|PNMixer|A fork of Obmixer. It has many new features such as ALSA channel selection, connect/disconnect detection, shortcuts, etc.|https://github.com/nicklan/pnmixer/wiki|{{AUR|pnmixer}}}}<br />
* {{App|QasTools|Collection of desktop applications for the Linux sound system ALSA. It provides QasMixer (mixer), QasHctl (HCTL mixer) and QasConfig (configuration browser).|https://gitlab.com/sebholt/qastools|{{Pkg|qastools}}}}<br />
* {{App|Retrovol|Retro-looking volume setting tray applet.|https://github.com/pizzasgood/retrovol|{{AUR|retrovol}}}}<br />
* {{App|[[Volnoti]]|A lightweight volume notification daemon for GNU/Linux and other POSIX operating systems.|https://github.com/davidbrazdil/volnoti|{{AUR|volnoti}}}}<br />
* {{App|Volti|A GTK application for controlling audio volume from system tray with an internal mixer and support for multimedia keys that uses only ALSA.|https://github.com/gen2brain/volti|{{AUR|volti}}}}<br />
* {{App|Volume Icon|Another volume control for your system tray with channel selection, themes and an external mixer.|http://nullwise.com/volumeicon.html|{{Pkg|volumeicon}}}}<br />
* {{App|VolWheel|A little application which lets you control the sound volume easily through a tray icon you can scroll on.|https://oliwer.net/b/volwheel.html|{{AUR|volwheel}}}}<br />
* {{App|Xfce ALSA Panel Plugin|Simple ALSA volume control plugin for [[Xfce]]4 panel.|https://github.com/equeim/xfce4-alsa-plugin|{{AUR|xfce4-alsa-plugin}}}}<br />
<br />
==== CD ripping ====<br />
<br />
See [[Optical disc drive#Audio CD]].<br />
<br />
=== Video ===<br />
<br />
==== Video players ====<br />
<br />
See also [[Wikipedia:Comparison of video player software]].<br />
<br />
===== Console =====<br />
<br />
* {{App|[[FFmpeg|FFplay]]|Very simple and portable media player using the FFmpeg libraries and the SDL library.|https://ffmpeg.org/|{{Pkg|ffmpeg}}}}<br />
* {{App|[[GStreamer|gst-play-1.0]]|Simple command line playback testing tool for GStreamer.|https://gstreamer.freedesktop.org/|{{Pkg|gst-plugins-base-libs}}}}<br />
* {{App|[[MPlayer]]|Video player that supports a complete and versatile array of video and audio formats.|https://mplayerhq.hu/design7/news.html|{{Pkg|mplayer}}}}<br />
* {{App|[[mpv]]|Movie player based on MPlayer and mplayer2.|https://mpv.io/|{{Pkg|mpv}}}}<br />
* {{App|[[VLC media player]]|Command-line version of the famous video player that can play smoothly high definition videos in the TTY. The rc interface can be launched with {{ic|vlc -I rc}}, and the ncurses interface can be launched with {{ic|vlc -I ncurses}}.|https://www.videolan.org/vlc/|{{Pkg|vlc}}}}<br />
<br />
===== Graphical =====<br />
<br />
====== GStreamer-based ======<br />
<br />
* {{App|Cinema|Video player and manager for watching local video files.|http://anufrij.org/cinema/|{{AUR|playmyvideos}}}}<br />
* {{App|Glide|Simple and minimalistic media player relying on GStreamer for the multimedia support and GTK+ for the user interface.|https://github.com/philn/glide|{{AUR|glide-player}}}}<br />
* {{App|[[Wikipedia:GNOME Videos|GNOME Videos]]|Media player (audio and video) for the GNOME desktop that uses [[GStreamer]]. Part of {{Grp|gnome}}.|https://wiki.gnome.org/Apps/Videos|{{Pkg|totem}}}}<br />
* {{App|Movie Monad|Free and simple to use video player made with Haskell using [[GStreamer]] and GTK. Precompiled and no Haskell dependency in run-time. |https://lettier.github.io/movie-monad/|{{AUR|movie-monad}}}}<br />
* {{App|Pantheon Videos|Video player and library app designed for elementary OS using [[GStreamer]].|https://github.com/elementary/videos|{{Pkg|pantheon-videos}}}}<br />
* {{App|Parole|Modern media player based on the [[GStreamer]] framework.|https://docs.xfce.org/apps/parole/start|{{Pkg|parole}}}}<br />
* {{App|Rage|Video and audio player written with Enlightenment Foundation Libraries with some extra bells and whistles. Uses [[GStreamer]]|https://www.enlightenment.org/about-rage|{{AUR|rage}}}}<br />
* {{App|Snappy|Powerful media player with a minimalistic interface that uses [[GStreamer]].|https://wiki.gnome.org/Apps/Snappy|{{Pkg|snappy-player}}}}<br />
* {{App|Spivak|Karaoke player based on [[GStreamer]] and Qt5.|https://github.com/gyunaev/spivak|{{AUR|spivak}}}}<br />
* {{App|Xnoise|GTK and [[GStreamer]]-based media player for both audio and video with "a slick GUI, great speed and lots of features." (development ceased)|http://xnoise-media-player.com/|{{Pkg|xnoise}}}}<br />
<br />
====== mpv-based ======<br />
<br />
* {{App|Baka MPlayer|Free and open source, cross-platform, [[mpv]] based multimedia player (Qt 5).|https://github.com/u8sand/Baka-MPlayer|{{Pkg|baka-mplayer}}}}<br />
* {{App|Celluloid|Simple GTK frontend for [[mpv]], formerly GNOME MPV.|https://celluloid-player.github.io/|{{Pkg|celluloid}}}}<br />
* {{App|Deepin Movie|Movie player for Deepin desktop based on [[mpv]].|https://www.deepin.org/en/original/deepin-movie/|{{Pkg|deepin-movie}}}}<br />
* {{App|Haruna Video Player|Qt/QML video player built on top of [[mpv]].|https://github.com/g-fb/haruna|{{AUR|haruna-git}}}}<br />
* {{App|Kawaii-Player|Audio/video manager and multimedia player (based on [[mpv]]) with PC-to-PC casting feature, along with functionalities of portable media server and torrent streaming server.|https://github.com/kanishka-linux/kawaii-player|{{AUR|kawaii-player}}}}<br />
* {{App|KittehPlayer|A YouTube-like video player based on Qt, QML and [[mpv]].|https://github.com/NamedKitten/KittehPlayer|{{AUR|kittehplayer-git}}}}<br />
* {{App|Media Player Classic Qute Theater|Clone of [[Wikipedia:Media Player Classic|Media Player Classic]] reimplimented in Qt and based on [[mpv]].|https://gitlab.com/mpc-qt/mpc-qt|{{AUR|mpc-qt}}, {{AUR|mpc-qt-git}}}}<br />
* {{App|Minitube|YouTube desktop application written in C++ using [[mpv]] and Qt.|https://flavio.tordini.org/minitube|{{Pkg|minitube}}}}<br />
* {{App|MoonPlayer|Video player for playing and downloading online videos from YouTube, Youku etc.|https://github.com/coslyk/moonplayer|{{AUR|moonplayer}}}}<br />
* {{App|[[mpv]]|Very basic GUI for mpv. Can be launched with {{ic|mpv --player-operation-mode&#61;pseudo-gui}}.|https://mpv.io/|{{Pkg|mpv}}}}<br />
* {{App|[[Wikipedia:SMPlayer|SMPlayer]]|Qt multimedia player with extra features (CSS themes, YouTube integration, etc.) based on [[mpv]]. It can use [[MPlayer]] as alternative backend.|https://www.smplayer.info/|{{Pkg|smplayer}}}}<br />
* {{App|xt7-player-mpv|Qt/Gambas GUI to [[mpv]] with a rich set of configurable options including filters and drivers, ladspa plugins support as well as library/playlist managment, YouTube, online radios, podcasts, DVB-T and more.|https://github.com/kokoko3k/xt7-player-mpv|{{AUR|xt7-player-mpv}}}}<br />
<br />
====== MPlayer-based ======<br />
<br />
* {{App|GNOME MPlayer|Simple GTK-based GUI for [[MPlayer]].|https://sites.google.com/site/kdekorte2/gnomemplayer|{{Pkg|gnome-mplayer}}}}<br />
* {{App|KPlayer|Multimedia player for KDE4 using [[MPlayer]] as a backend.|http://kplayer.sourceforge.net/|{{AUR|kplayer}}}}<br />
<br />
====== Phonon-based ======<br />
<br />
* {{App|[[Wikipedia:Dragon Player|Dragon Player]]|Simple video player for KDE based on [[Phonon]]. Part of the {{Grp|kde-multimedia}} group.|https://www.kde.org/applications/multimedia/dragonplayer/|{{Pkg|dragon}}}}<br />
* {{App|[[Wikipedia:KMPlayer|KMPlayer]]|Simple [[Phonon]]-based video player for KDE and video player plugin for Konqueror. It can use [[MPlayer]] as alternative backend.|https://kmplayer.kde.org/|{{Pkg|kmplayer}}}}<br />
<br />
====== Other ======<br />
<br />
* {{App|FreeTube|Desktop YouTube player built with privacy in mind. Use YouTube without advertisements and prevent Google from tracking you with their cookies and JavaScript. Based on the [https://electronjs.org/ Electron] platform.|https://freetubeapp.io/|{{AUR|freetube-bin}}}}<br />
* {{App|[[Wikipedia:Kaffeine|Kaffeine]]|Very versatile KDE media player that, by default, utilizes [[VLC]] as its backend and has excellent support of digital TV ([[DVB-T]], DVB-C, [[DVB-S]]).|https://www.kde.org/applications/multimedia/kaffeine/|{{Pkg|kaffeine}}}}<br />
* {{App|Kaku|Highly integrated music player supports different online platform like YouTube, SoundCloud, Vimeo and more. Based on the [https://electronjs.org/ Electron] platform.|https://kaku.rocks/|{{AUR|kaku-bin}}}}<br />
* {{App|[[Kodi]]|Media player and entertainment hub for digital media.|https://kodi.tv/|{{Pkg|kodi}}}}<br />
* {{App|QMPlay2|Qt based video player. It can play and stream all formats supported by [[FFmpeg]] and libmodplug. It has on integrated module system, which includes a YouTube browser.|https://github.com/zaps166/QMPlay2|{{AUR|qmplay2}}}}<br />
* {{App|QtAV Player|Simple media player based on QtAV and [[FFmpeg]]. Run with {{ic|Player}} or {{ic|QMLPlayer}}.|https://www.qtav.org/|{{Pkg|qtav}}}}<br />
* {{App|[[Wikipedia:tvtime|tvtime]]|High quality television application for use with video capture cards.|https://linuxtv.org/|{{Pkg|tvtime}}}}<br />
* {{App|[[VLC media player]]|Middleweight video player with support for a wide variety of audio and video formats.|https://www.videolan.org/vlc/|{{Pkg|vlc}}}}<br />
* {{App|[[Wikipedia:xine|xine]]|Free multimedia player.|https://www.xine-project.org/|{{Pkg|xine-ui}}}}<br />
* {{App|Xjadeo|Video player that displays a video-clip in sync with an external time source (MTC, LTC, JACK-transport).|http://xjadeo.sourceforge.net/|{{Pkg|xjadeo}}}}<br />
* {{App|YUView|Qt-based YUV player with an advanced analytic toolset.|https://github.com/IENT/YUView|{{AUR|yuview}}}}<br />
<br />
==== Video converters ====<br />
<br />
See also [[Wikipedia:Comparison of video converters]] and [[Codecs and containers#Container format tools]].<br />
<br />
===== Console =====<br />
<br />
* {{App|[[Wikipedia:Avidemux|Avidemux CLI]]|Free video editor designed for simple cutting, filtering and encoding tasks.|https://www.avidemux.org/|{{Pkg|avidemux-cli}}}}<br />
* {{App|[[FFmpeg]]|Complete, cross-platform solution to record, convert and stream audio and video.|https://ffmpeg.org/|{{Pkg|ffmpeg}}}}<br />
* {{App|[[Wikipedia:HandBrake|HandBrake CLI]]|Simple yet powerful video transcoder ideal for batch mkv/x264 ripping.|https://handbrake.fr/|{{Pkg|handbrake-cli}}}}<br />
* {{App|[[Wikipedia:MEncoder|MEncoder]]|Free command line video decoding, encoding and filtering tool.|https://mplayerhq.hu/design7/news.html|{{Pkg|mencoder}}}}<br />
* {{App|Transcode|Command line tool for video stream processing.|http://www.transcoding.org/|{{Pkg|transcode}}}}<br />
<br />
===== Graphical =====<br />
<br />
* {{App|Ciano|Simple multimedia file converter using FFmpeg and ImageMagick.|https://robertsanseries.github.io/ciano/|{{Pkg|ciano}}}}<br />
* {{App|FFmpegYAG|Advanced GUI for the popular FFmpeg audio/video encoding tool.|https://sourceforge.net/projects/ffmpegyag/|{{AUR|ffmpegyag}}}}<br />
* {{App|FF Multi Converter|Simple graphical application which enables you to convert audio, video, image and document files between all popular formats, by utilizing other command-line tools.|https://sites.google.com/site/ffmulticonverter/|{{AUR|ffmulticonverter}}}}<br />
* {{App|[[Wikipedia:HandBrake|HandBrake]]|Simple yet powerful video transcoder ideal for batch mkv/x264 ripping. GTK version.|https://handbrake.fr/|{{Pkg|handbrake}}}}<br />
* {{App|QWinFF|Qt5 GUI for FFmpeg that can read audio and video files in various formats and convert them into other formats.|https://qwinff.github.io/|{{AUR|qwinff}}}}<br />
* {{App|traGtor|Convert all your audio and video files through FFmpeg without using a terminal.|https://mein-neues-blog.de/tragtor-gui-for-ffmpeg/|{{AUR|tragtor}}}}<br />
* {{App|Transmageddon|Simple python application for transcoding video into formats supported by GStreamer.|http://www.linuxrising.org/ |{{Pkg|transmageddon}}}}<br />
* {{App|WinFF|Graphical video and audio batch converter using FFmpeg.|https://www.biggmatt.com/winff/|{{AUR|winff}}}}<br />
<br />
==== Video editors ====<br />
<br />
See also [[Wikipedia:Comparison of video editing software]].<br />
<br />
* {{App|[[Wikipedia:Avidemux|Avidemux]]|Free video editor designed for simple cutting, filtering and encoding tasks.|http://fixounet.free.fr/avidemux/| {{Pkg|avidemux-qt}}}}<br />
* {{App|[[Wikipedia:Blender_(software)#Video_editing|Blender]]|Fully integrated 3D graphics creation suite with a built-in non-linear video editor.|https://www.blender.org/|{{Pkg|blender}}}}<br />
* {{App|[[Wikipedia:Cinelerra|Cinelerra (Heroine Virtual)]]|Advanced video editing and compositing environment.|http://heroinewarrior.com/cinelerra.php|{{AUR|cinelerra-heroine}}}}<br />
* {{App|[[Wikipedia:Cinelerra|Cinelerra (Community Version)]]|Advanced video editing and compositing environment.|http://cinelerra-cv.wikidot.com/|{{AUR|cinelerra-cv}}}}<br />
* {{App|[[Wikipedia:Cinelerra|Cinelerra GG Infinity]]|Professional video editing and compositing environment.|https://www.cinelerra-gg.org/|{{AUR|cin-git}}}}<br />
* {{App|[[DaVinci Resolve]]|Proprietary A/V post-production software suite.|https://www.blackmagicdesign.com/products/davinciresolve/|{{AUR|davinci-resolve}}}}<br />
* {{App|[[Wikipedia:Flowblade|Flowblade]]|Multitrack non-linear video editor for Linux, designed to provide a fast, robust editing experience.|https://jliljebl.github.io/flowblade/|{{Pkg|flowblade}}}}<br />
* {{App|[[Wikipedia:Kdenlive|Kdenlive]]|Non-linear video editor designed for basic to semi-professional work.|https://kdenlive.org/|{{Pkg|kdenlive}}}}<br />
* {{App|[[Wikipedia:Lightworks|Lightworks]]|Professional proprietary non-linear editing system for editing and mastering digital video in various formats.|http://www.lwks.com/|{{AUR|lightworks}}}}<br />
* {{App|[[Wikipedia:LiVES|LiVES]]|Video editor and VJ (live performance) platform.|http://lives-video.com/|{{AUR|lives}}}}<br />
* {{App|LosslessCut|GUI tool for lossless trimming/cutting of video/audio files. Based on the [https://electronjs.org/ Electron] platform.|https://mifi.no/losslesscut/|{{AUR|losslesscut}}}}<br />
* {{App|[[Wikipedia:Natron (software)|Natron]]|Open-source compositing software. Node-graph based. Similar in functionalities to Adobe After Effects and Nuke by The Foundry.|https://natrongithub.github.io/|{{AUR|natron}}}}<br />
* {{App|Olive|Non-linear video editor aiming to provide a fully-featured alternative to high-end professional video editing software.<br />
|https://www.olivevideoeditor.org/|{{AUR|olive}}}}<br />
* {{App|[[Wikipedia:OpenShot_Video_Editor|OpenShot]]|Non-linear video editor based on MLT framework.|https://www.openshot.org/|{{Pkg|openshot}}}}<br />
* {{App|[[Wikipedia:Pitivi|Pitivi]]|Video editor designed to be intuitive and integrate well in the GNOME desktop.|http://www.pitivi.org/ |{{Pkg|pitivi}}}}<br />
* {{App|[[Wikipedia:Shotcut|Shotcut]]|Shotcut is a free, open source, cross-platform video editor.|https://www.shotcut.org/ |{{Pkg|shotcut}}}}<br />
* {{App|VidCutter|Fast lossless media cutter + joiner w/ frame-accurate SmartCut options powered by mpv, FFmpeg via a sleek Qt5 GUI.|https://vidcutter.ozmartians.com/|{{Pkg|vidcutter}}}}<br />
* {{App|Video Trimmer|Cut out a fragment of a video given the start and end timestamps. The video is never re-encoded, so the process is very fast and does not reduce the video quality.|https://gitlab.gnome.org/YaLTeR/video-trimmer|{{AUR|video-trimmer}}}}<br />
<br />
==== Subtitles ====<br />
<br />
===== Subtitle players =====<br />
<br />
* {{App|Penguin Subtitle Player|Standalone subtitle player that provides a translucent window which always stays on the top so subtitles can be shown on top of the video without blocking anything.|https://github.com/carsonip/Penguin-Subtitle-Player|{{Pkg|penguin-subtitle-player}}}}<br />
* {{App|SubtitlesPrinter|Print subtitles above a X-screen, independently of the video player.|https://github.com/OlivierMarty/SubtitlesPrinter|{{AUR|subtitles-printer-git}}}}<br />
<br />
===== Subtitle downloaders =====<br />
<br />
* {{App|QNapi|Qt client for downloading movie subtitles from NapiProjekt, OpenSubtitles, Napisy24.|https://qnapi.github.io/|{{Pkg|qnapi}}}}<br />
* {{App|subdl|Command-line tool for downloading subtitles from opensubtitles.org.|https://github.com/akexakex/subdl|{{Pkg|subdl}}}}<br />
* {{App|SubDownloader|Automatic download/upload of subtitles using fast hashing.|https://github.com/subdownloader/subdownloader|{{Pkg|subdownloader}}}}<br />
<br />
===== Subtitle editors =====<br />
<br />
See also [[Wikipedia:Comparison of subtitle editors]].<br />
<br />
* {{App|[[Wikipedia:Aegisub|Aegisub]]|Subtitle editor.|https://github.com/Aegisub/Aegisub|{{Pkg|aegisub}}}}<br />
* {{App|Gaupol|Full-featured subtitle editor.|https://otsaloma.io/gaupol/|{{Pkg|gaupol}}}}<br />
* {{App|[[Wikipedia:Gnome Subtitles|Gnome Subtitles]]|Video subtitle editor for GNOME.|http://www.gnomesubtitles.org/|{{Pkg|gnome-subtitles}}}}<br />
* {{App|Jubler|Open-source multiplatform subtitle editor written in Java.|https://www.jubler.org/|{{AUR|jubler}}}}<br />
* {{App|Subtitle Composer|Subtitle editor for KDE supporting various formats, features different player backends, able to display wave form.|https://invent.kde.org/multimedia/subtitlecomposer|{{AUR|subtitlecomposer}}}}<br />
* {{App|[[Wikipedia:Subtitle_Edit|Subtitle Edit]]|Subtitle editing program. Written in C# using mono.|https://github.com/SubtitleEdit/subtitleedit|{{AUR|subtitleedit}}}}<br />
* {{App|Subtitle Editor|GTK 3 tool to edit subtitles for GNU/Linux/*BSD.|http://kitone.github.io/subtitleeditor/|{{Pkg|subtitleeditor}}}}<br />
<br />
==== Screencast ====<br />
<br />
See [[Screen capture#Screencast software]].<br />
<br />
* {{App|Screenkey|A screencast tool to display your keys.|https://www.thregr.org/~wavexx/software/screenkey/|{{Pkg|screenkey}}}}<br />
<br />
==== Webcam ====<br />
<br />
See also [[FFmpeg#Recording webcam]] and [[Wikipedia:Comparison of webcam software]].<br />
<br />
* {{App|[[Wikipedia:Cheese (software)|Cheese]]|Take photos and videos with your webcam, with fun graphical effects.|https://wiki.gnome.org/Apps/Cheese|{{Pkg|cheese}}}}<br />
* {{App|fswebcam|Small and simple command line webcam software that generates images for a webcam.|https://www.sanslogic.co.uk/fswebcam/|{{AUR|fswebcam}}}}<br />
* {{App|[[Wikipedia:Guvcview|Guvcview]]|Simple interface for capturing and viewing video from v4l2 devices.|http://guvcview.sourceforge.net/|GTK: {{Pkg|guvcview}}, Qt: {{Pkg|guvcview-qt}}}}<br />
* {{App|Kamoso|Webcam recorder from KDE community.|https://userbase.kde.org/Kamoso|{{Pkg|kamoso}}}}<br />
* {{App|MJPG-streamer|Command line application which can be used to stream M-JPEG over an IP-based network from a webcam to various types of viewers.|https://github.com/jacksonliam/mjpg-streamer|{{AUR|mjpg-streamer-git}}}}<br />
* {{App|[[Motion]]|Highly configurable program that monitors video signals from many types of cameras. It is able to detect if a significant part of the picture has changed; in other words, it can detect motion.|https://motion-project.github.io/|{{Pkg|motion}}}}<br />
* {{App|Pantheon Camera|Camera app designed for elementary OS.|https://github.com/elementary/camera|{{Pkg|pantheon-camera}}}}<br />
* {{App|QtCAM|Webcam software with more than 10 image control settings, extension settings and color space switching.|https://www.e-consystems.com/opensource-linux-webcam-software-application.asp|{{AUR|qtcam-git}}}}<br />
* {{App|v4l2ucp|Universal control panel for V4L2 devices.|http://v4l2ucp.sourceforge.net/|{{AUR|v4l2ucp}}}}<br />
* {{App|v4l-utils|Provides a series of utilities for media devices.|https://linuxtv.org/|{{Pkg|v4l-utils}}}}<br />
* {{App|Webcamoid|Full featured webcam suite.|https://webcamoid.github.io/|{{AUR|webcamoid}}}}<br />
* {{App|ZArt|GUI for G'MIC real-time manipulations on the output of a webcam.|https://gmic.eu/|{{Pkg|zart}}}}<br />
<br />
==== DVD authoring ====<br />
<br />
See also [[Wikipedia:List of DVD authoring applications]].<br />
<br />
* {{App|Bombono DVD|DVD authoring program with nice and clean GUI.|http://bombono.com/|{{AUR|bombono-dvd}}}}<br />
* {{App|[[Wikipedia:DeVeDe|Devede]]|Program to create VideoDVDs and CDs.|https://rastersoft.com/programas/devede.html|{{Pkg|devede}}}}<br />
* {{App|[[Wikipedia:DVDStyler|DVDStyler]]|DVD authoring application for the creation of professional-looking DVDs.|https://www.dvdstyler.org/|{{Pkg|dvdstyler}}}}<br />
<br />
==== DVD ripping ====<br />
<br />
See [[Optical disc drive#DVD-Video]].<br />
<br />
==== Video thumbnails ====<br />
<br />
* {{App|vcsi|Create video contact sheets. A video contact sheet is an image composed of video capture thumbnails arranged on a grid.|https://github.com/amietn/vcsi|{{AUR|vcsi}}}}<br />
* {{App|Video Contact Sheet|Bash script meant to create video contact sheets (previews) of videos. Any video supported by mplayer and ffmpeg can be used.|http://p.outlyer.net/vcs|{{AUR|video-contact-sheet}}}}<br />
<br />
=== Collection managers ===<br />
<br />
* {{App|Data Crow|Media cataloger and media organizer.|https://datacrow.net/|{{AUR|datacrow}}}}<br />
* {{App|[[Wikipedia:GCstar|GCstar]]|GNOME application for organizing various collections (board games, comic books, movies, stamps, etc.).|http://www.gcstar.org/|{{AUR|gcstar}}}}<br />
* {{App|Griffith|Movie collection manager application.|https://gitlab.com/Strit/griffith|{{Pkg|griffith}}}}<br />
* {{App|MediaElch|Media manager for Kodi. Information about movies, TV shows, concerts and music are stored as nfo files.|https://www.kvibes.de/mediaelch/|{{Pkg|mediaelch}}}}<br />
* {{App|[[Wikipedia:Tellico_(software)|Tellico]]|KDE application for organizing various collections (books, video, music, coins, etc.).|https://tellico-project.org/|{{Pkg|tellico}}}}<br />
* {{App|tinyMediaManager|Media management tool to provide metadata for Kodi.|https://www.tinymediamanager.org/|{{AUR|tiny-media-manager}}}}<br />
* {{App|vMovieDB|Movie collection manager for the Gnome desktop.|https://sourceforge.net/projects/vmoviedb/|{{AUR|vmoviedb}}}}<br />
<br />
=== Media servers ===<br />
<br />
* {{App|Airsonic|Web-based media streamer, providing ubiquitous access to your music. (Fork of Subsonic.)|https://airsonic.github.io/|{{AUR|airsonic}}}}<br />
* {{App|[[Emby]]|Proprietary media server, which automatically converts and streams your media on-the-fly to play on any device.|https://emby.media/|{{Pkg|emby-server}}}}<br />
* {{App|forked-daapd|DAAP (iTunes) and MPD media server with support for AirPlay devices, Apple Remote, Chromecast, Spotify and internet radio.|http://ejurgensen.github.io/forked-daapd/|{{AUR|forked-daapd}}}}<br />
* {{App|Gerbera|UPnP Media Server to stream your media to devices on your home network. (Fork of MediaTomb.)|https://gerbera.io/|{{AUR|gerbera}}}}<br />
* {{App|[[Icecast]]|Streaming media (audio/video) server which currently supports Ogg (Vorbis and Theora), Opus, WebM and MP3 streams.|https://icecast.org/|{{Pkg|icecast}}}}<br />
* {{App|Jellyfin|Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media.|https://jellyfin.github.io/|{{AUR|jellyfin}}}}<br />
* {{App|[[Plex]]|Proprietary media server, which organizes your personal video, music, and photo collections and streams them to all of your devices.|https://www.plex.tv/|{{AUR|plex-media-server}}}}<br />
* {{App|[[ReadyMedia]]|Simple media server software, with the aim of being fully compliant with DLNA/UPnP-AV clients.|https://sourceforge.net/projects/minidlna/|{{Pkg|minidlna}}}}<br />
* {{App|[[Rygel]]|UPnP AV MediaServer and MediaRenderer that allows you to easily share audio, video and pictures, and control of media player on your home network.|https://wiki.gnome.org/Projects/Rygel|{{Pkg|rygel}}}}<br />
* {{App|Serviio|Proprietary media server, which allows you to stream your media files (music, video or images) to renderer devices (e.g. a TV set, Bluray player, games console or mobile phone) on your connected home network.|https://serviio.org/|{{AUR|serviio}}}}<br />
* {{App|[[Subsonic]]|Proprietary media server to stream from your own computer.|http://www.subsonic.org/|{{AUR|subsonic}}}}<br />
* {{App|[[Tvheadend]]|TV streaming server and recorder supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, ISDB-T, IPTV, SAT>IP and HDHomeRun as input sources.|https://tvheadend.org/|{{AUR|tvheadend}}}}<br />
* {{App|[[Universal Media Server]]|UPnP media server, which is capable of sharing video, audio and images between most modern devices. (Fork of PS3 Media Server.)|https://www.universalmediaserver.com/|{{AUR|ums}}}}<br />
<br />
=== Metadata ===<br />
<br />
* {{App|[[Wikipedia:ExifTool|ExifTool]]|Command-line application for reading, writing and editing meta information in a wide variety of files.|https://sno.phy.queensu.ca/~phil/exiftool/|{{Pkg|perl-image-exiftool}}}}<br />
* {{App|Exiv2|Command line utility to manage image metadata. It provides fast and easy read and write access to the Exif, IPTC and XMP metadata and the ICC Profile embedded within digital images in various formats.|https://exiv2.org/|{{Pkg|exiv2}}}}<br />
* {{App|[[Wikipedia:FFmpeg|ffprobe]]|Gather information from multimedia streams and print it in human- and machine-readable fashion.|https://ffmpeg.org/ffprobe.html|{{Pkg|ffmpeg}}}}<br />
* {{App|jExifToolGUI|Java/Swing graphical frontend for ExifTool, which reads and writes all kind of metadata tags from/to image files.|https://hvdwolf.github.io/jExifToolGUI/|{{AUR|jexiftoolgui}}}}<br />
* {{App|jhead|Exif jpeg header manipulation tool.|https://sentex.net/~mwandel/jhead/|{{Pkg|jhead}}}}<br />
* {{App|MediaConch|Implementation checker, policy checker, reporter, and fixer.|https://mediaarea.net/MediaConch|CLI: {{AUR|mediaconch}}, GUI: {{AUR|mediaconch-gui}}}}<br />
* {{App|[[Wikipedia:MediaInfo|MediaInfo]]|Convenient unified display of the most relevant technical and tag data for video and audio files.|https://mediaarea.net/en/MediaInfo|CLI: {{Pkg|mediainfo}}, GUI: {{Pkg|mediainfo-gui}}}}<br />
* {{App|[[Wikipedia:libsndfile|sndfile-info]]|Obtaining information about the contents of an audio file.|http://mega-nerd.com/libsndfile/|{{Pkg|libsndfile}}}}<br />
<br />
=== Mobile device managers ===<br />
<br />
* {{App|Android File Transfer|Interactive [[Media Transfer Protocol]] client with Qt5 GUI.|https://whoozle.github.io/android-file-transfer-linux/|{{Pkg|android-file-transfer}}}}<br />
* {{App|[[Wikipedia:Gnokii|gnokii]]|Tools and user space driver for use with mobile phones.|https://www.gnokii.org/|{{Pkg|gnokii}}}}<br />
* {{App|gMTP|Simple MP3 and media player client for [[Media Transfer Protocol]].|https://gmtp.sourceforge.io/|{{Pkg|gmtp}}}}<br />
* {{App|GNOME Phone Manager|Control your mobile phone from your GNOME desktop.|https://wiki.gnome.org/Attic/PhoneManager|{{Pkg|gnome-phone-manager}}}}<br />
* {{App|[[Wikipedia:gtkpod|gtkpod]]|GUI for Apple's iPod using GTK. It allows you to import your existing iTunes database, add songs, podcasts, videos and cover art, and to edit ID3 tags.|https://sourceforge.net/projects/gtkpod/|{{AUR|gtkpod}}}}<br />
* {{App|KDE Connect|Aims to communicate all your devices.|https://community.kde.org/KDEConnect|{{Pkg|kdeconnect}}}}<br />
* {{App|Modem Manager GUI|Control EDGE/3G/4G broadband modem specific functions.|https://linuxonly.ru/page/modem-manager-gui|{{Pkg|modem-manager-gui}}}}<br />
* {{App|Wammu|Manage data in your cell phone such as contacts, calendar or messages.|https://wammu.eu/|{{AUR|wammu}}}}<br />
<br />
=== Optical disc burning ===<br />
<br />
See [[Optical disc drive#Burning CD/DVD/BD with a GUI]].</div>Pdchttps://wiki.archlinux.org/index.php?title=Persistent_block_device_naming&diff=629439Persistent block device naming2020-08-04T15:33:59Z<p>Pdc: /* by-label */ exfatprogs is now in [Community]</p>
<hr />
<div>[[Category:Boot process]]<br />
[[Category:File systems]]<br />
[[Category:Hardware detection and troubleshooting]]<br />
[[es:Persistent block device naming]]<br />
[[it:Persistent block device naming]]<br />
[[ja:永続的なブロックデバイスの命名]]<br />
[[pt:Persistent block device naming]]<br />
[[zh-hans:Persistent block device naming]]<br />
{{Related articles start}}<br />
{{Related|fstab}}<br />
{{Related|udev}}<br />
{{Related|LVM}}<br />
{{Related articles end}}<br />
This article describes how to use persistent names for your [[block device]]s. This has been made possible by the introduction of [[udev]] and has some advantages over bus-based naming. If your machine has more than one SATA, SCSI or IDE disk controller, the order in which their corresponding device nodes are added is arbitrary. This may result in device names like {{ic|/dev/'''sda'''}} and {{ic|/dev/'''sdb'''}} switching around on each boot, culminating in an unbootable system, kernel panic, or a block device disappearing. Persistent naming solves these issues.<br />
<br />
{{Note|<br />
* Persistent naming has limits that are out-of-scope in this article. For example, while [[mkinitcpio]] may support a method, systemd may impose its own limits (e.g. {{Bug|42884}}) on naming it can process during boot. <br />
* This article is not relevant for [[LVM]] logical volumes as the {{ic|/dev/''VolumeGroupName''/''LogicalVolumeName''}} device paths are persistent.<br />
}}<br />
<br />
== Persistent naming methods ==<br />
<br />
There are four different schemes for persistent naming: [[#by-label|by-label]], [[#by-uuid|by-uuid]], [[#by-id and by-path|by-id and by-path]]. For those using disks with [[GUID Partition Table|GUID Partition Table (GPT)]], two additional schemes can be used [[#by-partlabel|by-partlabel]] and [[#by-partuuid|by-partuuid]]. You can also use [[#Static device names with udev|static device names by using Udev]].<br />
<br />
The directories in {{ic|/dev/disk/}} are created and destroyed dynamically, depending on whether there are devices in them.<br />
<br />
{{Note|Beware that [[Disk cloning]] creates two different disks with the same name.}}<br />
<br />
The following sections describe what the different persistent naming methods are and how they are used.<br />
<br />
The [[lsblk]] command can be used for viewing graphically the first persistent schemes:<br />
<br />
{{hc|$ lsblk -f|<br />
NAME FSTYPE LABEL UUID MOUNTPOINT<br />
sda <br />
├─sda1 vfat CBB6-24F2 /boot<br />
├─sda2 ext4 Arch Linux 0a3407de-014b-458b-b5c1-848e92a327a3 /<br />
├─sda3 ext4 Data b411dc99-f0a0-4c87-9e05-184977be8539 /home<br />
└─sda4 swap f9fe0b69-a280-415d-a03a-a32752370dee [SWAP]<br />
mmcblk0<br />
└─mmcblk0p1 vfat F4CA-5D75<br />
}}<br />
<br />
For those using [[GPT]], use the {{ic|blkid}} command instead. The latter is more convenient for scripts, but more difficult to read.<br />
<br />
{{hc|# blkid|2=<br />
/dev/sda1: UUID="CBB6-24F2" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="d0d0d110-0a71-4ed6-936a-304969ea36af" <br />
/dev/sda2: LABEL="Arch Linux" UUID="0a3407de-014b-458b-b5c1-848e92a327a3" TYPE="ext4" PARTLABEL="GNU/Linux" PARTUUID="98a81274-10f7-40db-872a-03df048df366" <br />
/dev/sda3: LABEL="Data" UUID="b411dc99-f0a0-4c87-9e05-184977be8539" TYPE="ext4" PARTLABEL="Home" PARTUUID="7280201c-fc5d-40f2-a9b2-466611d3d49e" <br />
/dev/sda4: UUID="f9fe0b69-a280-415d-a03a-a32752370dee" TYPE="swap" PARTLABEL="Swap" PARTUUID="039b6c1c-7553-4455-9537-1befbc9fbc5b"<br />
/dev/mmcblk0: PTUUID="0003e1e5" PTTYPE="dos"<br />
/dev/mmcblk0p1: UUID="F4CA-5D75" TYPE="vfat" PARTUUID="0003e1e5-01"<br />
}}<br />
<br />
=== by-label ===<br />
<br />
Almost every [[File systems#Types of file systems|file system type]] can have a label. All your volumes that have one are listed in the {{ic|/dev/disk/by-label}} directory.<br />
<br />
{{hc|$ ls -l /dev/disk/by-label|<br />
total 0<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 Data -> ../../sda3<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 Arch\x20Linux -> ../../sda2<br />
}}<br />
<br />
Most file systems support setting the label upon file system creation, see the [[man page]] of the relevant {{ic|mkfs.*}} utility. For some file systems it is also possible to change the labels. Following are some methods for changing labels on common file systems:<br />
<br />
; swap : {{ic|swaplabel -L "''new label''" /dev/''XXX''}} using {{pkg|util-linux}}<br />
; ext2/3/4 : {{ic|e2label /dev/''XXX'' "''new label''"}} using {{pkg|e2fsprogs}}<br />
; btrfs : {{ic|btrfs filesystem label /dev/''XXX'' "''new label''"}} using {{pkg|btrfs-progs}}<br />
; reiserfs : {{ic|reiserfstune -l "''new label''" /dev/''XXX''}} using {{pkg|reiserfsprogs}}<br />
; jfs : {{ic|jfs_tune -L "''new label''" /dev/''XXX''}} using {{pkg|jfsutils}}<br />
; xfs : {{ic|xfs_admin -L "''new label''" /dev/''XXX''}} using {{pkg|xfsprogs}}<br />
; fat/vfat : {{ic|fatlabel /dev/''XXX'' "''new label''"}} using {{pkg|dosfstools}}<br />
: {{ic|mlabel -i /dev/''XXX'' ::"''new label''"}} using {{pkg|mtools}}<br />
; exfat : {{ic|tune.exfat -L "''new label''" /dev/''XXX''}} using {{Pkg|exfatprogs}}<br />
: {{ic|exfatlabel /dev/''XXX'' "''new label''"}} using {{Pkg|exfat-utils}}<br />
; ntfs : {{ic|ntfslabel /dev/''XXX'' "''new label''"}} using {{pkg|ntfs-3g}}<br />
; udf : {{ic|udflabel /dev/''XXX'' "''new label''"}} using {{Pkg|udftools}}<br />
; crypto_LUKS (LUKS2 only) : {{ic|1=cryptsetup config --label="''new label''" /dev/''XXX''}} using {{Pkg|cryptsetup}}<br />
<br />
The label of a device can be obtained with ''lsblk'':<br />
<br />
{{hc|$ lsblk -dno LABEL /dev/sda2|<br />
Arch Linux<br />
}}<br />
<br />
Or with ''blkid'':<br />
<br />
{{hc|# blkid -s LABEL -o value /dev/sda2|<br />
Arch Linux<br />
}}<br />
<br />
{{Note|<br />
* The file system must not be mounted to change its label. For the root file system this can be accomplished by booting from another volume.<br />
* Labels have to be unambiguous to prevent any possible conflicts.<br />
* Labels can be up to 16 characters long.<br />
* Since the label is a property of the filesystem, it is not suitable for addressing a single RAID device persistently.<br />
* When using encrypted containers with [[dm-crypt]], the labels of filesystems inside of containers are not available while the container is locked/encrypted.<br />
}}<br />
<br />
=== by-uuid ===<br />
<br />
[[wikipedia:UUID|UUID]] is a mechanism to give each [[filesystem]] a unique identifier. These identifiers are generated by filesystem utilities (e.g. {{ic|mkfs.*}}) when the device gets formatted and are designed so that collisions are unlikely. All GNU/Linux filesystems (including swap and LUKS headers of raw encrypted devices) support UUID. FAT, exFAT and NTFS filesystems do not support UUID, but are still listed in {{ic|/dev/disk/by-uuid/}} with a shorter UID (unique identifier):<br />
<br />
{{hc|$ ls -l /dev/disk/by-uuid/|<br />
total 0<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 0a3407de-014b-458b-b5c1-848e92a327a3 -> ../../sda2<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 b411dc99-f0a0-4c87-9e05-184977be8539 -> ../../sda3<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 CBB6-24F2 -> ../../sda1<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 f9fe0b69-a280-415d-a03a-a32752370dee -> ../../sda4<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 F4CA-5D75 -> ../../mmcblk0p1<br />
}}<br />
<br />
The UUID of a device can be obtained with ''lsblk'':<br />
<br />
{{hc|$ lsblk -dno UUID /dev/sda1|<br />
CBB6-24F2<br />
}}<br />
<br />
Or with ''blkid'':<br />
<br />
{{hc|# blkid -s UUID -o value /dev/sda1|<br />
CBB6-24F2<br />
}} <br />
<br />
The advantage of using the UUID method is that it is much less likely that name collisions occur than with labels. Further, it is generated automatically on creation of the filesystem. It will, for example, stay unique even if the device is plugged into another system (which may perhaps have a device with the same label). <br />
<br />
The disadvantage is that UUIDs make long code lines hard to read and break formatting in many configuration files (e.g. [[fstab]] or [[crypttab]]). Also every time a volume is reformatted a new UUID is generated and configuration files have to get manually adjusted.<br />
<br />
{{Tip|In case your swap does not have an UUID assigned, you will need to reset it using the [[Swap#Swap partition|mkswap]] utility.}}<br />
<br />
=== by-id and by-path ===<br />
<br />
{{ic|by-id}} creates a unique name depending on the hardware serial number, {{ic|by-path}} depending on the shortest physical path (according to sysfs). Both contain strings to indicate which subsystem they belong to (i.e. {{ic|pci-}} for {{ic|by-path}}, and {{ic|ata-}} for {{ic|by-id}}), so they are linked to the hardware controlling the device. This implies different levels of persistence: the {{ic|by-path}} will already change when the device is plugged into a different port of the controller, the {{ic|by-id}} will change when the device is plugged into a port of a hardware controller subject to another subsystem. [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/persistent_naming.html] Thus, both are not suitable to achieve persistent naming tolerant to hardware changes. <br />
<br />
However, both provide important information to find a particular device in a large hardware infrastructure. For example, if you do not manually assign persistent labels ({{ic|by-label}} or {{ic|by-partlabel}}) and keep a directory with hardware port usage, {{ic|by-id}} and {{ic|by-path}} can be used to find a particular device.[http://linuxshellaccount.blogspot.in/2008/09/how-to-easily-find-wwns-of-qlogic-hba.html] [http://www.linuxquestions.org/questions/linux-server-73/how-to-find-wwn-for-dev-sdc-917269/]<br />
<br />
{{ic|by-id}} also creates [[Wikipedia:World Wide Name|World Wide Name]] links of storage devices that support it. Unlike other {{ic|by-id}} links, WWNs are fully persistent and will not change depending on the used subsystem.<br />
<br />
{{hc|$ ls -l /dev/disk/by-id/|<br />
total 0<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 ata-WDC_WD2500BEVT-22ZCT0_WD-WXE908VF0470 -> ../../sda<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 ata-WDC_WD2500BEVT-22ZCT0_WD-WXE908VF0470-part1 -> ../../sda1<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 ata-WDC_WD2500BEVT-22ZCT0_WD-WXE908VF0470-part2 -> ../../sda2<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 ata-WDC_WD2500BEVT-22ZCT0_WD-WXE908VF0470-part3 -> ../../sda3<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 ata-WDC_WD2500BEVT-22ZCT0_WD-WXE908VF0470-part4 -> ../../sda4<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 mmc-SD32G_0x0040006d -> ../../mmcblk0<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 mmc-SD32G_0x0040006d-part1 -> ../../mmcblk0p1<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 wwn-0x60015ee0000b237f -> ../../sda<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 wwn-0x60015ee0000b237f-part1 -> ../../sda1<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 wwn-0x60015ee0000b237f-part2 -> ../../sda2<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 wwn-0x60015ee0000b237f-part3 -> ../../sda3<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 wwn-0x60015ee0000b237f-part4 -> ../../sda4<br />
}}<br />
<br />
{{hc|$ ls -l /dev/disk/by-path/|<br />
total 0<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 pci-0000:00:1f.2-ata-1 -> ../../sda<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 pci-0000:00:1f.2-ata-1-part1 -> ../../sda1<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 pci-0000:00:1f.2-ata-1-part2 -> ../../sda2<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 pci-0000:00:1f.2-ata-1-part3 -> ../../sda3<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 pci-0000:00:1f.2-ata-1-part4 -> ../../sda4<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 pci-0000:07:00.0-platform-rtsx_pci_sdmmc.0 -> ../../mmcblk0<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 pci-0000:07:00.0-platform-rtsx_pci_sdmmc.0-part1 -> ../../mmcblk0p1<br />
}}<br />
<br />
=== by-partlabel ===<br />
<br />
{{Note|This method only concerns disks with [[GUID Partition Table|GUID Partition Table (GPT)]].}}<br />
<br />
GPT partition labels can be defined in the header of the [[Wikipedia:GUID Partition Table#Partition entries (LBA 2–33)|partition entry]] on GPT disks.<br />
<br />
This method is very similar to the [[#by-label|filesystem labels]], except the partition labels do not get affected if the file system on the partition is changed.<br />
<br />
All partitions that have partition labels are listed in the {{ic|/dev/disk/by-partlabel}} directory.<br />
<br />
{{hc|ls -l /dev/disk/by-partlabel/|<br />
total 0<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 EFI\x20system\x20partition -> ../../sda1<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 GNU\x2fLinux -> ../../sda2<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 Home -> ../../sda3<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 Swap -> ../../sda4<br />
}}<br />
<br />
The partition label of a device can be obtained with ''lsblk'':<br />
<br />
{{hc|$ lsblk -dno PARTLABEL /dev/sda1|<br />
EFI system partition<br />
}}<br />
<br />
Or with ''blkid'':<br />
<br />
{{hc|# blkid -s PARTLABEL -o value /dev/sda1|<br />
EFI system partition<br />
}}<br />
<br />
{{Note|<br />
* GPT partition labels also have to be different to avoid conflicts. To change your partition label, you can use [[gdisk]] or the ncurses-based version [[cgdisk]]. Both are available from the {{Pkg|gptfdisk}} package. See [[Partitioning#Partitioning tools]].<br />
* According to the specification, GPT partition labels can be up to 72 characters long.<br />
}}<br />
<br />
=== by-partuuid ===<br />
<br />
Like [[#by-partlabel|GPT partition labels]], GPT partition UUIDs are defined in the [[Wikipedia:GUID Partition Table#Partition entries (LBA 2–33)|partition entry]] on GPT disks.<br />
<br />
MBR does not support partition UUIDs, but Linux[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d33b98fc82b0908e91fb05ae081acaed7323f9d2] and software using libblkid[https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=d67cc2889a0527b26d7bb8c76f2acac46751d673] (e.g. udev[https://github.com/systemd/systemd/pull/3293]) are capable of generating pseudo PARTUUIDs for MBR partitions. The format is {{ic|''SSSSSSSS''-''PP''}}, where {{ic|''SSSSSSSS''}} is a zero-filled 32-bit [[Wikipedia:Master boot record#Disk identity|MBR disk signature]], and {{ic|''PP''}} is a zero-filled partition number in hexadecimal form. Unlike a regular PARTUUID of a GPT partition, MBR's pseudo PARTUUID can change if the partition number changes.<br />
<br />
The dynamic directory is similar to other methods and, like [[#by-uuid|filesystem UUIDs]], using UUIDs is preferred over labels.<br />
<br />
{{hc|ls -l /dev/disk/by-partuuid/|<br />
total 0<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 0003e1e5-01 -> ../../mmcblk0p1<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 039b6c1c-7553-4455-9537-1befbc9fbc5b -> ../../sda4<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 7280201c-fc5d-40f2-a9b2-466611d3d49e -> ../../sda3<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 98a81274-10f7-40db-872a-03df048df366 -> ../../sda2<br />
lrwxrwxrwx 1 root root 10 May 27 23:31 d0d0d110-0a71-4ed6-936a-304969ea36af -> ../../sda1<br />
}}<br />
<br />
The partition UUID of a device can be obtained with ''lsblk'':<br />
<br />
{{hc|$ lsblk -dno PARTUUID /dev/sda1|<br />
d0d0d110-0a71-4ed6-936a-304969ea36af<br />
}}<br />
<br />
Or with ''blkid'':<br />
<br />
{{hc|# blkid -s PARTUUID -o value /dev/sda1|<br />
d0d0d110-0a71-4ed6-936a-304969ea36af<br />
}}<br />
<br />
=== Static device names with udev ===<br />
<br />
See [[udev#Setting static device names]].<br />
<br />
== Using persistent naming ==<br />
<br />
There are various applications that can be configured using persistent naming. Following are some examples of how to configure them.<br />
<br />
=== fstab ===<br />
<br />
See the main article: [[fstab#Identifying filesystems]].<br />
<br />
=== Kernel parameters ===<br />
<br />
To use persistent names in [[kernel parameters]], the following prerequisites must be met. On a standard installation following the installation guide both prerequisites are met:<br />
<br />
* You are using an [[initramfs]] image that has [[udev]] in it.<br />
** For [[mkinitcpio]], enable either the udev or systemd hook in {{ic|/etc/mkinitcpio.conf}}<br />
<br />
The location of the root filesystem is given by the parameter {{ic|root}} on the kernel command line. The kernel command line is configured from the [[boot loader]], see [[Kernel parameters#Configuration]]. To change to persistent device naming, only change the parameters which specify block devices, e.g. {{ic|root}} and {{ic|resume}}, while leaving other parameters as is. Various naming schemes are supported:<br />
<br />
Persistent device naming [[#by-label|using label]] and the {{ic|1=LABEL=}} format, in this example {{ic|Arch Linux}} is the LABEL of the root file system.<br />
<br />
root="LABEL=Arch Linux"<br />
<br />
Persistent device naming [[#by-uuid|using UUID]] and the {{ic|1=UUID=}} format, in this example {{ic|0a3407de-014b-458b-b5c1-848e92a327a3}} is the UUID of the root file system.<br />
<br />
root=UUID=0a3407de-014b-458b-b5c1-848e92a327a3<br />
<br />
Persistent device naming [[#by-id and by-path|using disk id]] and the {{ic|/dev}} path format, in this example {{ic|wwn-0x60015ee0000b237f-part2}} is the id of the root partition.<br />
<br />
root=/dev/disk/by-id/wwn-0x60015ee0000b237f-part2<br />
<br />
Persistent device naming [[#by-partuuid|using GPT partition UUID]] and the {{ic|1=PARTUUID=}} format, in this example {{ic|98a81274-10f7-40db-872a-03df048df366}} is the PARTUUID of the root partition.<br />
<br />
root=PARTUUID=98a81274-10f7-40db-872a-03df048df366<br />
<br />
Persistent device naming [[#by-partlabel|using GPT partition label]] and the {{ic|1=PARTLABEL=}} format, in this example {{ic|GNU/Linux}} is the PARTLABEL of the root partition.<br />
<br />
root="PARTLABEL=GNU/Linux"</div>Pdchttps://wiki.archlinux.org/index.php?title=Xorg&diff=623547Xorg2020-07-03T16:17:10Z<p>Pdc: /* Automation */ xdo is available in Community</p>
<hr />
<div>[[Category:X server]]<br />
[[cs:Xorg]]<br />
[[da:Xorg]]<br />
[[de:X]]<br />
[[el:Xorg]]<br />
[[es:Xorg]]<br />
[[fr:Xorg]]<br />
[[it:Xorg]]<br />
[[ja:Xorg]]<br />
[[nl:Xorg]]<br />
[[pl:Xorg]]<br />
[[pt:Xorg]]<br />
[[ru:Xorg]]<br />
[[uk:Xorg]]<br />
[[zh-hans:Xorg]]<br />
[[zh-hant:Xorg]]<br />
{{Related articles start}}<br />
{{Related|Autostarting}}<br />
{{Related|Display manager}}<br />
{{Related|Window manager}}<br />
{{Related|Font configuration}}<br />
{{Related|Cursor themes}}<br />
{{Related|Desktop environment}}<br />
{{Related|Wayland}}<br />
{{Related|xinit}}<br />
{{Related|xrandr}}<br />
{{Related articles end}}<br />
From https://www.x.org/wiki/:<br />
:The X.Org project provides an open source implementation of the [[Wikipedia:X Window System|X Window System]]. The development work is being done in conjunction with the freedesktop.org community. The X.Org Foundation is the educational non-profit corporation whose Board serves this effort, and whose Members lead this work.<br />
<br />
'''Xorg''' (commonly referred as simply '''X''') is the most popular display server among Linux users. Its ubiquity has led to making it an ever-present requisite for GUI applications, resulting in massive adoption from most distributions. See the [[Wikipedia:X.Org Server|Xorg]] Wikipedia article or visit the [https://www.x.org/wiki/ Xorg website] for more details.<br />
<br />
== Installation ==<br />
<br />
Xorg can be [[install]]ed with the {{Pkg|xorg-server}} package.<br />
<br />
Additionally, some packages from the {{Grp|xorg-apps}} group are necessary for certain configuration tasks, they are pointed out in the relevant sections.<br />
<br />
Finally, an {{Grp|xorg}} group is also available, which includes Xorg server packages, packages from the {{Grp|xorg-apps}} group and fonts. <br />
<br />
{{Tip|You will typically seek to install a [[window manager]] or a [[desktop environment]] to supplement X.}}<br />
<br />
=== Driver installation ===<br />
<br />
The Linux kernel includes open-source video drivers and support for hardware accelerated framebuffers. However, userland support is required for OpenGL and 2D acceleration in X11.<br />
<br />
First, identify your card:<br />
<br />
$ lspci | grep -e VGA -e 3D<br />
<br />
Then install an appropriate driver. You can search the package database for a complete list of open-source video drivers:<br />
<br />
$ pacman -Ss xf86-video<br />
<br />
Xorg searches for installed drivers automatically:<br />
<br />
* If it cannot find the specific driver installed for the hardware (listed below), it first searches for ''fbdev'' ({{pkg|xf86-video-fbdev}}).<br />
* If that is not found, it searches for ''vesa'' ({{pkg|xf86-video-vesa}}), the generic driver, which handles a large number of chipsets but does not include any 2D or 3D acceleration.<br />
* If ''vesa'' is not found, Xorg will fall back to [[kernel mode setting]], which includes GLAMOR acceleration (see {{man|4|modesetting}}).<br />
<br />
In order for video acceleration to work, and often to expose all the modes that the GPU can set, a proper video driver is required:<br />
<br />
{| class="wikitable" style="text-align:center"<br />
|-<br />
! Brand !! Type !! Driver !! OpenGL !! OpenGL ([[multilib]]) !! Documentation<br />
|-<br />
! rowspan="2" | AMD / ATI<br />
| rowspan="2" | Open source || {{Pkg|xf86-video-amdgpu}} || rowspan="2" | {{Pkg|mesa}} || rowspan="2" | {{Pkg|lib32-mesa}} || [[AMDGPU]]<br />
|-<br />
| {{Pkg|xf86-video-ati}} || [[ATI]]<br />
|-<br />
! Intel<br />
| Open source || {{Pkg|xf86-video-intel}} || {{Pkg|mesa}} || {{Pkg|lib32-mesa}} || [[Intel graphics]]<br />
|-<br />
! rowspan="3" | NVIDIA<br />
| Open source || {{Pkg|xf86-video-nouveau}} || {{Pkg|mesa}} || {{Pkg|lib32-mesa}} || [[Nouveau]]<br />
|-<br />
| rowspan="2" | Proprietary || {{Pkg|nvidia}} || {{Pkg|nvidia-utils}} || {{Pkg|lib32-nvidia-utils}} || rowspan="2" | [[NVIDIA]]<br />
|-<br />
| {{AUR|nvidia-390xx}} || {{AUR|nvidia-390xx-utils}} || {{AUR|lib32-nvidia-390xx-utils}}<br />
|}<br />
<br />
{{Note|<br />
* For NVIDIA Optimus enabled laptop which uses an integrated video card combined with a dedicated GPU, see [[NVIDIA Optimus]].<br />
* For Intel graphics on 4th generation and above, see [[Intel graphics#Installation]] for available drivers.<br />
}}<br />
<br />
Other video drivers can be found in the {{Grp|xorg-drivers}} group.<br />
<br />
Xorg should run smoothly without closed source drivers, which are typically needed only for advanced features such as fast 3D-accelerated rendering for games. The exceptions to this rule are recent GPUs (especially NVIDIA GPUs), that are not supported by the open source drivers.<br />
<br />
=== AMD ===<br />
<br />
{| class="wikitable" style="text-align:center"<br />
|-<br />
! GPU architecture !! Radeon cards !! Open-source driver !! Proprietary driver<br />
|-<br />
| GCN 4<br/>and newer || rowspan=4 | [[wikipedia:List of AMD graphics processing units|various]] || [[AMDGPU]] || [[AMDGPU PRO]]<br />
|-<br />
| GCN 3 || [[AMDGPU]] || [[Catalyst]] /<br/>[[AMDGPU PRO]]<br />
|- <br />
| GCN 2 || [[AMDGPU]]* / [[ATI]] || [[Catalyst]]<br />
|- <br />
| GCN 1 || [[AMDGPU]]* / [[ATI]] || [[Catalyst]]<br />
|-<br />
| TeraScale 2&3 || HD 5000 - HD 6000 || rowspan=3 | [[ATI]] || [[Catalyst]]<br />
|-<br />
| TeraScale 1 || HD 2000 - HD 4000 || [[Catalyst]] legacy<br />
|-<br />
| Older || X1000 and older || ''not available''<br />
|-<br />
|}<br />
: *: Experimental<br />
<br />
== Running ==<br />
<br />
The {{man|1|Xorg}} command is usually not run directly, instead the X server is started with either a [[display manager]] or [[xinit]].<br />
<br />
== Configuration ==<br />
<br />
{{Note|Arch supplies default configuration files in {{ic|/usr/share/X11/xorg.conf.d/}}, and no extra configuration is necessary for most setups.}}<br />
<br />
Xorg uses a configuration file called {{ic|xorg.conf}} and files ending in the suffix {{ic|.conf}} for its initial setup: the complete list of the folders where these files are searched can be found in {{man|5|xorg.conf}}, together with a detailed explanation of all the available options.<br />
<br />
=== Using .conf files ===<br />
<br />
The {{ic|/etc/X11/xorg.conf.d/}} directory stores host-specific configuration. You are free to add configuration files there, but they must have a {{ic|.conf}} suffix: the files are read in ASCII order, and by convention their names start with {{ic|''XX''-}} (two digits and a hyphen, so that for example 10 is read before 20). These files are parsed by the X server upon startup and are treated like part of the traditional {{ic|xorg.conf}} configuration file. Note that on conflicting configuration, the file read ''last'' will be processed. For that reason the most generic configuration files should be ordered first by name. The configuration entries in the {{ic|xorg.conf}} file are processed at the end. <br />
<br />
For option examples to set, see also the [https://fedoraproject.org/wiki/Input_device_configuration#xorg.conf.d Fedora wiki].<br />
<br />
=== Using xorg.conf ===<br />
<br />
Xorg can also be configured via {{ic|/etc/X11/xorg.conf}} or {{ic|/etc/xorg.conf}}. You can also generate a skeleton for {{ic|xorg.conf}} with:<br />
<br />
# Xorg :0 -configure<br />
<br />
This should create a {{ic|xorg.conf.new}} file in {{ic|/root/}} that you can copy over to {{ic|/etc/X11/xorg.conf}}.<br />
<br />
{{Tip|If you are already running an X server, use a different display, for example {{ic|Xorg :2 -configure}}.}}<br />
<br />
Alternatively, your proprietary video card drivers may come with a tool to automatically configure Xorg: see the article of your video driver, [[NVIDIA]] or [[AMD Catalyst]], for more details.<br />
<br />
{{Note|Configuration file keywords are case insensitive, and "_" characters are ignored. Most strings (including Option names) are also case insensitive, and insensitive to white space and "_" characters.}}<br />
<br />
== Input devices ==<br />
<br />
For input devices the X server defaults to the libinput driver ({{Pkg|xf86-input-libinput}}), but {{Pkg|xf86-input-evdev}} and related drivers are available as alternative.[https://www.archlinux.org/news/xorg-server-1191-is-now-in-extra/]<br />
<br />
[[Udev]], which is provided as a systemd dependency, will detect hardware and both drivers will act as hotplugging input driver for almost all devices, as defined in the default configuration files {{ic|10-quirks.conf}} and {{ic|40-libinput.conf}} in the {{ic|/usr/share/X11/xorg.conf.d/}} directory.<br />
<br />
After starting X server, the log file will show which driver hotplugged for the individual devices (note the most recent log file name may vary): <br />
$ grep -e "Using input driver " Xorg.0.log<br />
<br />
If both do not support a particular device, install the needed driver from the {{Grp|xorg-drivers}} group. The same applies, if you want to use another driver. <br />
<br />
To influence hotplugging, see [[#Configuration]]. <br />
<br />
For specific instructions, see also the [[libinput]] article, the following pages below, or the [https://fedoraproject.org/wiki/Input_device_configuration Fedora wiki] entry for more examples.<br />
<br />
=== Input identification ===<br />
<br />
See [[Keyboard input#Identifying keycodes in Xorg]].<br />
<br />
=== Mouse acceleration ===<br />
<br />
See [[Mouse acceleration]].<br />
<br />
=== Extra mouse buttons ===<br />
<br />
See [[Mouse buttons]].<br />
<br />
=== Touchpad ===<br />
<br />
See [[libinput]] or [[Synaptics]].<br />
<br />
=== Touchscreen ===<br />
<br />
See [[Touchscreen]].<br />
<br />
=== Keyboard settings ===<br />
<br />
See [[Keyboard configuration in Xorg]].<br />
<br />
== Monitor settings ==<br />
<br />
=== Manual configuration ===<br />
<br />
{{Note|<br />
* Newer versions of Xorg are auto-configuring, so manual configuration should not be needed.<br />
* If Xorg is unable to detect any monitor or to avoid auto-configuring, a configuration file can be used. A common case where this is necessary is a headless system, which boots without a monitor and starts Xorg automatically, either from a [[Automatic login to virtual console|virtual console]] at [[Start X at login|login]], or from a [[display manager]].<br />
}}<br />
<br />
For a headless configuration the {{pkg|xf86-video-dummy}} driver is necessary; [[install]] it and create a configuration file, such as the following:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-headless.conf|<br />
Section "Monitor"<br />
Identifier "dummy_monitor"<br />
HorizSync 28.0-80.0<br />
VertRefresh 48.0-75.0<br />
Modeline "1920x1080" 172.80 1920 2040 2248 2576 1080 1081 1084 1118<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "dummy_card"<br />
VideoRam 256000<br />
Driver "dummy"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "dummy_screen"<br />
Device "dummy_card"<br />
Monitor "dummy_monitor"<br />
SubSection "Display"<br />
EndSubSection<br />
EndSection<br />
}}<br />
<br />
=== Multiple monitors ===<br />
<br />
See main article [[Multihead]] for general information.<br />
<br />
See also GPU-specific instructions:<br />
<br />
* [[NVIDIA#Multiple monitors]]<br />
* [[Nouveau#Dual head]]<br />
* [[AMD Catalyst#Double Screen (Dual Head / Dual Screen / Xinerama)]]<br />
* [[ATI#Multihead setup]]<br />
<br />
==== More than one graphics card ====<br />
<br />
You must define the correct driver to use and put the bus ID of your graphic cards (in decimal notation).<br />
<br />
{{bc|<br />
Section "Device"<br />
Identifier "Screen0"<br />
Driver "intel"<br />
BusID "PCI:0:2:0"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Screen1"<br />
Driver "nouveau"<br />
BusID "PCI:1:0:0"<br />
EndSection<br />
}}<br />
<br />
To get your bus IDs (in hexadecimal):<br />
<br />
{{hc|$ lspci {{!}} grep -e VGA -e 3D|<br />
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)<br />
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1)<br />
}}<br />
<br />
The bus IDs here are 0:2:0 and 1:0:0.<br />
<br />
=== Display size and DPI ===<br />
<br />
{{Accuracy|1=Xorg always sets dpi to 96. See [https://bugs.freedesktop.org/show_bug.cgi?id=23705 this], [https://gitlab.freedesktop.org/xorg/xserver/issues/253 this] and finally [https://pastebin.com/vtzyBK6e this].}}<br />
<br />
The DPI of the X server is determined in the following manner:<br />
<br />
# The {{ic|-dpi}} command line option has highest priority.<br />
# If this is not used, the {{ic|DisplaySize}} setting in the X config file is used to derive the DPI, given the screen resolution.<br />
# If no {{ic|DisplaySize}} is given, the monitor size values from [[Wikipedia:Display Data Channel|DDC]] are used to derive the DPI, given the screen resolution.<br />
# If DDC does not specify a size, 75 DPI is used by default.<br />
<br />
In order to get correct dots per inch (DPI) set, the display size must be recognized or set. Having the correct DPI is especially necessary where fine detail is required (like font rendering). Previously, manufacturers tried to create a standard for 96 DPI (a 10.3" diagonal monitor would be 800x600, a 13.2" monitor 1024x768). These days, screen DPIs vary and may not be equal horizontally and vertically. For example, a 19" widescreen LCD at 1440x900 may have a DPI of 89x87. To be able to set the DPI, the Xorg server attempts to auto-detect your monitor's physical screen size through the graphic card with DDC. <s>When the Xorg server knows the physical screen size, it will be able to set the correct DPI depending on resolution size.</s><br />
<br />
To see if your display size and DPI are detected/calculated correctly:<br />
<br />
$ xdpyinfo | grep -B2 resolution<br />
<br />
Check that the dimensions match your display size. If the Xorg server is not able to correctly calculate the screen size, it will default to 75x75 DPI and you will have to calculate it yourself.<br />
<br />
If you have specifications on the physical size of the screen, they can be entered in the Xorg configuration file so that the proper DPI is calculated (adjust identifier to your xrandr output) :<br />
<br />
{{bc|<br />
Section "Monitor"<br />
Identifier "DVI-D-0"<br />
DisplaySize 286 179 # In millimeters<br />
EndSection<br />
}}<br />
<br />
If you only want to enter the specification of your monitor '''without''' creating a full xorg.conf create a new config file. For example ({{ic|/etc/X11/xorg.conf.d/90-monitor.conf}}):<br />
<br />
{{bc|<br />
Section "Monitor"<br />
Identifier "<default monitor>"<br />
DisplaySize 286 179 # In millimeters<br />
EndSection<br />
}}<br />
<br />
If you do not have specifications for physical screen width and height (most specifications these days only list by diagonal size), you can use the monitor's native resolution (or aspect ratio) and diagonal length to calculate the horizontal and vertical physical dimensions. Using the Pythagorean theorem on a 13.3" diagonal length screen with a 1280x800 native resolution (or 16:10 aspect ratio):<br />
<br />
$ echo 'scale=5;sqrt(1280^2+800^2)' | bc # 1509.43698<br />
<br />
This will give the pixel diagonal length and with this value you can discover the physical horizontal and vertical lengths (and convert them to millimeters):<br />
<br />
$ echo 'scale=5;(13.3/1509)*1280*25.4' | bc # 286.43072<br />
$ echo 'scale=5;(13.3/1509)*800*25.4' | bc # 179.01920<br />
<br />
{{Note|This calculation works for monitors with square pixels; however, there is the seldom monitor that may compress aspect ratio (e.g 16:10 aspect resolution to a 16:9 monitor). If this is the case, you should measure your screen size manually.}}<br />
<br />
==== Setting DPI manually ====<br />
<br />
{{Note|While you can set any dpi you like and applications using Qt and GTK will scale accordingly, it's recommended to set it to 96, 120 (25% higher), 144 (50% higher), 168 (75% higher), 192 (100% higher) etc., to reduce scaling artifacts to GUI that use bitmaps. Reducing it below 96 dpi may not reduce size of graphical elements of GUI as typically the lowest dpi the icons are made for is 96.}}<br />
<br />
For RandR compliant drivers (for example the open source ATI driver), you can set it by:<br />
<br />
$ xrandr --dpi 144<br />
<br />
{{Note|Applications that comply with the setting will not change immediately. You have to start them anew.}}<br />
<br />
To make it permanent, see [[Autostarting#On Xorg startup]].<br />
<br />
===== Proprietary NVIDIA driver =====<br />
<br />
DPI can be set manually if you only plan to use one resolution ([https://www.pxcalc.com/ DPI calculator]):<br />
<br />
{{bc|<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
Option "DPI" "96 x 96"<br />
EndSection<br />
}}<br />
<br />
You can manually set the DPI adding the options below on {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}} (inside '''Device''' section):<br />
<br />
Option "UseEdidDpi" "False"<br />
Option "DPI" "96 x 96"<br />
<br />
===== Manual DPI Setting Caveat =====<br />
<br />
GTK very often overrides the server's DPI via the optional Xresource {{ic|Xft.dpi}}. To find out whether this is happening to you, check with:<br />
<br />
$ xrdb -query | grep dpi<br />
<br />
With GTK library versions since 3.16, when this variable is not otherwise explicitly set, GTK sets it to 96. To have GTK apps obey the server DPI you may need to explictly set Xft.dpi to the same value as the server. The Xft.dpi resource is the method by which some desktop environments optionally force DPI to a particular value in personal settings. Among these are [[KDE]] and [[TDE]].<br />
<br />
=== Display Power Management ===<br />
<br />
[[DPMS]] (Display Power Management Signaling) is a technology that allows power saving behaviour of monitors when the computer is not in use. This will allow you to have your monitors automatically go into standby after a predefined period of time.<br />
<br />
== Composite ==<br />
<br />
The Composite extension for X causes an entire sub-tree of the window hierarchy to be rendered to an off-screen buffer. Applications can then take the contents of that buffer and do whatever they like. The off-screen buffer can be automatically merged into the parent window or merged by external programs, called compositing managers. See the following article for more information: [[Wikipedia:Compositing window manager|compositing window manager]]<br />
<br />
Some window managers (e.g. [[Compiz]], [[Enlightenment]], KWin, Marco, Metacity, Muffin, Mutter, [[Xfwm]]) do compositing on their own. For other window managers, a standalone composite manager can be used.<br />
<br />
=== List of composite managers ===<br />
<br />
* {{App|[[Picom]]|Compositor (a fork of Compton)|https://github.com/yshui/picom|{{Pkg|picom}}}}<br />
* {{App|[[Xcompmgr]]|Composite window-effects manager|https://cgit.freedesktop.org/xorg/app/xcompmgr/|{{Pkg|xcompmgr}}}}<br />
* {{App|Unagi|Modular compositing manager which aims written in C and based on XCB|https://projects.mini-dweeb.org/projects/unagi|{{AUR|unagi}}}}<br />
<br />
== Tips and tricks ==<br />
<br />
{{Expansion|Mention {{Pkg|xorg-xkill}}.}}<br />
<br />
=== Automation ===<br />
<br />
This section lists utilities for automating keyboard / mouse input and window operations (like moving, resizing or raising).<br />
<br />
{| class="wikitable"<br />
! Tool !! Package !! Manual !! [[Keysym]]<br>input !! Window<br>operations !! Note<br />
|-<br />
! xautomation<br />
| {{Pkg|xautomation}} || {{man|1|xte}} || {{Yes}} || {{No}} || Also contains screen scraping tools. Cannot simulate F13+.<br />
|-<br />
! xdo<br />
| {{Pkg|xdo}} || {{man|1|xdo}} || {{No}} || {{Yes}} || Small X utility to perform elementary actions on windows.<br />
|-<br />
! xdotool<br />
| {{Pkg|xdotool}} || {{man|1|xdotool}} || {{Yes}} || {{Yes}} || [https://github.com/jordansissel/xdotool/issues Very buggy] and not in active development, e.g: has broken CLI parsing.[https://github.com/jordansissel/xdotool/issues/14#issuecomment-327968132][https://github.com/jordansissel/xdotool/issues/71]<br />
|-<br />
! xvkbd<br />
| {{AUR|xvkbd}} || {{man|1|xvkbd|url=http://t-sato.in.coocan.jp/xvkbd/#option}} || {{Yes}} || {{No}} || Virtual keyboard for Xorg, also has the {{ic|-text}} option for sending characters.<br />
|}<br />
<br />
See also [[Clipboard#Tools]] and [https://venam.nixers.net/blog/unix/2019/01/07/win-automation.html an overview of X automation tools].<br />
<br />
=== Nested X session ===<br />
<br />
{{Expansion|mention [[Awesome#Using_Xephyr|xephyr]]}}<br />
<br />
To run a nested session of another desktop environment:<br />
<br />
$ /usr/bin/Xnest :1 -geometry 1024x768+0+0 -ac -name Windowmaker & wmaker -display :1<br />
<br />
This will launch a Window Maker session in a 1024 by 768 window within your current X session.<br />
<br />
This needs the package {{Pkg|xorg-server-xnest}} to be installed.<br />
<br />
=== Starting GUI programs remotely ===<br />
<br />
See main article: [[OpenSSH#X11 forwarding]].<br />
<br />
=== On-demand disabling and enabling of input sources ===<br />
<br />
With the help of ''xinput'' you can temporarily disable or enable input sources. This might be useful, for example, on systems that have more than one mouse, such as the ThinkPads and you would rather use just one to avoid unwanted mouse clicks.<br />
<br />
[[Install]] the {{Pkg|xorg-xinput}} package.<br />
<br />
Find the name or ID of the device you want to disable:<br />
<br />
$ xinput<br />
<br />
For example in a Lenovo ThinkPad T500, the output looks like this:<br />
<br />
{{hc|$ xinput|<nowiki><br />
⎡ Virtual core pointer id=2 [master pointer (3)]<br />
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]<br />
⎜ ↳ TPPS/2 IBM TrackPoint id=11 [slave pointer (2)]<br />
⎜ ↳ SynPS/2 Synaptics TouchPad id=10 [slave pointer (2)]<br />
⎣ Virtual core keyboard id=3 [master keyboard (2)]<br />
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]<br />
↳ Power Button id=6 [slave keyboard (3)]<br />
↳ Video Bus id=7 [slave keyboard (3)]<br />
↳ Sleep Button id=8 [slave keyboard (3)]<br />
↳ AT Translated Set 2 keyboard id=9 [slave keyboard (3)]<br />
↳ ThinkPad Extra Buttons id=12 [slave keyboard (3)]<br />
</nowiki>}}<br />
<br />
Disable the device with {{ic|xinput --disable ''device''}}, where ''device'' is the device ID or name of the device you want to disable. In this example we will disable the Synaptics Touchpad, with the ID 10:<br />
<br />
$ xinput --disable 10<br />
<br />
To re-enable the device, just issue the opposite command:<br />
<br />
$ xinput --enable 10<br />
<br />
Alternatively using the device name, the command to disable the touchpad would be:<br />
<br />
$ xinput --disable "SynPS/2 Synaptics TouchPad"<br />
<br />
=== Killing application with hotkey ===<br />
<br />
Run script on hotkey:<br />
<br />
#!/bin/bash<br />
windowFocus=$(xdotool getwindowfocus);<br />
pid=$(xprop -id $windowFocus | grep PID);<br />
kill -9 $pid<br />
<br />
Deps: {{Pkg|xorg-xprop}}, {{Pkg|xdotool}}<br />
<br />
=== Block TTY access ===<br />
<br />
{{Expansion|Why would you want to do this?}}<br />
<br />
To block tty access when in an X add the following to [[#Configuration|xorg.conf]]:<br />
<br />
{{bc|<br />
Section "ServerFlags"<br />
Option "DontVTSwitch" "True"<br />
EndSection<br />
}}<br />
<br />
=== Prevent a user from killing X ===<br />
<br />
To prevent a user from killing when it is running add the following to [[#Configuration|xorg.conf]]:<br />
<br />
{{bc|<br />
Section "ServerFlags"<br />
Option "DontZap" "True"<br />
EndSection<br />
}}<br />
<br />
=== Rootless Xorg ===<br />
<br />
Xorg may run with standard user privileges instead of root (so-called "rootless" Xorg). This is a significant security improvement over running as root. Note that most display managers do not support rootless Xorg.<br />
<br />
You can verify which user Xorg is running as with {{ic|ps -o user $(pgrep Xorg)}}.<br />
<br />
See also {{man|1|Xorg.wrap}}, {{man|8|systemd-logind}}, [[Systemd/User#Xorg as a systemd user service]], [https://fedoraproject.org/wiki/Changes/XorgWithoutRootRights] and {{Bug|41257}}. <br />
<br />
==== Using xinitrc ====<br />
<br />
To configure rootless Xorg using [[xinitrc]]:<br />
<br />
* Run startx as a subprocess of the login shell; run {{ic|startx}} directly and do not use {{ic|exec startx}}.<br />
* If using certain proprietary display drivers, [[kernel mode setting]] [https://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/xorg-wrapper.c#n222 auto-detection] will fail. In such cases, you must set {{ic|1=needs_root_rights = no}} in {{ic|/etc/X11/Xwrapper.config}}.<br />
<br />
==== Using GDM ====<br />
<br />
[[GDM]] will run Xorg without root privileges by default when default when [[kernel mode setting]] is used.<br />
<br />
==== Session log redirection ====<br />
<br />
When Xorg is run in rootless mode, Xorg logs are saved to {{ic|~/.local/share/xorg/Xorg.log}}. However, the stdout and stderr output from the Xorg session is not redirected to this log. To re-enable redirection, start Xorg with the {{ic|-keeptty}} flag and redirect the stdout and stderr output to a file:<br />
<br />
startx -- -keeptty &> ~/.xorg.log<br />
<br />
Alternatively, copy {{ic|/etc/X11/xinit/xserverrc}} to {{ic|~/.xserverrc}}, and append {{ic|-keeptty}}. See [https://bbs.archlinux.org/viewtopic.php?pid=1446402#p1446402].<br />
<br />
== Troubleshooting ==<br />
<br />
=== General ===<br />
<br />
If a problem occurs, view the log stored in either {{ic|/var/log/}} or, for the rootless X default since v1.16, in {{ic|~/.local/share/xorg/}}. [[GDM]] users should check the [[systemd journal]]. [https://bbs.archlinux.org/viewtopic.php?id=184639]<br />
<br />
The logfiles are of the form {{ic|Xorg.n.log}} with {{ic|n}} being the display number. For a single user machine with default configuration the applicable log is frequently {{ic|Xorg.0.log}}, but otherwise it may vary. To make sure to pick the right file it may help to look at the timestamp of the X server session start and from which console it was started. For example: <br />
<br />
{{hc|$ grep -e Log -e tty Xorg.0.log|2=<br />
[ 40.623] (==) Log file: "/home/archuser/.local/share/xorg/Xorg.0.log", Time: Thu Aug 28 12:36:44 2014<br />
[ 40.704] (--) controlling tty is VT number 1, auto-enabling KeepTty<br />
}}<br />
<br />
* In the logfile then be on the lookout for any lines beginning with {{ic|(EE)}}, which represent errors, and also {{ic|(WW)}}, which are warnings that could indicate other issues.<br />
* If there is an ''empty'' {{ic|.xinitrc}} file in your {{ic|$HOME}}, either delete or edit it in order for X to start properly. If you do not do this X will show a blank screen with what appears to be no errors in your {{ic|Xorg.0.log}}. Simply deleting it will get it running with a default X environment.<br />
* If the screen goes black, you may still attempt to switch to a different virtual console (e.g. {{ic|Ctrl+Alt+F6}}), and blindly log in as root. You can do this by typing {{ic|root}} (press {{ic|Enter}} after typing it) and entering the root password (again, press {{ic|Enter}} after typing it).<br />
<br />
: You may also attempt to kill the X server with:<br />
: {{bc|# pkill -x X}}<br />
: If this does not work, reboot blindly with:<br />
: {{bc|# reboot}}<br />
<br />
* Check specific pages in [[:Category:Input devices]] if you have issues with keyboard, mouse, touchpad etc.<br />
* Search for common problems in [[ATI]], [[Intel]] and [[NVIDIA]] articles.<br />
<br />
=== Black screen, No protocol specified.., Resource temporarily unavailable for all or some users ===<br />
<br />
X creates configuration and temporary files in current user's home directory. Make sure there is free disk space available on the partition your home directory resides in. Unfortunately, X server does not provide any more obvious information about lack of disk space in this case.<br />
<br />
=== DRI with Matrox cards stopped working ===<br />
<br />
If you use a Matrox card and DRI stopped working after upgrading to Xorg, try adding the line:<br />
<br />
Option "OldDmaInit" "On"<br />
<br />
to the Device section that references the video card in {{ic|xorg.conf}}.<br />
<br />
=== Frame-buffer mode problems ===<br />
<br />
If X fails to start with the following log messages,<br />
<br />
{{bc|<nowiki><br />
(WW) Falling back to old probe method for fbdev<br />
(II) Loading sub module "fbdevhw"<br />
(II) LoadModule: "fbdevhw"<br />
(II) Loading /usr/lib/xorg/modules/linux//libfbdevhw.so<br />
(II) Module fbdevhw: vendor="X.Org Foundation"<br />
compiled for 1.6.1, module version=0.0.2<br />
ABI class: X.Org Video Driver, version 5.0<br />
(II) FBDEV(1): using default device<br />
<br />
Fatal server error:<br />
Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices<br />
</nowiki>}}<br />
<br />
[[Uninstall]] the {{pkg|xf86-video-fbdev}} package.<br />
<br />
=== Program requests "font '(null)'" ===<br />
<br />
Error message: {{ic|unable to load font `(null)'}}.<br />
<br />
Some programs only work with bitmap fonts. Two major packages with bitmap fonts are available, {{Pkg|xorg-fonts-75dpi}} and {{Pkg|xorg-fonts-100dpi}}. You do not need both; one should be enough. To find out which one would be better in your case, try {{ic|xdpyinfo}} from {{Pkg|xorg-xdpyinfo}}, like this:<br />
<br />
$ xdpyinfo | grep resolution<br />
<br />
and use what is closer to the shown value.<br />
<br />
=== Recovery: disabling Xorg before GUI login ===<br />
<br />
If Xorg is set to boot up automatically and for some reason you need to prevent it from starting up before the login/display manager appears (if the system is wrongly configured and Xorg does not recognize your mouse or keyboard input, for instance), you can accomplish this task with two methods.<br />
<br />
* Change default target to rescue.target. See [[systemd#Change default target to boot into]].<br />
* If you have not only a faulty system that makes Xorg unusable, but you have also set the GRUB menu wait time to zero, or cannot otherwise use GRUB to prevent Xorg from booting, you can use the Arch Linux live CD. Follow the [[Installation_guide#Format the partitions|installation guide]] about how to mount and chroot into the installed Arch Linux. Alternatively try to switch into another [[tty]] with {{ic|Ctrl+Alt}} + function key (usually from {{ic|F1}} to {{ic|F7}} depending on which is not used by X), login as root and follow steps below.<br />
<br />
Depending on setup, you will need to do one or more of these steps:<br />
<br />
* [[Disable]] the [[display manager]].<br />
* Disable the [[start X at login|automatic start of the X]].<br />
* Rename the {{ic|~/.xinitrc}} or comment out the {{ic|exec}} line in it.<br />
<br />
=== X clients started with "su" fail ===<br />
<br />
If you are getting "Client is not authorized to connect to server", try adding the line:<br />
<br />
session optional pam_xauth.so<br />
<br />
to {{ic|/etc/pam.d/su}} and {{ic|/etc/pam.d/su-l}}. {{ic|pam_xauth}} will then properly set environment variables and handle {{ic|xauth}} keys.<br />
<br />
=== X failed to start: Keyboard initialization failed ===<br />
<br />
If the filesystem (specifically {{ic|/tmp}}) is full, {{ic|startx}} will fail. {{ic|/var/log/Xorg.0.log}} will end with:<br />
<br />
{{bc|<nowiki><br />
(EE) Error compiling keymap (server-0)<br />
(EE) XKB: Could not compile keymap<br />
(EE) XKB: Failed to load keymap. Loading default keymap instead.<br />
(EE) Error compiling keymap (server-0)<br />
(EE) XKB: Could not compile keymap<br />
XKB: Failed to compile keymap<br />
Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.<br />
Fatal server error:<br />
Failed to activate core devices.<br />
Please consult the The X.Org Foundation support at http://wiki.x.org<br />
for help.<br />
Please also check the log file at "/var/log/Xorg.0.log" for additional information.<br />
(II) AIGLX: Suspending AIGLX clients for VT switch<br />
</nowiki>}}<br />
<br />
Make some free space on the relevant filesystem and X will start.<br />
<br />
=== A green screen whenever trying to watch a video===<br />
<br />
Your color depth is set wrong. It may need to be 24 instead of 16, for example.<br />
<br />
=== SocketCreateListener error ===<br />
<br />
If X terminates with error message "SocketCreateListener() failed", you may need to delete socket files in {{ic|/tmp/.X11-unix}}. This may happen if you have previously run Xorg as root (e.g. to generate an {{ic|xorg.conf}}).<br />
<br />
=== Invalid MIT-MAGIC-COOKIE-1 key when trying to run a program as root ===<br />
<br />
That error means that only the current user has access to the X server. The solution is to give access to root:<br />
<br />
$ xhost +si:localuser:root<br />
<br />
That line can also be used to give access to X to a different user than root.<br />
<br />
=== Xorg-server Fatal server error: (EE) AddScreen/ScreenInit ===<br />
<br />
If the Xorg server is not working randomly and in the Xorg log you see:<br />
<br />
systemd-logind: failed to take device /dev/dri/card0: Operation not permitted<br />
...<br />
AddScreen/ScreenInit failed for driver 0<br />
<br />
Then, this problem may be caused by [https://github.com/systemd/systemd/issues/13943 systemd issue 13943]. Set up [[Kernel mode setting#Early KMS start|early KMS start]].<br />
<br />
== See also ==<br />
<br />
* [https://magcius.github.io/xplain/article/ Xplain] - In-depth explanation of the X Window System<br />
* {{man|1|Xorg}} - Xorg's Manual Page<br />
* [https://wiki.gentoo.org/wiki/Xorg/Guide/en#Configuration Gentoo/Xorg#Configuration] - Gentoo Wiki's Xorg Configuration page</div>Pdchttps://wiki.archlinux.org/index.php?title=Ext3&diff=623460Ext32020-07-02T16:25:30Z<p>Pdc: /* Enable full journaling */ Update link</p>
<hr />
<div>[[Category:File systems]]<br />
[[de:Ext3]]<br />
[[it:Ext3]]<br />
[[ja:Ext3]]<br />
{{Related articles start}}<br />
{{Related|File systems}}<br />
{{Related|Ext4}}<br />
{{Related articles end}}<br />
<br />
There are many strengths to the Third Extended ("ext3") filesystem. Its in-kernel and userspace code has been tried, tested, fixed, and improved upon more than almost every other Linux-compatible filesystem. It is simple, robust, and extensible. This article explains some tips that can improve both the performance and the reliability of the filesystem.<br />
<br />
In this document {{ic|/dev/hdXY}} will be used as a generic partition. You should replace this with the actual device node for your partition, such as {{ic|/dev/hdb1}} for the first partition of the primary slave disk or {{ic|/dev/sda2}} for the second partition of your first SCSI or Serial ATA disk.<br />
<br />
== Using tune2fs and e2fsck ==<br />
<br />
Before we begin, we need to make sure you are comfortable with using the tune2fs utility to alter the filesystem options of an ext2 or ext3 partition (or [[convert ext2 to ext3]]). Please read the '''tune2fs''' man page.<br />
<br />
It's generally a good idea to run a filesystem check using the '''e2fsck''' utility after you've completed the alterations you wish to make on your filesystem. This will verify that your filesystem is clean and fix it if needed. You should also read the manual page for the '''e2fsck''' utility if you have not yet done so.<br />
<br />
{{Warning|'''Only run unmounted!''' Make sure any filesystems are cleanly unmounted before altering them with the '''tune2fs''' or '''e2fsck''' utilities! Altering or tuning a filesystem while it is mounted can cause severe corruption! Consider booting from a LiveCD such as [http://partedmagic.com/doku.php Parted Magic]{{Dead link|2020|03|29|status=404}} or the Arch Linux one.<br />
}}<br />
<br />
== Using directory indexing ==<br />
<br />
This feature improves file access in large directories or directories containing many files by using hashed binary trees to store the directory information. It's perfectly safe to use, and it provides a fairly substantial improvement in most cases; so it's a good idea to enable it:<br />
<br />
# tune2fs -O dir_index /dev/hdXY<br />
<br />
This will only take effect with directories created on that filesystem after '''tune2fs''' is run. In order to apply this to currently existing directories, we must run the '''e2fsck''' utility to optimize and reindex the directories on the filesystem:<br />
<br />
# e2fsck -D -f /dev/hdXY<br />
<br />
{{Note|<br />
* This should work with ext2, ext3 and ext4 filesystems. Depending on the size of your filesystem, this could take a long time.<br />
* Directory indexing is activated by default in Arch Linux via {{ic|/etc/mke2fs.conf}}.<br />
}}<br />
<br />
== Enable full journaling ==<br />
<br />
{{Warning|[[ext4]] partitions will not mount if both delayed allocation and full journaling (e.g. {{ic|journal&#61;data}}) are enabled.}}<br />
<br />
By default, ext3 partitions mount with the 'ordered' data mode. In this mode, all data is written to the main filesystem and its metadata is committed to the journal, whose blocks are logically grouped into transactions to decrease disk I/O. This tends to be a good default for most people. However, I've found a method that increases both reliability and performance (in some situations): journaling everything, including the file data itself (known as 'journal' data mode). Normally, one would think that journaling all data would decrease performance, because the data is written to disk twice: once to the journal then later committed to the main filesystem, but this does not seem to be the case. I've enabled it on all nine of my partitions and have only seen a minor performance loss in deleting large files. In fact, doing this can actually improve performance on a filesystem where much reading and writing is to be done simultaneously. See [https://www.ibm.com/developerworks/linux/library/l-fs8/index.html#4 this article] written by Daniel Robbins on IBM's website for more information.<br />
<br />
There are two different ways to activate journal data mode. The first is by adding data=journal as a mount option in /etc/fstab. If you do it this way and want your root filesystem to also use it, you should also pass rootflags=data=journal as a kernel parameter in your bootloader's configuration. In the second method, you will use tune2fs to modify the default mount options in the filesystem's superblock:<br />
<br />
# tune2fs -O has_journal -o journal_data /dev/hdXY<br />
<br />
Please note that the second method may not work for older kernels. Especially Linux 2.4.20 and below will likely disregard the default mount options on the superblock. If you're feeling adventurous you may also want to tweak the journal size. (I've left the journal size at the default.) A larger journal may give you better performance (at the cost of more disk space and longer recovery times). Please be sure to read the relevant section of the tune2fs manual before doing so:<br />
<br />
# tune2fs -J size=$SIZE /dev/hdXY<br />
<br />
== Disable lengthy boot time checks ==<br />
<br />
{{Warning|Only do this on a journaling filesystem such as ext3/4. This may or may not work on other journaling filesystems such as ReiserFS or XFS, but has not been tested. Doing so may damage or otherwise corrupt other filesystems. You do this '''at your own risk'''.}}<br />
<br />
It seems that our ext3 filesystems are still being checked every 30 mounts or so. This is a good default for many because it helps prevent filesystem corruption when you have hardware issues, such as bad IDE/SATA/SCSI cabling, power supply failures, etc. One of the driving forces for creating journaling filesystems was that the filesystem could easily be returned to a consistent state by recovering and replaying the needed journaled transactions. Therefore, we can safely disable these mount-count- and time-dependent checks if we are certain the filesystem will be quickly checked to recover the journal if needed to restore filesystem and data consistency. Before you do this please make sure your filesystem entry in /etc/fstab has a positive integer in its 6th field (pass) so that it is checked at boot time automatically. You may do so using the following command:<br />
<br />
# tune2fs -c 0 -i 0 /dev/hdXY<br />
<br />
If you just want to limit the checks to happen less often without totally disabling them (for peace of mind). A great method is to change from a number of count's check to a time frame check. See the man page. Here is once every month:<br />
<br />
# tune2fs -c 0 -i 1m /dev/hdXY<br />
<br />
== Reclaim reserved filesystem space ==<br />
<br />
Ext3 partition contain a used space of 5% for special reasons by default. The main reason is to help with less fragmentation on the filesystem. The other reason for such space is so root can log in even when the filesystem becomes 100% used. Without this option, the root user might not be able to log in to "clean up" because the system could become unstable, trying to write logs to a 100% full system for example. <br />
<br />
The issue with this is that hard drives are getting so big the 5% can add up to be quite a large amount of wasted space. (eg. 100 GB = 5 GB reserved). Now if you separate your filesystems to like /home for example it might be a good idea to adjust these and reclaim that wasted space on long-term archive partitions (see [http://www.redhat.com/archives/ext3-users/2009-January/msg00026.html this email] for more info). It's a safe bet to leave your / filesystem at 5% reserved just in case. Leave reserved space for filesystems containing /var and /tmp also or else you'll end up with problems.<br />
<br />
Now to change your reserved space to 1% of the drive, which is fair for non-root filesystems.<br />
<br />
# tune2fs -m 1 /dev/sdXY<br />
<br />
== Assigning a label ==<br />
<br />
Once you have created and formated a partition, you can assign it a label using the e2label command. This allows you to add the partition to /etc/fstab using a label instead of using a device path (usefull for an USB drive). To add a label to a partition, type the following command as root: <br />
<br />
# e2label /dev/sdXY ''new-label''<br />
<br />
If the optional argument ''new-label'' is not present, e2label will simply display the current filesystem label. If the optional argument ''new-label'' is present, then e2label will set the filesystem label to be ''new-label''q. Ext2 and ext3 filesystem labels can be at most 16 characters long; if new-label is longer than 16 characters, e2label will truncate it and print a warning message.</div>Pdchttps://wiki.archlinux.org/index.php?title=Input_Leap&diff=613603Input Leap2020-05-16T21:25:22Z<p>Pdc: /* Installation */ barrier is now available from [community]</p>
<hr />
<div>[[Category:Input]]<br />
[[fr:Synergy]]<br />
[[it:Synergy]]<br />
[[ja:Synergy]]<br />
[http://synergy-project.org/ Synergy] lets you easily share a single mouse and keyboard between multiple computers (even with different operating systems) without the need for special hardware. It is intended for users with multiple computers on their desk since each system uses its own monitor(s).<br />
<br />
Redirecting the mouse and keyboard is as simple as moving the mouse off the edge of your screen. Synergy also merges the clipboards of all the systems into one, allowing cut-and-paste between systems. Furthermore, it synchronizes screen savers so they all start and stop together and, if screen locking is enabled, only one screen requires a password to unlock them all.<br />
<br />
Work on Synergy has stalled recently due to Symless (the company behind Synergy) halting further development of the the 1.x branch and concentrating on 2.x branch, which is primarily closed-source, configured through a hosted web interface and requires a paid subscription. A fork called [https://github.com/debauchee/barrier Barrier] was created to continue development of the 1.x branch, containing many bug fixes and new features.<br />
<br />
==Installation==<br />
<br />
===Arch Linux===<br />
You can [[install]] the {{pkg|synergy}} or {{pkg|barrier}} package.<br />
{{Note|If you install Barrier, commands and configuration files below are named "barrier" instead of "synergy" - you should use barrierc instead of synergyc, barriers instead of synergys, etc.}}<br />
<br />
===Windows and macOS===<br />
[https://symless.com/synergy/ Download] and run the newest Synergy installer from the official website. The official version is paid, although you may compile and run your own builds for free using [https://github.com/symless/synergy-core sources on GitHub]. You can also install [https://github.com/debauchee/barrier/releases Barrier] for free instead.<br />
<br />
==Pre-configuration==<br />
First determine the IP addresses and [[Network_configuration#Set_the_hostname|host names]] for each machine and make sure each has a correct hosts file. (You may use IP addresses instead of hostnames as well.)<br />
<br />
* Arch Linux - {{ic|/etc/hosts}}<br />
* Windows - {{ic|C:\WINDOWS\system32\drivers\etc\hosts}}<br />
* macOS - [http://support.apple.com/kb/TA27291 How to Add Hosts to Local Hosts File].<br />
<br />
{{hc|/etc/hosts|<br />
10.10.66.1 archserver.localdomain archserver<br />
10.10.66.100 archleft.localdomain archleft<br />
10.10.66.105 archright.localdomain archright}}<br />
<br />
{{Note|Check that the clients can reach the server.}}<br />
<br />
==Server configuration==<br />
In Synergy, the computer with keyboard and mouse you want to share is called the server. See [https://github.com/symless/synergy-core/wiki/Text-Config Synergy Configuration File Format] for a detailed description of all available sections and options.<br />
<br />
===Arch Linux===<br />
Synergy stores its configuration under {{ic|/etc/synergy.conf}}, Barrier uses {{ic|/etc/barrier.conf}} or {{ic|$HOME/.local/share/barrier/.barrier.conf}}. If the configuration file does not exist, you can use the provided GUI (started with {{ic|$ synergy}} or {{ic|$ barrier}}, or the desktop launcher) to create it visually. Alternatively you may create it by copying {{ic|/etc/synergy.conf.example}} or {{ic|/usr/share/doc/barrier/barrier.conf.example}}, whose comments should give you enough information for a basic configuration; if you need further reference or would like to use more advanced options not available from the GUI, read the guide mentioned above.<br />
<br />
{{Tip|1=Make sure the server port is not blocked. By default, synergy uses port 24800.}}<br />
<br />
If you experience problems and you wish to run the server in the foreground, you can run the following command instead:<br />
# synergys -f<br />
<br />
The synergy server process needs to attach to your user's X session, which means it needs to run as your user. [[Enable]] {{ic|synergys.service}} with {{ic|--user}} option.<br />
{{Tip|1=You can enable {{ic|synergys.socket}} to start the server when a client tries to connect instead. This is useful when the service can't connect to an X server on boot.}}<br />
<br />
==== Set up encryption on server ==== <br />
<br />
To generate a certificate and fingerprint for the server to use.<br />
$ mkdir -p ~/.synergy/SSL/Fingerprints<br />
$ openssl req -x509 -nodes -days 365 -subj /CN=Synergy -newkey rsa:4096 -keyout ~/.synergy/SSL/Synergy.pem -out ~/.synergy/SSL/Synergy.pem<br />
$ openssl x509 -fingerprint -sha1 -noout -in ~/.synergy/SSL/Synergy.pem > ~/.synergy/SSL/Fingerprints/Local.txt<br />
$ sed -e "s/.*=//" -i ~/.synergy/SSL/Fingerprints/Local.txt<br />
<br />
To activate the SSL plugin, add the {{ic|--enable-crypto}} option. (Note that the Synergy GUI will not let you enable encryption without a valid license, whereas the Barrier GUI allows doing so.)<br />
<br />
* Starting from the command line:<br />
$ synergys --enable-crypto<br />
<br />
* Starting with systemd:<br />
$ systemctl --user start synergys<br />
<br />
===Windows===<br />
<br />
# Open the Synergy program<br />
# Select the option ''Server (share this computer's mouse and keyboard)''<br />
# Select ''Configure interactively''<br />
# Click the ''Configure Server...'' button<br />
# This opens a window in which you can add screens depending on how many computers/screens you have: just drag the screen icon in the top-right corner to the screens area, and double-click it to edit its settings<br />
# Click ''OK'' to close the screens window when you are ready, then click on ''Start'' to start the server<br />
<br />
On Windows, configuration is saved by default in a {{ic|synergy.sgc}} file, but its name and location can of course be changed at pleasure.<br />
<br />
If you want to start the Synergy server everytime Windows starts, you have to launch the program '''as administrator''', then go to ''Edit -> Services'' and select ''Install'' in the ''Server'' section; note that at the following reboot Synergy will indeed automatically start, but the tray icon will not display automatically (at least for version 1.4.2 beta on Windows 7). To uninstall the service, do the same thing but obviously select ''Uninstall''.<br />
<br />
If you want to start the server from the command-line, here is a Windows command you can place in a {{ic|.bat}} file or just run from {{ic|cmd.exe}}:<br />
<br />
C:\Program Files\Synergy+\bin\synergys.exe -f --debug ERROR --name left --log c:\windows\synergy.log -c C:/windows/synergy.sgc --address 10.66.66.2:24800<br />
<br />
===macOS===<br />
<br />
macOS has a similar configuration as Unix: check [https://github.com/symless/synergy-core/wiki/Developer the official documentation] for more information.<br />
<br />
===Configuration examples===<br />
<br />
This is an example for a basic 3-computers setup:<br />
<br />
{{hc|/etc/synergy.conf|<nowiki><br />
section: screens<br />
server-fire:<br />
archright-fire:<br />
archleft-fire:<br />
end<br />
<br />
section: links<br />
archleft-fire:<br />
right = server-fire<br />
server-fire:<br />
right = archright-fire<br />
left = archleft-fire<br />
archright-fire:<br />
left = server-fire<br />
end<br />
</nowiki>}}<br />
<br />
This should be the example bundled with the Arch Linux package:<br />
<br />
{{hc|/etc/synergy.conf|2=<br />
section: screens<br />
# three hosts named: moe, larry, and curly<br />
moe:<br />
larry:<br />
curly:<br />
end<br />
<br />
section: links<br />
# larry is to the right of moe and curly is above moe<br />
moe:<br />
right = larry<br />
up = curly<br />
<br />
# moe is to the left of larry and curly is above larry.<br />
# note that curly is above both moe and larry and moe<br />
# and larry have a symmetric connection (they're in<br />
# opposite directions of each other).<br />
larry:<br />
left = moe<br />
up = curly<br />
<br />
# larry is below curly. if you move up from moe and then<br />
# down, you'll end up on larry.<br />
curly:<br />
down = larry<br />
end<br />
<br />
section: aliases<br />
# curly is also known as shemp<br />
curly:<br />
shemp<br />
end<br />
<br />
}}<br />
<br />
The following is a more customized example:<br />
<br />
{{hc|synergy.sgc|2=<br />
section: screens<br />
leftpc:<br />
halfDuplexCapsLock = false<br />
halfDuplexNumLock = false<br />
halfDuplexScrollLock = false<br />
xtestIsXineramaUnaware = false<br />
switchCorners = none +top-left +top-right +bottom-left +bottom-right <br />
switchCornerSize = 0<br />
rightpc:<br />
halfDuplexCapsLock = false<br />
halfDuplexNumLock = false<br />
halfDuplexScrollLock = false<br />
xtestIsXineramaUnaware = false<br />
switchCorners = none +top-left +top-right +bottom-left +bottom-right <br />
switchCornerSize = 0<br />
end<br />
<br />
section: aliases<br />
leftpc:<br />
10.66.66.2<br />
rightpc:<br />
10.66.66.1<br />
end<br />
<br />
section: links<br />
leftpc:<br />
right = rightpc<br />
rightpc:<br />
left = leftpc<br />
end<br />
<br />
section: options<br />
heartbeat = 1000<br />
relativeMouseMoves = false<br />
screenSaverSync = false<br />
win32KeepForeground = false<br />
switchCorners = none +top-left +top-right +bottom-left +bottom-right <br />
switchCornerSize = 4<br />
end<br />
}}<br />
<br />
==Clients configuration==<br />
<br />
{{Note|This assumes a server has been set up and configured '''properly'''. Make sure the server is already configured to accept the client(s) before continuing.}}<br />
{{Tip|You don't need to setup a client on the host server as the server includes one.}}<br />
<br />
===Arch Linux===<br />
In a console window, type:<br />
$ synergyc server-host-name<br />
<br />
Or, to run synergy in the foreground:<br />
$ synergyc -f server-host-name<br />
<br />
Here, {{ic|server-host-name}} is the host name of the server.<br />
<br />
==== Set up encryption on client ==== <br />
<br />
If you use the synergy command line client, copy the file containing the fingerprint [[synergy|{{ic|~/.synergy/SSL/Fingerprints/Local.txt}}]] from the server into the clients home directory [[synergy|{{ic|~/.synergy/SSL/Fingerprints/TrustedServers.txt}}]]. To start the synergy command line client with encryption, type:<br />
$ synergyc --enable-crypto server-host-name<br />
<br />
If you want to enable the SSL trust without requiring the GUI on the client you can follow the steps below, but you should confirm the fingerprint that gets displays is the same one your server has in its GUI or in the [[synergy|{{ic|~/.synergy/SSL/Fingerprints/Local.txt}}]] on the server per above. The `echo -n` is required to avoid the openssl client hanging waiting for input.<br />
<br />
$ mkdir -p ~/.synergy/SSL/Fingerprints<br />
$ echo -n | openssl s_client -connect $YOUR_SYNERGY_SERVER:24800 2>/dev/null | openssl x509 -noout -fingerprint | cut -f2 -d'=' | tee ~/.synergy/SSL/Fingerprints/TrustedServers.txt<br />
<br />
{{Note| There is an open issue with the GUI client of synergy (see https://github.com/symless/synergy-core/issues/4737). The dialog to prompt for confirmation of the server's fingerprint, only pops up if the logging level is set to INFO, DEBUG or DEBUG2.}}<br />
<br />
====Autostart====<br />
<br />
There exist several ways to automatically start the Synergy client, and they are actually the same that can be used for every other application.<br />
<br />
{{Note|In all of the following examples, you always have to substitute {{ic|server-host-name}} with the real server host name.}}<br />
<br />
* You can add the next line to your [[xinitrc|{{ic|~/.xinitrc}}]]:<br />
<br />
{{hc|~/.xinitrc|<br />
...<br />
<br />
#replace server-host-name with the real name<br />
synergyc server-host-name<br />
}}<br />
<br />
The following is an alternative:<br />
<br />
{{hc|~/.xinitrc|<br />
<nowiki>XINIT_CMD='/usr/bin/synergyc -d FATAL -n galileo-fire 10.66.66.2:24800'<br />
/usr/bin/pgrep -lxf "$XINIT_CMD" || ( ( $XINIT_CMD ) & )</nowiki><br />
}}<br />
<br />
* Otherwise, if you are using a [[display manager]] ([[GDM]], [[SDDM]], ...), or a stand-alone [[window manager]] (Openbox, ...), you could exploit its start-up script and add the following:<br />
synergyc server-host-name<br />
<br />
* To start the Synergy client with systemd, create a service file:<br />
<br />
{{hc|~/.config/systemd/user/synergyc.service|2=<br />
[Unit]<br />
Description=Synergy Client Daemon<br />
After=network.target<br />
<br />
[Service]<br />
ExecStart=/usr/bin/synergyc --no-daemon ''server-name''<br />
Restart=always<br />
RestartSec=3<br />
<br />
[Install]<br />
WantedBy=default.target}}<br />
<br />
To start the service for your user:<br />
<br />
$ systemctl --user daemon-reload<br />
$ systemctl --user start synergyc<br />
<br />
To start the service at login for your user:<br />
<br />
$ systemctl --user enable synergyc<br />
<br />
Automatically starting Synergy is also documented in its [https://github.com/symless/synergy-core/wiki/Startup official reference page].<br />
<br />
===Windows===<br />
<br />
After installation, open the Synergy program, select the option ''Client (use another computer's keyboard and mouse)'' and type the host name of the server computer in the text box, then click ''Start'' to start the client.<br />
{{Note|You can use the tray icon to stop the client.}}<br />
<br />
If you want to start the Synergy client every time Windows starts, you have to launch the program '''as an administrator''', then go to ''Edit -> Services'' and select ''Install'' in the ''Client'' section.<br />
<br />
If you want to start the client from the command-line, here is a Windows command you can place in a {{ic|.bat}} file or just run from {{ic|cmd.exe}}. This points to a configuration file in {{ic|C:\synergy.sgc}} and runs in the background like a service.<br />
<br />
{{bc|<nowiki>START /MIN /D"C:\Program Files\Synergy+\bin" synergys.exe -d ERROR -n m6300 -c C:\synergy.sgc -a 10.66.66.2:24800</nowiki>}}<br />
<br />
===macOS===<br />
<br />
Locate the synergyc program in the synergyc folder and drag it onto the terminal window: the full path will appear in the terminal.<br />
Now append the host name of the server, so that the complete command will look like this:<br />
<br />
{{bc|/path/to/synergyc/synergyc server-host-name}}<br />
<br />
Then press {{ic|Enter}}.<br />
<br />
==Known issues==<br />
If Arch is being used as a client in a Synergy installation, the server may not be able to wake the client monitor. There are some workarounds, such as executing the following via [[SSH]], if ACPI is enabled (see: [[Display Power Management Signaling#Modify DPMS and screensaver settings with a command]]):<br />
{{bc|# xset dpms force on}}<br />
<br />
==Troubleshooting==<br />
The official documentation has a [https://github.com/symless/synergy-core/wiki/User-FAQ FAQ] and also a [https://github.com/symless/synergy-core/wiki/User-Guide#Troubleshooting troubleshooting page].<br />
<br />
===Keyboard AltGr===<br />
If you encounter problems with AltGr add <br />
<br />
altgr = alt #1.8.2<br />
altgr = shift #v1.8.3 and higher<br />
<br />
on the screen/client section in /etc/synergys.conf.<br />
<br />
===Keyboard repeat===<br />
If you experience problems with your keyboard repeat on the client machine (Linux host), simply type:<br />
{{bc|# /usr/bin/xset r on}}<br />
in any console.<br />
<br />
===Keyboard mapping===<br />
If you experience problems with the keyboard mapping when using the server's keyboard in a client window (e.g a terminal) then re-setting the X key map after starting synergyc may help. The following command sets the keymap to its current value:<br />
<br />
# setxkbmap $(setxkbmap -query | grep "^layout:" | awk -F ": *" '{print $2}')<br />
<br />
===No cursor in Gnome===<br />
When [[GNOME]] doesn't detect a mouse, it will default to touchscreen mode and hide the cursor. To enable run:<br />
<br />
# dconf write /org/gnome/settings-daemon/plugins/cursor/active false<br />
<br />
This can be added to an init script or systemd unit:<br />
<br />
ExecStartPost=dconf write /org/gnome/settings-daemon/plugins/cursor/active false<br />
<br />
===Client is returning "failed to verify server certificate fingerprint"===<br />
<br />
You need to copy the content of server's "~/.synergy/SSL/Fingerprints/Local.txt" into client's "~/.synergy/SSL/Fingerprints/TrustedServers.txt". See [[#Set up encryption on client]].<br />
<br />
===Scroll Lock LED does not light===<br />
When using Scroll Lock to lock to a client (or to enter relative mouse move mode), you may run into an issue with your keyboard's Scroll Lock LED not lighting. This can be solved by binding the {{ic|Scroll_Lock}} key to an empty modifier key.<br />
<br />
First, find an empty modifier. In this case, mod3 is available:<br />
$ xmodmap<br />
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):<br />
<br />
shift Shift_L (0x32), Shift_R (0x3e)<br />
lock Caps_Lock (0x42)<br />
control Control_L (0x25), Control_R (0x69)<br />
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)<br />
mod2 Num_Lock (0x4d)<br />
mod3<br />
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)<br />
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)<br />
<br />
Then, add the new mapping.<br />
$ xmodmap -e 'add mod3 = Scroll_Lock'<br />
$ "echo "add mod3 = Scroll_Lock" >> ~/.Xmodmap<br />
<br />
See [[Xmodmap#Activating the custom table]] to have {{ic|~/.Xmodmap}} loaded on login.<br />
<br />
After making this change, test the LED and screen locking. If you find that you need to press Scroll Lock twice to lock screens, enable {{ic|halfDuplexScrollLock}} on all screens in {{ic|section: screens}}.<br />
<br />
===Additional mouse buttons do not work in client===<br />
If you find that additional mouse buttons (i.e. Mouse4/Mouse5) do not translate to a client, try adding the following to {{ic|section: options}}:<br />
<br />
mousebutton(6) = mousebutton(4)<br />
mousebutton(7) = mousebutton(5)<br />
<br />
This will re-map the mouse keys to the proper number. If that does not fix the problem, remove the configuration, stop Synergy, and start it in the foreground with debug logging enabled:<br />
<br />
$ synergys -f -d DEBUG1<br />
<br />
Then, move your cursor to the screen of the client with the issue. Click the non-functioning keys, and watch for log entries like this:<br />
<br />
[2017-09-30T14:56:45] DEBUG1: onMouseDown id=6<br />
...<br />
[2017-09-30T14:56:46] DEBUG1: onMouseUp id=6<br />
<br />
The {{ic|<nowiki>id=...</nowiki>}} part will have the right number to use in {{ic|mousebutton(...)}}<br />
<br />
===mouse fixed in certain games===<br />
In some applications (like Overwatch or other games) the cursor gets trapped in the middle of the screen.<br />
<br />
According to https://github.com/symless/synergy-core/issues/2631 this is an issue that is known.<br />
<br />
Just set relative mouse movement in your settings and make sure to lock the screen.<br />
<br />
==External links==<br />
* Synergy website: https://symless.com/synergy/<br />
* Official documentation: https://github.com/symless/synergy-core/wiki/User-Guide</div>Pdchttps://wiki.archlinux.org/index.php?title=Pacman/Tips_and_tricks&diff=607356Pacman/Tips and tricks2020-04-23T09:20:28Z<p>Pdc: Style: see https://wiki.archlinux.org/index.php/Help:Reading#Regular_user_or_root</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Package management]]<br />
[[es:Pacman (Español)/Tips and tricks]]<br />
[[fa:Pacman tips]]<br />
[[fr:Pacman/Trucs et Astuces]]<br />
[[it:Pacman/Tips and tricks]]<br />
[[ja:Pacman ヒント]]<br />
[[pt:Pacman (Português)/Tips and tricks]]<br />
[[ru:Pacman (Русский)/Tips and tricks]]<br />
[[zh-hans:Pacman/Tips and tricks]]<br />
{{Related articles start}}<br />
{{Related|Mirrors}}<br />
{{Related|Creating packages}}<br />
{{Related articles end}}<br />
For general methods to improve the flexibility of the provided tips or ''pacman'' itself, see [[Core utilities]] and [[Bash]].<br />
<br />
== Maintenance ==<br />
<br />
{{Expansion|{{ic|1=Usage=}} introduced with pacman 4.2, see [http://allanmcrae.com/2014/12/pacman-4-2-released/]}}<br />
<br />
{{Note|Instead of using ''comm'' (which requires sorted input with ''sort'') in the sections below, you may also use {{ic|grep -Fxf}} or {{ic|grep -Fxvf}}.}}<br />
<br />
See also [[System maintenance]].<br />
<br />
=== Listing packages ===<br />
<br />
==== With version ====<br />
<br />
You may want to get the list of installed packages with their version, which is useful when reporting bugs or discussing installed packages.<br />
<br />
* List all explicitly installed packages: {{ic|pacman -Qe}}.<br />
* List all packages in the [[package group]] named {{ic|''group''}}: {{ic|pacman -Sg ''group''}}<br />
* List all foreign packages (typically manually downloaded and installed or packages removed from the repositories): {{ic|pacman -Qm}}.<br />
* List all native packages (installed from the sync database(s)): {{ic|pacman -Qn}}.<br />
* List all explicitly installed native packages (i.e. present in the sync database) that are not direct or optional dependencies: {{ic|pacman -Qent}}.<br />
* List packages by regex: {{ic|pacman -Qs ''regex''}}.<br />
* List packages by regex with custom output format (needs {{Pkg|expac}}): {{ic|expac -s "%-30n %v" ''regex''}}.<br />
<br />
==== With size ====<br />
<br />
Figuring out which packages are largest can be useful when trying to free space on your hard drive. There are two options here: get the size of individual packages, or get the size of packages and their dependencies.<br />
<br />
===== Individual packages =====<br />
<br />
The following command will list all installed packages and their individual sizes:<br />
<br />
$ LC_ALL=C pacman -Qi | awk '/^Name/{name=$3} /^Installed Size/{print $4$5, name}' | sort -h<br />
<br />
===== Packages and dependencies =====<br />
<br />
To list package sizes with their dependencies,<br />
<br />
* Install {{Pkg|expac}} and run {{ic|<nowiki>expac -H M '%m\t%n' | sort -h</nowiki>}}.<br />
* Run {{Pkg|pacgraph}} with the {{ic|-c}} option.<br />
<br />
To list the download size of several packages (leave {{ic|''packages''}} blank to list all packages):<br />
<br />
$ expac -S -H M '%k\t%n' ''packages''<br />
<br />
To list explicitly installed packages not in the [[meta package]] {{Pkg|base}} nor [[package group]] {{Grp|base-devel}} with size and description:<br />
<br />
$ expac -H M "%011m\t%-20n\t%10d" $(comm -23 <(pacman -Qqen | sort) <({ pacman -Qqg base-devel; expac -l '\n' '%E' base; } | sort | uniq)) | sort -n<br />
<br />
To list the packages marked for upgrade with their download size<br />
<br />
$ expac -S -H M '%k\t%n' $(pacman -Qqu) | sort -sh<br />
<br />
==== By date ====<br />
<br />
To list the 20 last installed packages with {{Pkg|expac}}, run:<br />
<br />
$ expac --timefmt='%Y-%m-%d %T' '%l\t%n' | sort | tail -n 20<br />
<br />
or, with seconds since the epoch (1970-01-01 UTC):<br />
<br />
$ expac --timefmt=%s '%l\t%n' | sort -n | tail -n 20<br />
<br />
==== Not in a specified group, repository or meta package ====<br />
<br />
{{Note|To get a list of packages installed as dependencies but no longer required by any installed package, see [[#Removing unused packages (orphans)]].<br />
}}<br />
<br />
List explicitly installed packages not in the {{Pkg|base}} [[meta package]]:<br />
<br />
$ comm -23 <(pacman -Qqe | sort) <(expac -l '\n' '%E' base | sort)<br />
<br />
List explicitly installed packages not in the {{Pkg|base}} meta package or {{Grp|base-devel}} [[package group]]:<br />
<br />
$ comm -23 <(pacman -Qqe | sort) <({ pacman -Qqg base-devel; expac -l '\n' '%E' base; } | sort -u)<br />
<br />
List all installed packages unrequired by other packages, and which are not in the {{Pkg|base}} meta package or {{Grp|base-devel}} package group:<br />
<br />
$ comm -23 <(pacman -Qqt | sort) <({ pacman -Qqg base-devel; expac -l '\n' '%E' base; } | sort -u)<br />
<br />
As above, but with descriptions:<br />
<br />
$ expac -H M '%-20n\t%10d' $(comm -23 <(pacman -Qqt | sort) <({ pacman -Qqg base-devel; expac -l '\n' '%E' base; } | sort -u))<br />
<br />
List all installed packages that are ''not'' in the specified repository ''repo_name''<br />
<br />
$ comm -23 <(pacman -Qq | sort) <(pacman -Sql ''repo_name'' | sort)<br />
<br />
List all installed packages that are in the ''repo_name'' repository:<br />
<br />
$ comm -12 <(pacman -Qq | sort) <(pacman -Sql ''repo_name'' | sort)<br />
<br />
List all packages on the Arch Linux ISO that are not in the {{Pkg|base}} meta package:<br />
<br />
<nowiki>$ comm -23 <(curl https://git.archlinux.org/archiso.git/plain/configs/releng/packages.x86_64) <(expac -l '\n' '%E' base | sort)</nowiki><br />
<br />
==== Development packages ====<br />
<br />
To list all development/unstable packages, run:<br />
<br />
$ pacman -Qq | grep -Ee '-(bzr|cvs|darcs|git|hg|svn)$'<br />
<br />
=== Browsing packages ===<br />
<br />
To browse all installed packages with an instant preview of each package:<br />
<br />
$ pacman -Qq | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)'<br />
<br />
This uses [[fzf]] to present a two-pane view listing all packages with package info shown on the right.<br />
<br />
Enter letters to filter the list of packages; use arrow keys (or {{ic|Ctrl-j}}/{{ic|Ctrl-k}}) to navigate; press {{ic|Enter}} to see package info under ''less''.<br />
<br />
=== Listing files owned by a package with size ===<br />
<br />
This one might come in handy if you have found that a specific package uses a huge amount of space and you want to find out which files make up the most of that.<br />
<br />
$ pacman -Qlq ''package'' | grep -v '/$' | xargs du -h | sort -h<br />
<br />
=== Identify files not owned by any package ===<br />
<br />
If your system has stray files not owned by any package (a common case if you do not [[Enhance system stability#Use the package manager to install software|use the package manager to install software]]), you may want to find such files in order to clean them up.<br />
<br />
One method is to use {{ic|# pacreport --unowned-files}} from {{Pkg|pacutils}} which will list unowned files among other details.<br />
<br />
Another is to list all files of interest and check them against pacman:<br />
<br />
# find /etc /usr /opt /var | LC_ALL=C pacman -Qqo - 2>&1 > /dev/null | cut -d ' ' -f 5-<br />
<br />
{{Tip|The {{Pkg|lostfiles}} script performs similar steps, but also includes an extensive blacklist to remove common false positives from the output.}}<br />
<br />
=== Tracking unowned files created by packages ===<br />
<br />
Most systems will slowly collect several [http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html#S3-RPM-INSIDE-FLIST-GHOST-DIRECTIVE ghost] files such as state files, logs, indexes, etc. through the course of usual operation.<br />
<br />
{{ic|pacreport}} from {{Pkg|pacutils}} can be used to track these files and their associations via {{ic|/etc/pacreport.conf}} (see {{man|1|pacreport|FILES}}).<br />
<br />
An example may look something like this (abridged):<br />
<br />
{{hc|/etc/pacreport.conf|<nowiki><br />
[Options]<br />
IgnoreUnowned = usr/share/applications/mimeinfo.cache<br />
<br />
[PkgIgnoreUnowned]<br />
alsa-utils = var/lib/alsa/asound.state<br />
bluez = var/lib/bluetooth<br />
ca-certificates = etc/ca-certificates/trust-source/*<br />
dbus = var/lib/dbus/machine-id<br />
glibc = etc/ld.so.cache<br />
grub = boot/grub/*<br />
linux = boot/initramfs-linux.img<br />
pacman = var/lib/pacman/local<br />
update-mime-database = usr/share/mime/magic<br />
</nowiki>}}<br />
<br />
Then, when using {{ic|# pacreport --unowned-files}}, any unowned files will be listed if the associated package is no longer installed (or if any new files have been created).<br />
<br />
Additionally, [https://github.com/CyberShadow/aconfmgr aconfmgr] ({{AUR|aconfmgr-git}}) allows tracking modified and orphaned files using a configuration script.<br />
<br />
=== Removing unused packages (orphans) ===<br />
<br />
For recursively removing orphans and their configuration files:<br />
<br />
# pacman -Rns $(pacman -Qtdq)<br />
<br />
If no orphans were found ''pacman'' outputs {{ic|error: no targets specified}}. This is expected as no arguments were passed to {{ic|pacman -Rns}}.<br />
<br />
{{Note|The arguments {{ic|-Qt}} list only true orphans. To include packages which are ''optionally'' required by another package, pass the {{ic|-t}} flag twice (''i.e.'', {{ic|-Qtt}}).}}<br />
<br />
=== Removing everything but essential packages ===<br />
<br />
If it is ever necessary to remove all packages except the essentials packages, one method is to set the installation reason of the non-essential ones as dependency and then remove all unnecessary dependencies.<br />
<br />
First, for all the packages installed "as explicitly", change their installation reason to "as dependency":<br />
<br />
# pacman -D --asdeps $(pacman -Qqe)<br />
<br />
Then, change the installation reason to "as explicitly" of only the essential packages, those you '''do not''' want to remove, in order to avoid targeting them:<br />
<br />
# pacman -D --asexplicit base linux linux-firmware<br />
<br />
{{Note|<br />
* Additional packages can be added to the above command in order to avoid being removed. See [[Installation guide#Install essential packages]] for more info on other packages that may be necessary for a fully functional base system.<br />
* This will also select the bootloader's package for removal. The system should still be bootable, but the boot parameters might not be changeable without it.<br />
}}<br />
<br />
Finally, follow the instructions in [[#Removing unused packages (orphans)]] to remove all packages that have installation reason "as dependency".<br />
<br />
=== Getting the dependencies list of several packages ===<br />
<br />
Dependencies are alphabetically sorted and doubles are removed.<br />
<br />
{{Note|To only show the tree of local installed packages, use {{ic|pacman -Qi}}.}}<br />
<br />
$ LC_ALL=C pacman -Si ''packages'' | awk -F'[:<=>]' '/^Depends/ {print $2}' | xargs -n1 | sort -u<br />
<br />
Alternatively, with {{Pkg|expac}}: <br />
<br />
$ expac -l '\n' %E -S ''packages'' | sort -u<br />
<br />
=== Listing changed backup files ===<br />
<br />
If you want to back up your system configuration files, you could copy all files in {{ic|/etc/}} but usually you are only interested in the files that you have changed. Modified [[Pacnew_and_Pacsave_files#Package_backup_files|backup files]] can be viewed with the following command:<br />
<br />
# pacman -Qii | awk '/^MODIFIED/ {print $2}'<br />
<br />
Running this command with root permissions will ensure that files readable only by root (such as {{ic|/etc/sudoers}}) are included in the output.<br />
<br />
{{Tip|See [[#Listing all changed files from packages]] to list all changed files ''pacman'' knows about, not only backup files.}}<br />
<br />
=== Back up the pacman database ===<br />
<br />
The following command can be used to back up the local ''pacman'' database:<br />
<br />
$ tar -cjf pacman_database.tar.bz2 /var/lib/pacman/local<br />
<br />
Store the backup ''pacman'' database file on one or more offline media, such as a USB stick, external hard drive, or CD-R.<br />
<br />
The database can be restored by moving the {{ic|pacman_database.tar.bz2}} file into the {{ic|/}} directory and executing the following command:<br />
<br />
# tar -xjvf pacman_database.tar.bz2<br />
<br />
{{Note|If the ''pacman'' database files are corrupted, and there is no backup file available, there exists some hope of rebuilding the ''pacman'' database. Consult [[#Restore pacman's local database]].}}<br />
<br />
{{Tip|The {{AUR|pakbak-git}} package provides a script and a [[systemd]] service to automate the task. Configuration is possible in {{ic|/etc/pakbak.conf}}.}}<br />
<br />
=== Check changelogs easily ===<br />
<br />
When maintainers update packages, commits are often commented in a useful fashion. Users can quickly check these from the command line by installing {{AUR|pacolog}}. This utility lists recent commit messages for packages from the official repositories or the AUR, by using {{ic|pacolog <package>}}.<br />
<br />
== Installation and recovery ==<br />
<br />
Alternative ways of getting and restoring packages.<br />
<br />
=== Installing packages from a CD/DVD or USB stick ===<br />
<br />
{{Merge|#Custom local repository|Use as an example and avoid duplication}}<br />
<br />
To download packages, or groups of packages:<br />
<br />
# cd ~/Packages<br />
# pacman -Syw base base-devel grub-bios xorg gimp --cachedir .<br />
# repo-add ./custom.db.tar.gz ./*<br />
<br />
Then you can burn the "Packages" folder to a CD/DVD or transfer it to a USB stick, external HDD, etc.<br />
<br />
To install:<br />
<br />
'''1.''' Mount the media:<br />
<br />
# mkdir /mnt/repo<br />
# mount /dev/sr0 /mnt/repo #For a CD/DVD.<br />
# mount /dev/sdxY /mnt/repo #For a USB stick.<br />
<br />
'''2.''' Edit {{ic|pacman.conf}} and add this repository ''before'' the other ones (e.g. extra, core, etc.). This is important. Do not just uncomment the one on the bottom. This way it ensures that the files from the CD/DVD/USB take precedence over those in the standard repositories:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
[custom]<br />
SigLevel = PackageRequired<br />
Server = file:///mnt/repo/Packages}}<br />
<br />
'''3.''' Finally, synchronize the ''pacman'' database to be able to use the new repository:<br />
<br />
# pacman -Syu<br />
<br />
=== Custom local repository ===<br />
<br />
Use the ''repo-add'' script included with ''pacman'' to generate a database for a personal repository. Use {{ic|repo-add --help}} for more details on its usage. <br />
A package database is a tar file, optionally compressed. Valid extensions are ''.db'' or ''.files'' followed by an archive extension of ''.tar'', ''.tar.gz'', ''.tar.bz2'', ''.tar.xz'', ''.tar.zst'', or ''.tar.Z''. The file does not need to exist, but all parent directories must exist.<br />
<br />
To add a new package to the database, or to replace the old version of an existing package in the database, run:<br />
<br />
$ repo-add ''/path/to/repo.db.tar.gz /path/to/package-1.0-1-x86_64.pkg.tar.xz''<br />
<br />
The database and the packages do not need to be in the same directory when using ''repo-add'', but keep in mind that when using ''pacman'' with that database, they should be together. Storing all the built packages to be included in the repository in one directory also allows to use shell glob expansion to add or update multiple packages at once:<br />
<br />
$ repo-add ''/path/to/repo.db.tar.gz /path/to/*.pkg.tar.xz''<br />
<br />
{{Warning|''repo-add'' adds the entries into the database in the same order as passed on the command line. If multiple versions of the same package are involved, care must be taken to ensure that the correct version is added last. In particular, note that lexical order used by the shell depends on the locale and differs from the [https://www.archlinux.org/pacman/vercmp.8.html vercmp] ordering used by ''pacman''.}}<br />
<br />
If you are looking to support multiple architectures then precautions should be taken to prevent errors from occurring. Each architecture should have its own directory tree:<br />
<br />
{{hc|$ tree ~/customrepo/ {{!}} sed "s/$(uname -m)/<arch>/g"|<br />
/home/archie/customrepo/<br />
└── <arch><br />
├── customrepo.db -> customrepo.db.tar.xz<br />
├── customrepo.db.tar.xz<br />
├── customrepo.files -> customrepo.files.tar.xz<br />
├── customrepo.files.tar.xz<br />
└── personal-website-git-b99cce0-1-<arch>.pkg.tar.xz<br />
<br />
1 directory, 5 files<br />
}}<br />
<br />
The ''repo-add'' executable checks if the package is appropriate. If this is not the case you will be running into error messages similar to this:<br />
<br />
==> ERROR: '/home/archie/customrepo/<arch>/foo-<arch>.pkg.tar.xz' does not have a valid database archive extension.<br />
<br />
''repo-remove'' is used to remove packages from the package database, except that only package names are specified on the command line.<br />
<br />
$ repo-remove ''/path/to/repo.db.tar.gz pkgname''<br />
<br />
Once the local repository database has been created, add the repository to {{ic|pacman.conf}} for each system that is to use the repository. An example of a custom repository is in {{ic|pacman.conf}}. The repository's name is the database filename with the file extension omitted. In the case of the example above the repository's name would simply be ''repo''. Reference the repository's location using a {{ic|file://}} url, or via FTP using ftp://localhost/path/to/directory.<br />
<br />
If willing, add the custom repository to the [[Unofficial user repositories|list of unofficial user repositories]], so that the community can benefit from it.<br />
<br />
=== Network shared pacman cache ===<br />
{{Merge|Package_Proxy_Cache|Same topic}}<br />
If you happen to run several Arch boxes on your LAN, you can share packages so that you can greatly decrease your download times. Keep in mind you should not share between different architectures (i.e. i686 and x86_64) or you will run into problems.<br />
<br />
==== Read-only cache ====<br />
<br />
If you are looking for a quick solution, you can simply run a standalone webserver, e.g. {{Pkg|darkhttpd}}, which other computers can use as a first mirror:<br />
# ln /var/lib/pacman/sync/*.db /var/cache/pacman/pkg<br />
$ sudo -u http darkhttpd /var/cache/pacman/pkg --no-server-id<br />
You could also run darkhttpd as a systemd service for convenience. Just add this server at the top of your {{ic|/etc/pacman.d/mirrorlist}} in client machines with {{ic|1=Server = http&#58;//mymirror:8080}}. Make sure to keep your mirror updated.<br />
<br />
If you are already running a web server for some other purpose, you might wish to reuse that as your local repo server instead of darkhttpd. For example, if you already serve a site with [[nginx]], you can add an nginx server block listening on port 8080:<br />
<br />
{{hc|/etc/nginx/nginx.conf|<br />
server {<br />
listen 8080;<br />
root /var/cache/pacman/pkg;<br />
server_name myarchrepo.localdomain;<br />
try_files $uri $uri/;<br />
}<br />
}}<br />
<br />
Remember to restart nginx after making this change.<br />
<br />
Whichever web server you use, remember to open port 8080 to local traffic (and you probably want to deny anything not local), so add a rule like the following to [[iptables]]:<br />
<br />
{{hc|/etc/iptables/iptables.rules|<br />
-A TCP -s 192.168.0.0/16 -p tcp -m tcp --dport 8080 -j ACCEPT<br />
}}<br />
<br />
Remember to restart iptables after making this change.<br />
<br />
==== Distributed read-only cache ====<br />
<br />
There are Arch-specific tools for automatically discovering other computers on your network offering a package cache. Try {{Pkg|pacredir}}, [[pacserve]], {{AUR|pkgdistcache}}, or {{AUR|paclan}}. pkgdistcache uses Avahi instead of plain UDP which may work better in certain home networks that route instead of bridge between WiFi and Ethernet.<br />
<br />
Historically, there was [https://bbs.archlinux.org/viewtopic.php?id=64391 PkgD] and [https://github.com/toofishes/multipkg multipkg], but they are no longer maintained.<br />
<br />
==== Read-write cache ====<br />
<br />
In order to share packages between multiple computers, simply share {{ic|/var/cache/pacman/}} using any network-based mount protocol. This section shows how to use [[shfs]] or [[SSHFS]] to share a package cache plus the related library-directories between multiple computers on the same local network. Keep in mind that a network shared cache can be slow depending on the file-system choice, among other factors.<br />
<br />
First, install any network-supporting filesystem packages: {{pkg|shfs-utils}}, {{pkg|sshfs}}, {{pkg|curlftpfs}}, {{pkg|samba}} or {{pkg|nfs-utils}}.<br />
<br />
{{Tip|<br />
* To use ''sshfs'' or ''shfs'', consider reading [[Using SSH Keys]].<br />
* By default, ''smbfs'' does not serve filenames that contain colons, which results in the client downloading the offending package afresh. To prevent this, use the {{ic|mapchars}} mount option on the client.<br />
}}<br />
<br />
Then, to share the actual packages, mount {{ic|/var/cache/pacman/pkg}} from the server to {{ic|/var/cache/pacman/pkg}} on every client machine.<br />
<br />
{{Warning|Do not make {{ic|/var/cache/pacman/pkg}} or any of its ancestors (e.g., {{ic|/var}}) a symlink. ''Pacman'' expects these to be directories. When ''pacman'' re-installs or upgrades itself, it will remove the symlinks and create empty directories instead. However during the transaction ''pacman'' relies on some files residing there, hence breaking the update process. Refer to {{bug|50298}} for further details.}}<br />
<br />
==== two-way with rsync ====<br />
<br />
Another approach in a local environment is [[rsync]]. Choose a server for caching and enable the [[Rsync#rsync daemon]]. On clients synchronize two-way with this share via rsync protocol. Filenames that contain colons are no problem for the rsync protocol.<br />
<br />
Draft example for a client, using {{ic|uname -m}} within the share name ensures an architecture dependant sync:<br />
# rsync rsync://server/share_$(uname -m)/ /var/cache/pacman/pkg/ ...<br />
# pacman ...<br />
# paccache ...<br />
# rsync /var/cache/pacman/pkg/ rsync://server/share_$(uname -m)/ ...<br />
<br />
==== Dynamic reverse proxy cache using nginx ====<br />
<br />
[[nginx]] can be used to proxy package requests to official upstream mirrors and cache the results to the local disk. All subsequent requests for that package will be served directly from the local cache, minimizing the amount of internet traffic needed to update a large number of computers. <br />
<br />
In this example, the cache server will run at {{ic|<nowiki>http://cache.domain.example:8080/</nowiki>}} and store the packages in {{ic|/srv/http/pacman-cache/}}. <br />
<br />
Install [[nginx]] on the computer that is going to host the cache. Create the directory for the cache and adjust the permissions so nginx can write files to it:<br />
<br />
# mkdir /srv/http/pacman-cache<br />
# chown http:http /srv/http/pacman-cache<br />
<br />
Use the [https://github.com/nastasie-octavian/nginx_pacman_cache_config/blob/c54eca4776ff162ab492117b80be4df95880d0e2/nginx.conf nginx pacman cache config] as a starting point for {{ic|/etc/nginx/nginx.conf}}. Check that the {{ic|resolver}} directive works for your needs. In the upstream server blocks, configure the {{ic|proxy_pass}} directives with addresses of official mirrors, see examples in the config file about the expected format. Once you are satisfied with the configuration file [[Nginx#Running|start and enable nginx]].<br />
<br />
In order to use the cache each Arch Linux computer (including the one hosting the cache) must have the following line at the top of the {{ic|mirrorlist}} file:<br />
<br />
{{hc|/etc/pacman.d/mirrorlist|<nowiki><br />
Server = http://cache.domain.example:8080/$repo/os/$arch<br />
...<br />
</nowiki>}}<br />
<br />
{{Note| You will need to create a method to clear old packages, as the cache directory will continue to grow over time. {{ic|paccache}} (which is provided by {{pkg|pacman-contrib}}) can be used to automate this using retention criteria of your choosing. For example, {{ic|find /srv/http/pacman-cache/ -type d -exec paccache -v -r -k 2 -c {} \;}} will keep the last 2 versions of packages in your cache directory.}}<br />
<br />
==== Pacoloco proxy cache server ====<br />
<br />
[https://github.com/anatol/pacoloco Pacoloco] is an easy-to-use proxy cache server for pacman repositories. It can be installed as {{AUR|pacoloco-git}}. Open the configuration file and add pacman mirrors:<br />
<br />
{{hc|/etc/pacoloco.yaml|<nowiki><br />
port: 9129<br />
repos:<br />
mycopy:<br />
urls:<br />
- http://mirror.lty.me/archlinux<br />
- http://mirrors.kernel.org/archlinux<br />
</nowiki>}}<br />
<br />
[[Restart]] {{ic|pacoloco.service}} and the proxy repository will be available at {{ic|http://<myserver>:9129/repo/mycopy}}.<br />
<br />
==== Synchronize pacman package cache using synchronization programs ====<br />
<br />
Use [[Syncthing]] or [[Resilio Sync]] to synchronize the ''pacman'' cache folders (i.e. {{ic|/var/cache/pacman/pkg}}).<br />
<br />
==== Preventing unwanted cache purges ====<br />
<br />
By default, {{Ic|pacman -Sc}} removes package tarballs from the cache that correspond to packages that are not installed on the machine the command was issued on. Because ''pacman'' cannot predict what packages are installed on all machines that share the cache, it will end up deleting files that should not be.<br />
<br />
To clean up the cache so that only ''outdated'' tarballs are deleted, add this entry in the {{ic|[options]}} section of {{ic|/etc/pacman.conf}}:<br />
<br />
CleanMethod = KeepCurrent<br />
<br />
=== Recreate a package from the file system ===<br />
<br />
To recreate a package from the file system, use {{AUR|fakepkg}}. Files from the system are taken as they are, hence any modifications will be present in the assembled package. Distributing the recreated package is therefore discouraged; see [[ABS]] and [[Arch Linux Archive]] for alternatives.<br />
<br />
=== List of installed packages ===<br />
<br />
Keeping a list of all the explicitly installed packages can be useful, to backup a system for example or speed up installation on a new system:<br />
<br />
$ pacman -Qqe > pkglist.txt<br />
<br />
{{Note|<br />
* With option {{ic|-t}}, the packages already required by other explicitly installed packages are not mentioned. If reinstalling from this list they will be installed but as dependencies only.<br />
* With option {{ic|-n}}, foreign packages (e.g. from [[AUR]]) would be omitted from the list.<br />
* Use {{ic|comm -13 <(pacman -Qqdt {{!}} sort) <(pacman -Qqdtt {{!}} sort) > optdeplist.txt}} to also create a list of the installed optional dependencies which can be reinstalled with {{ic|--asdeps}}.<br />
* Use {{ic|pacman -Qqem > foreignpkglist.txt}} to create the list of AUR and other foreign packages that have been explicitly installed.}}<br />
<br />
To keep an up-to-date list of explicitly installed packages (e.g. in combination with a versioned {{ic|/etc/}}), you can set up a [[Pacman#Hooks|hook]]. Example:<br />
<br />
[Trigger]<br />
Operation = Install<br />
Operation = Remove<br />
Type = Package<br />
Target = *<br />
<br />
[Action]<br />
When = PostTransaction<br />
Exec = /bin/sh -c '/usr/bin/pacman -Qqe > /etc/pkglist.txt'<br />
<br />
=== Install packages from a list ===<br />
<br />
To install packages from a previously saved list of packages, while not reinstalling previously installed packages that are already up-to-date, run:<br />
<br />
# pacman -S --needed - < pkglist.txt<br />
<br />
However, it is likely foreign packages such as from the AUR or installed locally are present in the list. To filter out from the list the foreign packages, the previous command line can be enriched as follows:<br />
<br />
# pacman -S --needed $(comm -12 <(pacman -Slq | sort) <(sort pkglist.txt))<br />
<br />
Eventually, to make sure the installed packages of your system match the list and remove all the packages that are not mentioned in it:<br />
<br />
# pacman -Rsu $(comm -23 <(pacman -Qq | sort) <(sort pkglist.txt))<br />
<br />
{{Tip|These tasks can be automated. See {{AUR|bacpac}}, {{AUR|packup}}, {{AUR|pacmanity}}, and {{AUR|pug}} for examples.}}<br />
<br />
=== Listing all changed files from packages ===<br />
<br />
If you are suspecting file corruption (e.g. by software/hardware failure), but are unsure if files were corrupted, you might want to compare with the hash sums in the packages. This can be done with {{Pkg|pacutils}}:<br />
<br />
# paccheck --md5sum --quiet<br />
<br />
For recovery of the database see [[#Restore pacman's local database]]. The {{ic|mtree}} files can also be [[#Viewing a single file inside a .pkg file|extracted as {{ic|.MTREE}} from the respective package files]].<br />
<br />
{{Note|This should '''not''' be used as is when suspecting malicious changes! In this case security precautions such as using a live medium and an independent source for the hash sums are advised.}}<br />
<br />
=== Reinstalling all packages ===<br />
To reinstall all native packages, use:<br />
<br />
# pacman -Qqn | pacman -S -<br />
<br />
Foreign (AUR) packages must be reinstalled separately; you can list them with {{ic|pacman -Qqm}}.<br />
<br />
''Pacman'' preserves the [[installation reason]] by default.<br />
<br />
=== Restore pacman's local database ===<br />
<br />
See [[Pacman/Restore local database]].<br />
<br />
=== Recovering a USB key from existing install ===<br />
<br />
If you have Arch installed on a USB key and manage to mess it up (e.g. removing it while it is still being written to), then it is possible to re-install all the packages and hopefully get it back up and working again (assuming USB key is mounted in {{ic|/newarch}})<br />
<br />
# pacman -S $(pacman -Qq --dbpath /newarch/var/lib/pacman) --root /newarch --dbpath /newarch/var/lib/pacman<br />
<br />
=== Viewing a single file inside a .pkg file ===<br />
<br />
For example, if you want to see the contents of {{ic|/etc/systemd/logind.conf}} supplied within the {{Pkg|systemd}} package:<br />
<br />
$ bsdtar -xOf /var/cache/pacman/pkg/systemd-204-3-x86_64.pkg.tar.xz etc/systemd/logind.conf<br />
<br />
Or you can use {{pkg|vim}} to browse the archive:<br />
<br />
$ vim /var/cache/pacman/pkg/systemd-204-3-x86_64.pkg.tar.xz<br />
<br />
=== Find applications that use libraries from older packages ===<br />
<br />
Even if you installed a package the existing long-running programs (like daemons and servers) still keep using code from old package libraries. And it is a bad idea to let these programs running if the old library contains a security bug.<br />
<br />
Here is a way how to find all the programs that use old packages code:<br />
<br />
# lsof +c 0 | grep -w DEL | awk '1 { print $1 ": " $NF }' | sort -u<br />
It will print running program name and old library that was removed or replaced with newer content.<br />
<br />
=== Installing only content in required languages ===<br />
<br />
Many packages attempt to install documentation and translations in several languages. Some programs are designed to remove such unnecessary files, such as {{AUR|localepurge}}, which runs after a package is installed to delete the unneeded locale files. A more direct approach is provided through the {{ic|NoExtract}} directive in {{ic|pacman.conf}}, which prevent these files from ever being installed.<br />
<br />
{{Warning|1=Some users noted that removing locales has resulted in [https://wiki.archlinux.org/index.php?title=Talk:Pacman&oldid=460285#Dangerous_NoExtract_example unintended consequences], even under [https://bbs.archlinux.org/viewtopic.php?id=250846 Xorg].}}<br />
<br />
The example below installs English (US) files, or none at all:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
NoExtract = usr/share/help/* !usr/share/help/en*<br />
NoExtract = usr/share/gtk-doc/html/*<br />
NoExtract = usr/share/locale/* usr/share/X11/locale/* usr/share/i18n/* opt/google/chrome/locales/* !usr/share/X11/locale/C/*<br />
NoExtract = !*locale*/en*/* !usr/share/i18n/charmaps/UTF-8.gz !usr/share/*locale*/locale.*<br />
NoExtract = !usr/share/*locales/en_?? !usr/share/*locales/i18n* !usr/share/*locales/iso*<br />
NoExtract = !usr/share/*locales/trans*<br />
NoExtract = usr/share/qt4/translations/*<br />
NoExtract = usr/share/man/* !usr/share/man/man*<br />
NoExtract = usr/share/vim/vim*/lang/*<br />
NoExtract = usr/lib/libreoffice/help/en-US/*<br />
}}<br />
<br />
== Performance ==<br />
<br />
=== Download speeds ===<br />
<br />
{{Note|If your download speeds have been reduced to a crawl, ensure you are using one of the many [[mirrors]] and not ftp.archlinux.org, which is [https://www.archlinux.org/news/302/ throttled since March 2007].}}<br />
<br />
When downloading packages ''pacman'' uses the mirrors in the order they are in {{ic|/etc/pacman.d/mirrorlist}}. The mirror which is at the top of the list by default however may not be the fastest for you. To select a faster mirror, see [[Mirrors]].<br />
<br />
''Pacman''<nowiki>'</nowiki>s speed in downloading packages can also be improved by using a different application to download packages, instead of ''pacman''<nowiki>'</nowiki>s built-in file downloader.<br />
<br />
In all cases, make sure you have the latest ''pacman'' before doing any modifications.<br />
<br />
# pacman -Syu<br />
<br />
==== Powerpill ====<br />
<br />
[[Powerpill]] is a ''pacman'' wrapper that uses parallel and segmented downloading to try to speed up downloads for ''pacman''.<br />
<br />
==== wget ====<br />
<br />
This is also very handy if you need more powerful proxy settings than ''pacman''<nowiki>'</nowiki>s built-in capabilities. <br />
<br />
To use {{ic|wget}}, first [[install]] the {{Pkg|wget}} package then modify {{ic|/etc/pacman.conf}} by uncommenting the following line in the {{ic|[options]}} section:<br />
<br />
XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u<br />
<br />
Instead of uncommenting the {{ic|wget}} parameters in {{ic|/etc/pacman.conf}}, you can also modify the {{ic|wget}} configuration file directly (the system-wide file is {{ic|/etc/wgetrc}}, per user files are {{ic|$HOME/.wgetrc}}.<br />
<br />
==== aria2 ====<br />
<br />
[[aria2]] is a lightweight download utility with support for resumable and segmented HTTP/HTTPS and FTP downloads. aria2 allows for multiple and simultaneous HTTP/HTTPS and FTP connections to an Arch mirror, which should result in an increase in download speeds for both file and package retrieval.<br />
<br />
{{Note|Using aria2c in ''pacman''<nowiki>'</nowiki>s XferCommand will '''not''' result in parallel downloads of multiple packages. ''Pacman'' invokes the XferCommand with a single package at a time and waits for it to complete before invoking the next. To download multiple packages in parallel, see [[Powerpill]].}}<br />
<br />
Install {{Pkg|aria2}}, then edit {{ic|/etc/pacman.conf}} by adding the following line to the {{ic|[options]}} section:<br />
<br />
XferCommand = /usr/bin/aria2c --allow-overwrite=true --continue=true --file-allocation=none --log-level=error --max-tries=2 --max-connection-per-server=2 --max-file-not-found=5 --min-split-size=5M --no-conf --remote-time=true --summary-interval=60 --timeout=5 --dir=/ --out %o %u<br />
<br />
{{Tip|1=[https://bbs.archlinux.org/viewtopic.php?pid=1491879#p1491879 This alternative configuration for using ''pacman'' with aria2] tries to simplify configuration and adds more configuration options.}}<br />
<br />
See [http://aria2.sourceforge.net/manual/en/html/aria2c.html#options OPTIONS] in {{man|1|aria2c}} for used aria2c options.<br />
<br />
* {{ic|-d, --dir}}: The directory to store the downloaded file(s) as specified by ''pacman''.<br />
* {{ic|-o, --out}}: The output file name(s) of the downloaded file(s). <br />
* {{ic|%o}}: Variable which represents the local filename(s) as specified by ''pacman''.<br />
* {{ic|%u}}: Variable which represents the download URL as specified by ''pacman''.<br />
<br />
==== Other applications ====<br />
<br />
There are other downloading applications that you can use with ''pacman''. Here they are, and their associated XferCommand settings:<br />
<br />
* {{ic|snarf}}: {{ic|1=XferCommand = /usr/bin/snarf -N %u}}<br />
* {{ic|lftp}}: {{ic|1=XferCommand = /usr/bin/lftp -c pget %u}}<br />
* {{ic|axel}}: {{ic|1=XferCommand = /usr/bin/axel -n 2 -v -a -o %o %u}}<br />
* {{ic|hget}}: {{ic|1=XferCommand = /usr/bin/hget %u -n 2 -skip-tls false}} (please read the [https://github.com/huydx/hget documentation on the Github project page] for more info)<br />
<br />
== Utilities ==<br />
<br />
* {{App|Lostfiles|Script that identifies files not owned by any package.|https://github.com/graysky2/lostfiles|{{Pkg|lostfiles}}}}<br />
* {{App|Pacmatic|''Pacman'' wrapper to check Arch News before upgrading, avoid partial upgrades, and warn about configuration file changes.|http://kmkeen.com/pacmatic|{{Pkg|pacmatic}}}}<br />
* {{App|pacutils|Helper library for libalpm based programs.|https://github.com/andrewgregory/pacutils|{{Pkg|pacutils}}}}<br />
* {{App|[[pkgfile]]|Tool that finds what package owns a file.|http://github.com/falconindy/pkgfile|{{Pkg|pkgfile}}}}<br />
* {{App|pkgtools|Collection of scripts for Arch Linux packages.|https://github.com/Daenyth/pkgtools|{{AUR|pkgtools}}}}<br />
* {{App|pkgtop|Interactive package manager and resource monitor designed for the GNU/Linux.|https://github.com/orhun/pkgtop|{{AUR|pkgtop-git}}}}<br />
* {{App|[[Powerpill]]|Uses parallel and segmented downloading through [[aria2]] and [[Reflector]] to try to speed up downloads for ''pacman''.|https://xyne.archlinux.ca/projects/powerpill/|{{AUR|powerpill}}}}<br />
* {{App|repoctl|Tool to help manage local repositories.|https://github.com/cassava/repoctl|{{AUR|repoctl}}}}<br />
* {{App|repose|An Arch Linux repository building tool.|https://github.com/vodik/repose|{{Pkg|repose}}}}<br />
* {{App|[[Snapper#Wrapping_pacman_transactions_in_snapshots|snap-pac]]|Make ''pacman'' automatically use snapper to create pre/post snapshots like openSUSE's YaST.|https://github.com/wesbarnett/snap-pac|{{pkg|snap-pac}}}}<br />
* {{App|vrms-arch|A virtual Richard M. Stallman to tell you which non-free packages are installed.|https://github.com/orospakr/vrms-arch|{{AUR|vrms-arch}}}}<br />
<br />
=== Graphical ===<br />
<br />
{{Warning|PackageKit opens up system permissions by default, and is otherwise not recommended for general usage. See {{Bug|50459}} and {{Bug|57943}}.}}<br />
<br />
* {{App|Apper|Qt 5 application and package manager using PackageKit written in C++. Supports [https://www.freedesktop.org/wiki/Distributions/AppStream/ AppStream metadata].|https://userbase.kde.org/Apper|{{Pkg|apper}}}}<br />
* {{App|Discover|Qt 5 application manager using PackageKit written in C++/QML. Supports [https://www.freedesktop.org/wiki/Distributions/AppStream/ AppStream metadata], [[Flatpak]] and [[fwupd|firmware updates]]. |https://userbase.kde.org/Discover|{{Pkg|discover}}}}<br />
* {{App|GNOME PackageKit|GTK 3 package manager using PackageKit written in C.|https://freedesktop.org/software/PackageKit/|{{Pkg|gnome-packagekit}}}}<br />
* {{App|GNOME Software|GTK 3 application manager using PackageKit written in C. Supports [https://www.freedesktop.org/wiki/Distributions/AppStream/ AppStream metadata], [[Flatpak]] and [[fwupd|firmware updates]]. |https://wiki.gnome.org/Apps/Software|{{pkg|gnome-software}}}}<br />
* {{App|pcurses|Curses TUI pacman wrapper written in C++.|https://github.com/schuay/pcurses|{{Pkg|pcurses}}}}<br />
* {{App|tkPacman|Tk pacman wrapper written in Tcl.|https://sourceforge.net/projects/tkpacman|{{AUR|tkpacman}}}}</div>Pdchttps://wiki.archlinux.org/index.php?title=Unified_Extensible_Firmware_Interface&diff=601137Unified Extensible Firmware Interface2020-03-11T16:44:28Z<p>Pdc: /* Windows changes boot order */ UEFI BIOS does not exist</p>
<hr />
<div>[[Category:Boot process]]<br />
[[es:Unified Extensible Firmware Interface]]<br />
[[it:Unified Extensible Firmware Interface]]<br />
[[ja:Unified Extensible Firmware Interface]]<br />
[[ru:Unified Extensible Firmware Interface]]<br />
[[zh-hans:Unified Extensible Firmware Interface]]<br />
{{Related articles start}}<br />
{{Related|EFI system partition}}<br />
{{Related|Arch boot process}}<br />
{{Related|GUID Partition Table}}<br />
{{Related|Secure Boot}}<br />
{{Related articles end}}<br />
{{Warning|While the choice to install in UEFI mode is forward looking, early vendor UEFI implementations ''may'' carry more bugs than their BIOS counterparts. It is advised to do a search relating to your particular motherboard model before proceeding.}}<br />
<br />
The [https://www.uefi.org/ Unified Extensible Firmware Interface] (UEFI or EFI for short) is a new model for the interface between operating systems and firmware. It provides a standard environment for booting an operating system and running pre-boot applications.<br />
<br />
It is distinct from the commonly used "[[Partitioning#Master Boot Record (bootstrap code)|MBR boot code]]" method followed for [[Wikipedia:BIOS|BIOS]] systems. See [[Arch boot process]] for their differences and the boot process using UEFI. To set up UEFI boot loaders, see [[Arch boot process#Boot loader]].<br />
<br />
== UEFI versions ==<br />
<br />
* UEFI started as Intel's EFI in versions 1.x.<br />
* Later, a group of companies called the UEFI Forum took over its development, which renamed it as Unified EFI starting with version 2.0.<br />
* Unless specified as EFI 1.x, EFI and UEFI terms are used interchangeably to denote UEFI 2.x firmware.<br />
* Apple's EFI implementation is neither a EFI 1.x version nor UEFI 2.x version but mixes up both. This kind of firmware does not fall under any one (U)EFI specification and therefore is not a standard UEFI firmware. Unless stated explicitly, these instructions are general and some of them may not work or may be different in [[MacBook|Apple Macs]].<br />
<br />
The latest UEFI specification can be found at https://uefi.org/specifications.<br />
<br />
== UEFI firmware bitness ==<br />
<br />
Under UEFI, every program whether it is an OS loader or a utility (e.g. a memory testing app or recovery tool), should be a EFI application corresponding to the UEFI firmware bitness/architecture.<br />
<br />
The vast majority of UEFI firmwares, including recent Apple Macs, use x86_64 UEFI firmware. The only known devices that use IA32 (32-bit) UEFI are older (pre 2008) Apple Macs, Intel Atom System-on-Chip systems (as on 2 November 2013)[https://software.intel.com/en-us/blogs/2015/07/22/why-cheap-systems-run-32-bit-uefi-on-x64-systems] and some older Intel server boards that are known to operate on Intel EFI 1.10 firmware.<br />
<br />
An x86_64 UEFI firmware does not include support for launching 32-bit EFI applications (unlike x86_64 Linux and Windows versions which include such support). Therefore the EFI application must be compiled for that specific firmware processor bitness/architecture.<br />
<br />
{{Note|The official ISO does not support booting on 32-bit (IA32) UEFI systems, see [[#Booting 64-bit kernel on 32-bit UEFI]] for available workarounds. The installed system will require using a boot loader that supports IA32 UEFI, for example, [[GRUB]] with the {{ic|i386-efi}} target.}}<br />
<br />
=== Checking the firmware bitness ===<br />
<br />
The firmware bitness can be checked from a booted operating system.<br />
<br />
==== From Linux ====<br />
<br />
On distributions running Linux kernel 4.0 or newer, the UEFI firmware bitness can be found via the sysfs interface. Run:<br />
<br />
$ cat /sys/firmware/efi/fw_platform_size<br />
<br />
It will return {{ic|64}} for a 64-bit (x86_64) UEFI or {{ic|32}} for a 32-bit (IA32) UEFI. If the file does not exist, then you have not booted in UEFI mode.<br />
<br />
==== From macOS ====<br />
<br />
Pre-2008 [[Mac]]s mostly have IA32 EFI firmware while >=2008 Macs have mostly x86_64 EFI. All Macs capable of running Mac OS X Snow Leopard 64-bit Kernel have x86_64 EFI 1.x firmware.<br />
<br />
To find out the arch of the EFI firmware in a Mac, type the following into the Mac OS X terminal:<br />
<br />
$ ioreg -l -p IODeviceTree | grep firmware-abi<br />
<br />
If the command returns {{ic|EFI32}} then it is IA32 (32-bit) EFI firmware. If it returns {{ic|EFI64}} then it is x86_64 EFI firmware. Most of the Macs do not have UEFI 2.x firmware as Apple's EFI implementation is not fully compliant with UEFI 2.x specification.<br />
<br />
==== From Microsoft Windows ====<br />
<br />
64-bit versions of Windows do not support booting on a 32-bit UEFI. So, if you have a 32-bit version of Windows booted in UEFI mode, you have a 32-bit UEFI.<br />
<br />
To check the bitness run {{ic|msinfo32.exe}}. In the ''System Summary'' section look at the values of "System Type" and "BIOS mode".<br />
<br />
For a 64-bit Windows on a 64-bit UEFI it will be {{ic|System Type: x64-based PC}} and {{ic|BIOS mode: UEFI}}, for a 32-bit Windows on a 32-bit UEFI - {{ic|System Type: x86-based PC}} and {{ic|BIOS mode: UEFI}}. If the "BIOS mode" is not {{ic|UEFI}}, then Windows is not booted in UEFI mode.<br />
<br />
== Linux kernel config options for UEFI ==<br />
<br />
The required Linux Kernel configuration options[https://www.kernel.org/doc/Documentation/x86/x86_64/uefi.txt] for UEFI systems are:<br />
<br />
CONFIG_RELOCATABLE=y<br />
CONFIG_EFI=y<br />
CONFIG_EFI_STUB=y<br />
CONFIG_X86_SYSFB=y<br />
CONFIG_FB_SIMPLE=y<br />
CONFIG_FRAMEBUFFER_CONSOLE=y<br />
<br />
UEFI Runtime Variables Support ('''efivarfs''' filesystem - {{ic|/sys/firmware/efi/efivars}}). This option is important as this is required to manipulate UEFI runtime variables using tools like {{ic|/usr/bin/efibootmgr}}. The below config option has been added in kernel 3.10 and above.<br />
<br />
CONFIG_EFIVAR_FS=y<br />
<br />
UEFI Runtime Variables Support (old '''efivars sysfs''' interface - {{ic|/sys/firmware/efi/vars}}). This option should be disabled to prevent any potential issues with both efivarfs and sysfs-efivars enabled.<br />
<br />
CONFIG_EFI_VARS=n<br />
<br />
[[GUID Partition Table]] (GPT) config option - mandatory for UEFI support<br />
<br />
CONFIG_EFI_PARTITION=y<br />
<br />
EFI mixed-mode support - to boot a x64_64 kernel on a IA32 UEFI.<br />
<br />
CONFIG_EFI_MIXED=y<br />
<br />
{{Note|All of the above options are enabled in Arch Linux [[kernels]] in the official repositories.}}<br />
<br />
== UEFI variables ==<br />
<br />
UEFI defines variables through which an operating system can interact with the firmware. UEFI boot variables are used by the boot loader and used by the OS only for early system start-up. UEFI runtime variables allow an OS to manage certain settings of the firmware like the UEFI boot manager or managing the keys for UEFI Secure Boot protocol etc. You can get the list using:<br />
<br />
$ efivar --list<br />
<br />
=== UEFI variables support in Linux kernel ===<br />
<br />
Linux kernel exposes UEFI variables data to userspace via '''efivarfs''' ('''EFI''' '''VAR'''iable '''F'''ile'''S'''ystem) interface ({{ic|CONFIG_EFIVAR_FS}}) - mounted using {{ic|efivarfs}} kernel module at {{ic|/sys/firmware/efi/efivars}} - it has no maximum per-variable size limitation and supports UEFI Secure Boot variables. Introduced in kernel 3.8.<br />
<br />
=== Requirements for UEFI variable support ===<br />
<br />
# Kernel should be booted in UEFI mode via [[EFISTUB]] (optionally using a [[boot manager]]) or by a UEFI [[boot loader]] (using either the EFI handover protocol or the UEFI LoadImage function), not via BIOS or CSM, or Apple's Boot Camp which is also a CSM.<br />
# EFI Runtime Services support should be present in the kernel ({{ic|1=CONFIG_EFI=y}}, check if present with {{ic|zgrep CONFIG_EFI /proc/config.gz}}).<br />
# EFI Runtime Services in the kernel SHOULD NOT be disabled via kernel cmdline, i.e. {{ic|noefi}} kernel parameter SHOULD NOT be used.<br />
# {{ic|efivarfs}} filesystem should be mounted at {{ic|/sys/firmware/efi/efivars}}, otherwise follow [[#Mount efivarfs]] section below.<br />
# {{ic|efivar}} should list (option {{ic|-l}}/{{ic|--list}}) the UEFI variables without any error.<br />
<br />
If UEFI Variables support does not work even after the above conditions are satisfied, try the below workarounds:<br />
<br />
# If listing of the UEFI variables ({{ic|efivar -l}}) leads to {{ic|efivar: error listing variables: Function not implemented}} and the system is booted into a [[realtime kernel]], add {{ic|1=efi=runtime}} to the [[kernel parameters]] and reboot (efivarfs functionality is disabled by default on those kernels).<br />
# If any userspace tool is unable to modify UEFI variable data, check for existence of {{ic|/sys/firmware/efi/efivars/dump-*}} files. If they exist, delete them, reboot and retry again.<br />
# If the above step does not fix the issue, try booting with {{ic|efi_no_storage_paranoia}} kernel parameter to disable kernel UEFI variable storage space check that may prevent writing/modification of UEFI variables.<br />
<br />
{{Warning|{{ic|efi_no_storage_paranoia}} should only be used when needed and should not be left as a normal boot option. The effect of this kernel command line parameter turns off a safeguard that was put in place to help avoid the bricking of machines when the NVRAM gets too full. See {{Bug|34641}} for more information.}}<br />
<br />
==== Mount efivarfs ====<br />
<br />
If {{ic|efivarfs}} is not automatically mounted at {{ic|/sys/firmware/efi/efivars}} by [[systemd]] during boot, then you need to manually mount it to expose UEFI variables to [[#Userspace tools|userspace tools]] like ''efibootmgr'':<br />
<br />
# mount -t efivarfs efivarfs /sys/firmware/efi/efivars<br />
<br />
{{Note|The above command should be run both '''outside''' ('''before''') and '''inside''' the [[chroot]], if any.}}<br />
<br />
See [https://www.kernel.org/doc/Documentation/filesystems/efivarfs.txt efivarfs.txt] for kernel documentation.<br />
<br />
=== Userspace tools ===<br />
<br />
There are few tools that can access/modify the UEFI variables, namely<br />
<br />
* {{App|efivar|Library and Tool to manipulate UEFI variables (used by efibootmgr)|https://github.com/rhboot/efivar|{{Pkg|efivar}}, {{AUR|efivar-git}}}}<br />
* {{App|efibootmgr|Tool to manipulate UEFI Firmware Boot Manager Settings|https://github.com/rhboot/efibootmgr|{{Pkg|efibootmgr}}}}<br />
* {{App|uefivars|Dumps list of UEFI variables with some additional PCI related info (uses efibootmgr code internally)|https://github.com/fpmurphy/Various/tree/master/uefivars-2.0|{{AUR|uefivars-git}}}}<br />
* {{App|efitools|Tools for manipulating UEFI secure boot platforms|https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git|{{Pkg|efitools}}}}<br />
* {{App|Ubuntu's Firmware Test Suite|Test suite that performs sanity checks on Intel/AMD PC firmware|https://wiki.ubuntu.com/FirmwareTestSuite/|{{AUR|fwts-git}}}}<br />
<br />
==== efibootmgr ====<br />
<br />
You will have to [[install]] the {{Pkg|efibootmgr}} package.<br />
<br />
{{Note|<br />
* If ''efibootmgr'' does not work on your system, you can reboot into [[#UEFI Shell]] and use {{ic|bcfg}} to create a boot entry for the bootloader.<br />
* If you are unable to use {{ic|efibootmgr}}, some UEFI firmwares allow users to directly manage UEFI boot entries from within its boot-time interface. For example, some firmwares have an "Add New Boot Option" choice which enables you to select a local EFI system partition and manually enter the EFI application location e.g. {{ic|\EFI\refind\refind_x64.efi}}.<br />
* The below commands use [[rEFInd]] boot manager as example.<br />
}}<br />
<br />
To add a new boot option using ''efibootmgr'' you need to know three things:<br />
<br />
# The disk containing the [[EFI system partition]] (ESP). E.g.: {{ic|/dev/sda}}, {{ic|/dev/nvme0n1}}.<br />
# The partition number of the ESP on that disk. The {{ic|''Y''}} in {{ic|/dev/sda''Y''}} or {{ic|/dev/nvme0n1p''Y''}}.<br />
# The path to the EFI application (relative to the root of the ESP)<br />
<br />
For example, if you want to add a boot option for {{ic|/efi/EFI/refind/refind_x64.efi}} where {{ic|/efi}} is the mount point of the ESP, run<br />
<br />
{{hc|$ findmnt /efi|2=<br />
TARGET SOURCE FSTYPE OPTIONS<br />
/efi /dev/sda1 vfat rw,flush,tz=UTC<br />
}}<br />
<br />
In this example, this indicates that the ESP is on disk {{ic|/dev/sda}} and has partition number 1. The path to the EFI application relative to the root of the ESP is {{ic|/EFI/refind/refind_x64.efi}}. So you would create the boot entry as follows:<br />
<br />
# efibootmgr --create --disk /dev/sda --part 1 --loader /EFI/refind/refind_x64.efi --label "rEFInd Boot Manager" --verbose<br />
<br />
{{Accuracy|{{ic|/dev/nvme0n1p1}} is a partition not a disk, the partition number should be specified using the {{ic|--part}} option.}}<br />
<br />
# efibootmgr --create --disk /dev/nvme0n1p1 --loader /EFI/refind/refind_x64.efi --label "rEFINd Boot Manager" --verbose<br />
<br />
See {{man|8|efibootmgr}} or [https://raw.githubusercontent.com/rhinstaller/efibootmgr/master/README efibootmgr README] for more info.<br />
<br />
{{Note|UEFI uses backward slash {{ic|\}} as path separator but ''efibootmgr'' automatically converts UNIX-style {{ic|/}} path separators.}}<br />
<br />
== UEFI Shell ==<br />
<br />
The UEFI Shell is a shell/terminal for the firmware which allows launching EFI applications which include UEFI bootloaders. Apart from that, the shell can also be used to obtain various other information about the system or the firmware like memory map (memmap), modifying boot manager variables (bcfg), running partitioning programs (diskpart), loading UEFI drivers, editing text files (edit), hexedit etc.<br />
<br />
=== Obtaining UEFI Shell ===<br />
<br />
You can download a BSD licensed UEFI Shell from Intel's TianoCore UDK/EDK2 project:<br />
<br />
* [[AUR]] package {{AUR|uefi-shell-git}} (recommended) - provides x86_64 Shell for x86_64 (64-bit) UEFI and IA32 Shell for IA32 (32-bit) UEFI - compiled directly from latest TianoCore EDK2 source.<br />
* There are copies of Shell v1 and Shell v2 in the EFI directory on the Arch install media image.<br />
* [https://github.com/tianocore/edk2/releases/latest/download/ShellBinPkg.zip Precompiled UEFI Shell v2 binaries] (the binary package was moved from its original location in the source tree to the GitHub release assets, as laid out [https://lists.01.org/pipermail/edk2-devel/2019-April/thread.html#38524 here]).<br />
* [https://github.com/tianocore/edk2/tree/UDK2018/EdkShellBinPkg Precompiled UEFI Shell v1 binaries] (not updated anymore upstream as of Jan 10, 2014).<br />
* [https://drive.google.com/uc?export=download&id=1OBXYj6MEs7VAZbYnjD9FxOYcZYIQoq36 Precompiled UEFI Shell v2 binary with bcfg modified to work with UEFI pre-2.3 firmware] - from Clover EFI bootloader.<br />
<br />
Shell v2 works best in UEFI 2.3+ systems and is recommended over Shell v1 in those systems. Shell v1 should work in all UEFI systems irrespective of the spec. version the firmware follows. More info at [https://github.com/tianocore/tianocore.github.io/wiki/ShellPkg ShellPkg] and [https://edk2-devel.narkive.com/zCN4CEnb/inclusion-of-uefi-shell-in-linux-distro-iso this mail].<br />
<br />
=== Launching UEFI Shell ===<br />
<br />
Few Asus and other AMI Aptio x86_64 UEFI firmware based motherboards (from Sandy Bridge onwards) provide an option called {{ic|"Launch EFI Shell from filesystem device"}} . For those motherboards, download the x86_64 UEFI Shell and copy it to your EFI system partition as {{ic|<EFI_SYSTEM_PARTITION>/shellx64.efi}}.<br />
<br />
Systems with Phoenix SecureCore Tiano UEFI firmware are known to have embedded UEFI Shell which can be launched using either {{ic|F6}}, {{ic|F11}} or {{ic|F12}} key.<br />
<br />
{{Note|If you are unable to launch UEFI Shell from the firmware directly using any of the above mentioned methods, create a [[FAT32]] USB pen drive with {{ic|Shell.efi}} copied as {{ic|(USB)/EFI/BOOT/BOOTx64.EFI}}. This USB should come up in the firmware boot menu. Launching this option will launch the UEFI Shell for you.}}<br />
<br />
=== Important UEFI Shell commands ===<br />
<br />
UEFI Shell commands usually support {{ic|-b}} option which makes output pause after each page. Run {{ic|help -b}} to list available internal commands. Available commands are either built into the shell or discrete EFI applications.<br />
<br />
For more info see [https://software.intel.com/en-us/articles/efi-shells-and-scripting/ Intel Scripting Guide 2008] and [https://software.intel.com/en-us/articles/uefi-shell Intel "Course" 2011].<br />
<br />
==== bcfg ====<br />
<br />
{{ic|bcfg}} modifies the UEFI NVRAM entries which allows the user to change the boot entries or driver options. This command is described in detail in page 96 (Section 5.3) of the [https://uefi.org/sites/default/files/resources/UEFI_Shell_2_2.pdf UEFI Shell Specification 2.2] document.<br />
<br />
{{Note|<br />
* Try {{ic|bcfg}} only if {{ic|efibootmgr}} fails to create working boot entries on your system.<br />
* UEFI Shell v1 official binary does not support {{ic|bcfg}} command. See [[#Obtaining UEFI Shell]] for a modified UEFI Shell v2 binary which may work in UEFI pre-2.3 firmwares.<br />
}}<br />
<br />
To dump a list of current boot entries:<br />
<br />
Shell> bcfg boot dump -v<br />
<br />
To add a boot menu entry for rEFInd (for example) as 4th (numbering starts from zero) option in the boot menu:<br />
<br />
Shell> bcfg boot add 3 FS0:\EFI\refind\refind_x64.efi "rEFInd Boot Manager"<br />
<br />
where {{ic|FS0:}} is the mapping corresponding to the EFI system partition and {{ic|FS0:\EFI\refind\refind_x64.efi}} is the file to be launched.<br />
<br />
To add an entry to boot directly into your system without a bootloader, configure a boot option using your kernel as an [[EFISTUB#UEFI_Shell|EFISTUB]]:<br />
<br />
Shell> bcfg boot add '''N''' fs'''V''':\vmlinuz-linux "Arch Linux"<br />
Shell> bcfg boot -opt '''N''' "root='''/dev/sdX#''' initrd=\initramfs-linux.img"<br />
<br />
where {{ic|N}} is the priority, {{ic|V}} is the volume number of your EFI system partition, and {{ic|/dev/sdX#}} is your root partition.<br />
<br />
To remove the 4th boot option:<br />
<br />
Shell> bcfg boot rm 3<br />
<br />
To move the boot option #3 to #0 (i.e. 1st or the default entry in the UEFI Boot menu):<br />
<br />
Shell> bcfg boot mv 3 0<br />
<br />
For bcfg help text:<br />
<br />
Shell> help bcfg -v -b<br />
<br />
or:<br />
<br />
Shell> bcfg -? -v -b<br />
<br />
==== map ====<br />
<br />
{{ic|map}} displays a list of device mappings i.e. the names of available file systems ({{ic|FS0}}) and storage devices ({{ic|blk0}}).<br />
<br />
Before running file system commands such as {{ic|cd}} or {{ic|ls}}, you need to change the shell to the appropriate file system by typing its name:<br />
<br />
Shell> FS0:<br />
FS0:\> cd EFI/<br />
<br />
==== edit ====<br />
<br />
{{ic|edit}} provides a basic text editor with an interface similar to nano, but slightly less functional. It handles UTF-8 encoding and takes care or LF vs CRLF line endings.<br />
<br />
For example, to edit rEFInd's {{ic|refind.conf}} in the EFI system partition ({{ic|FS0:}} in the firmware),<br />
<br />
Shell> edit FS0:\EFI\refind\refind.conf<br />
<br />
Type {{ic|Ctrl-E}} for help.<br />
<br />
== UEFI drivers ==<br />
<br />
{{Expansion|Explain what are and how to use UEFI drivers.}}<br />
<br />
== UEFI bootable media ==<br />
<br />
=== Create UEFI bootable USB from ISO ===<br />
<br />
Follow [[USB flash installation media#BIOS and UEFI bootable USB]].<br />
<br />
=== Remove UEFI boot support from optical media ===<br />
<br />
{{Note|<br />
* This section mentions removing UEFI boot support from a '''CD/DVD only''' (Optical Media booting via EL Torito), not from a USB flash drive.<br />
* In order to hide the UEFI equipment on USB stick, use a partition editor after having copied the ISO to the flash drive. Remove the partition of type {{ic|EF}}. '''Do not''' accept offers to convert to GPT.<br />
}}<br />
<br />
Most of the 32-bit EFI Macs and some 64-bit EFI Macs refuse to boot from a UEFI(X64)+BIOS bootable CD/DVD. If one wishes to proceed with the installation using optical media, it might be necessary to remove UEFI support first.<br />
<br />
* Mount the official installation media and obtain the {{ic|archisolabel}} as shown in the previous section.<br />
<br />
# mount -o loop ''input.iso'' /mnt/iso<br />
<br />
* Then rebuild the ISO, excluding the UEFI optical media booting support, using {{ic|xorriso}} from {{pkg|libisoburn}}. Be sure to set the correct archisolabel, e.g. "ARCH_201411" or similar:<br />
<br />
{{bc|1=<br />
$ xorriso -as mkisofs -iso-level 3 \<br />
-full-iso9660-filenames\<br />
-volid "''archisolabel''" \<br />
-appid "Arch Linux CD" \<br />
-publisher "Arch Linux <https://www.archlinux.org>" \<br />
-preparer "prepared by $USER" \<br />
-eltorito-boot isolinux/isolinux.bin \<br />
-eltorito-catalog isolinux/boot.cat \<br />
-no-emul-boot -boot-load-size 4 -boot-info-table \<br />
-isohybrid-mbr "/mnt/iso/isolinux/isohdpfx.bin" \<br />
-output ''output.iso'' /mnt/iso/<br />
}}<br />
<br />
* Burn {{ic|''output.iso''}} to optical media and proceed with installation normally.<br />
<br />
=== Booting 64-bit kernel on 32-bit UEFI ===<br />
<br />
Official ISO ([[Archiso]]) does not support booting on 32-bit (IA32) UEFI systems ({{Bug|53182}}) since it uses EFISTUB (via [[systemd-boot]] boot manager for menu) for booting the kernel in UEFI mode. To boot a 64-bit kernel with 32-bit UEFI you have to use a boot loader that does not rely on EFI boot stub for launching kernels.<br />
<br />
{{Tip|[[Archboot]] iso supports booting on 32-bit (IA32) UEFI systems.}}<br />
<br />
==== Using GRUB ====<br />
<br />
This section describes how to setup [[GRUB]] as the USB's UEFI bootloader.<br />
<br />
* [[USB flash installation media#Using_manual_formatting|Create an editable USB Flash Installation]]. Since we are going to use GRUB, you only need to follow the steps up until the {{ic|syslinux}} part<br />
<br />
* [[GRUB/Tips and tricks#GRUB standalone|Create a GRUB standalone image]] for 32-bit UEFI systems:<br />
<br />
# echo 'configfile ${cmdpath}/grub.cfg' > /tmp/grub.cfg<br />
# grub-mkstandalone -d /usr/lib/grub/i386-efi -O i386-efi --modules="part_gpt part_msdos" --locales="en@quot" --themes="" -o "''/mnt/usb/''EFI/boot/bootia32.efi" "boot/grub/grub.cfg=/tmp/grub.cfg" -v<br />
<br />
* Create {{ic|''/mnt/usb''/EFI/boot/grub.cfg}} with the following contents (replace {{ic|ARCH_YYYYMM}} with the required archiso label e.g. {{ic|ARCH_201507}}):<br />
<br />
{{Tip|<br />
* The archiso label can be aquired from the ''.iso'' file with {{ic|isoinfo}} from {{Pkg|cdrtools}} or {{ic|iso-info}} from {{Pkg|libcdio}}.<br />
* The given configuration entries can also be entered inside a [[GRUB#Using_the_command_shell|GRUB command-shell]].<br />
}}<br />
<br />
For the official ISO:<br />
<br />
{{hc|''/mnt/usb''/EFI/boot/grub.cfg|2=<br />
insmod part_gpt<br />
insmod part_msdos<br />
insmod fat<br />
<br />
insmod efi_gop<br />
insmod efi_uga<br />
insmod video_bochs<br />
insmod video_cirrus<br />
<br />
insmod font<br />
<br />
if loadfont "${prefix}/fonts/unicode.pf2" ; then<br />
insmod gfxterm<br />
set gfxmode="1024x768x32;auto"<br />
terminal_input console<br />
terminal_output gfxterm<br />
fi<br />
<br />
menuentry "Arch Linux archiso x86_64 UEFI USB" {<br />
set gfxpayload=keep<br />
search --no-floppy --set=root --label ''ARCH_YYYYMM''<br />
linux /arch/boot/x86_64/vmlinuz archisobasedir=arch archisolabel=''ARCH_YYYYMM'' add_efi_memmap<br />
initrd /arch/boot/intel_ucode.img /arch/boot/x86_64/archiso.img<br />
}<br />
}}<br />
<br />
Durring installation, in the [[Installation guide#Boot loader|boot loader installation step]], [[GRUB#Installation_2|install GRUB]] using the option {{ic|1=--target=i386-efi}}.<br />
<br />
== Testing UEFI in systems without native support ==<br />
<br />
=== OVMF for virtual machines ===<br />
<br />
[https://tianocore.github.io/ovmf/ OVMF] is a TianoCore project to enable UEFI support for Virtual Machines. OVMF contains a sample UEFI firmware and a separate non-volatile variable store for QEMU.<br />
<br />
You can install {{pkg|ovmf}} from the extra repository.<br />
<br />
It is [https://www.linux-kvm.org/downloads/lersek/ovmf-whitepaper-c770f8c.txt advised] to make a local copy of the non-volatile variable store for your virtual machine:<br />
<br />
$ cp /usr/share/ovmf/x64/OVMF_VARS.fd my_uefi_vars.bin<br />
<br />
To use the OVMF firmware and this variable store, add following to your QEMU command:<br />
<br />
-drive if=pflash,format=raw,readonly,file=/usr/share/ovmf/x64/OVMF_CODE.fd \<br />
-drive if=pflash,format=raw,file=my_uefi_vars.bin<br />
<br />
For example:<br />
<br />
$ qemu-system-x86_64 -enable-kvm -m 1G -drive if=pflash,format=raw,readonly,file=/usr/share/ovmf/x64/OVMF_CODE.fd -drive if=pflash,format=raw,file=my_uefi_vars.bin …<br />
<br />
=== DUET for BIOS only systems ===<br />
<br />
DUET was a TianoCore project that enabled chainloading a full UEFI environment from a BIOS system, in a way similar to BIOS OS booting. This method is being discussed extensively in https://www.insanelymac.com/forum/topic/186440-linux-and-windows-uefi-boot-using-tianocore-duet-firmware/. Pre-build DUET images can be downloaded from one of the repos at https://gitlab.com/tianocore_uefi_duet_builds/tianocore_uefi_duet_installer. Specific instructions for setting up DUET is available at https://gitlab.com/tianocore_uefi_duet_builds/tianocore_uefi_duet_installer/blob/master/Migle_BootDuet_INSTALL.txt . However, as of November 2018, the DUET code has been removed from TianoCore git repository.<br />
<br />
You can also try https://sourceforge.net/projects/cloverefiboot/ which provides modified DUET images that may contain some system specific fixes and is more frequently updated compared to the gitlab repos.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Windows 7 will not boot in UEFI mode ===<br />
<br />
{{Note|Windows 7 can boot in pure UEFI class 3 without CSM support, though installation requires CSM ([https://support.microsoft.com/en-us/kb/2828074 specifically INT 10 H]).}}<br />
<br />
If you have installed Windows to a different hard disk with GPT partitioning and still have a MBR partitioned hard disk in your computer, then it is possible that the firmware (UEFI) is starting its CSM support (for booting MBR partitions) and therefore Windows will not boot. To solve this merge your MBR hard disk to GPT partitioning or disable the SATA port where the MBR hard disk is plugged in or unplug the SATA connector from this hard disk.<br />
<br />
Mainboards with this kind of problem:<br />
<br />
* Gigabyte Z77X-UD3H rev. 1.1 (UEFI version F19e)<br />
** The firmware option for booting "UEFI Only" does not prevent the firmware from starting CSM.<br />
<br />
=== Windows changes boot order ===<br />
<br />
If you [[dual boot with Windows]] and your motherboard just boots Windows immediately instead of your chosen EFI application, there are several possible causes and workarounds.<br />
<br />
* Ensure [[Dual boot with Windows#Fast Startup and hibernation|Fast Startup]] is disabled in your Windows power options<br />
* Ensure [[Secure Boot]] is disabled in your firmware (if you are not using a signed boot loader)<br />
* Ensure your UEFI boot order does not have Windows Boot Manager set first e.g. using [[#efibootmgr]] and what you see in the configuration tool of the UEFI. Some motherboards override by default any settings set with efibootmgr by Windows if it detects it. This is confirmed in a Packard Bell laptop.<br />
* If your motherboard is booting the default boot path ({{ic|\EFI\BOOT\BOOTX64.EFI}}), this file may have been overwritten with the Windows boot loader. Try setting the correct boot path e.g. using [[#efibootmgr]].<br />
* If the previous steps do not work, you can tell the Windows boot loader to run a different EFI application. From a Windows Administrator command prompt: {{bc|# bcdedit /set "{bootmgr}" path "\EFI\''path''\''to''\''app.efi''"}}<br />
* Alternatively, you can set a startup script in Windows that ensures that the boot order is set correctly every time you boot Windows.<br />
*# Open a command prompt with admin privlages. Run {{ic|bcdedit /enum firmware}} and find your desired boot entry.<br />
*# Copy the Identifier, including the brackets, e.g. {{ic|<nowiki>{31d0d5f4-22ad-11e5-b30b-806e6f6e6963}</nowiki>}}<br />
*# Create a batch file with the command {{ic|bcdedit /set "{fwbootmgr}" DEFAULT "{''copied boot identifier''}"}}<br />
*# Open ''gpedit.msc'' and under ''Local Computer Policy > Computer Configuration > Windows Settings > Scripts(Startup/Shutdown)'', choose ''Startup''<br />
*# Under the ''Scripts'' tab, choose the ''Add'' button, and select your batch file<br />
<br />
=== USB media gets struck with black screen ===<br />
<br />
This issue can occur due to [[KMS]] issue. Try [[Kernel mode setting#Disabling_modesetting|Disabling KMS]] while booting the USB.<br />
<br />
=== UEFI boot loader does not show up in firmware menu ===<br />
<br />
On certain UEFI motherboards like some boards with an Intel Z77 chipset, adding entries with {{ic|efibootmgr}} or {{ic|bcfg}} from the UEFI Shell will not work because they do not show up on the boot menu list after being added to NVRAM.<br />
<br />
This issue is caused because the motherboards can only load Microsoft Windows. To solve this you have to place the ''.efi'' file in the location that Windows uses.<br />
<br />
Copy the {{ic|bootx64.efi}} file from the Arch Linux installation medium ({{ic|FSO:}}) to the Microsoft directory your [[ESP]] partition on your hard drive ({{ic|FS1:}}). Do this by booting into EFI shell and typing:<br />
<br />
Shell> mkdir FS1:\EFI\Microsoft<br />
Shell> mkdir FS1:\EFI\Microsoft\Boot<br />
Shell> cp FS0:\EFI\BOOT\bootx64.efi FS1:\EFI\Microsoft\Boot\bootmgfw.efi<br />
<br />
After reboot, any entries added to NVRAM should show up in the boot menu.<br />
<br />
=== System boots to EFI shell after hardware change or starting other operating system ===<br />
<br />
{{Style|Too GRUB-specific, most boot loader install commands have an option to install to the default/fallback boot path. Duplicates [[#Windows changes boot order]] and [[GRUB#Default/fallback boot path]].}}<br />
<br />
EFI stores state on the motherboard, called EFIVARS. Your bootloader (e.g. GRUB) may need to set up these variables in a certain way in order to boot. If your hardware configuration changes, or you boot into another operating system which overwrites these variables (Windows), you may be dumped into the EFI shell upon attempting to boot Arch Linux since the EFIVARS are incorrect and EFI can no longer find your bootloader.<br />
<br />
At this point, you can use the EFI shell to find and boot your bootloader manually. Usually something like:<br />
<br />
Shell> ls fs0:<br />
EFI\<br />
grub\<br />
<br />
Shell> ls fs0:EFI\<br />
GRUB\<br />
<br />
Shell> ls fs0:EFI\GRUB\<br />
grubx64.efi<br />
<br />
Shell> fs0:EFI\GRUB\grubx64.efi<br />
Starting fs0:EFI\GRUB\grubx64.efi...<br />
<br />
To prevent this happening again, you can install your bootloader to the default EFI boot location. In this setup, EFI will always find your bootloader on this drive since it is in the default location, which doesn't depend on the EFIVARS being correct. Your system should continue to boot even if another OS has changed the EFIVARS, or your hardware configuration has made the EFIVARS no longer correct for your system.<br />
<br />
To do this with GRUB's {{ic|grub-install}}, use the {{ic|--removable}} flag. For example (update {{ic|/boot/}} to be the path to your EFI partition):<br />
<br />
# grub-install --target=x86_64-efi --efi-directory=/boot/ --bootloader-id=GRUB --removable<br />
<br />
=== Boot entries created with efibootmgr fail to show up in UEFI ===<br />
<br />
''efibootmgr'' can fail to detect EDD 3.0 and as a result create unusable boot entries in NVRAM. See [https://github.com/rhboot/efibootmgr/issues/86 efibootmgr issue 86] for the details.<br />
<br />
To work around this, when creating boot entries manually, add the {{ic|-e 3}} option to the ''efibootmgr'' command. E.g.<br />
<br />
# efibootmgr --create --disk /dev/sda --part 1 --loader /EFI/refind/refind_x64.efi --label "rEFInd Boot Manager" --verbose '''-e 3'''<br />
<br />
To fix boot loader installers, like {{ic|grub-install}} and {{ic|refind-install}}, create a wrapper script {{ic|/usr/local/bin/efibootmgr}} and make it [[executable]]:<br />
<br />
{{hc|/usr/local/bin/efibootmgr|<br />
#!/bin/sh<br />
<br />
exec /usr/bin/efibootmgr -e 3 "$@"<br />
}}<br />
<br />
== See also ==<br />
<br />
* [[Wikipedia:UEFI]]<br />
* [https://www.uefi.org/home/ UEFI Forum] - contains the official [https://uefi.org/specifications UEFI Specifications] - GUID Partition Table is part of UEFI Specification<br />
* [https://www.happyassassin.net/2014/01/25/uefi-boot-how-does-that-actually-work-then/ UEFI boot: how does that actually work, then? - A blog post by AdamW]<br />
* [https://www.kernel.org/doc/Documentation/x86/x86_64/uefi.txt Linux Kernel x86_64 UEFI Documentation]<br />
* [https://www.intel.com/content/www/us/en/architecture-and-technology/unified-extensible-firmware-interface/efi-homepage-general-technology.html Intel's page on EFI]<br />
* [https://firmware.intel.com/ Intel Architecture Firmware Resource Center]<br />
* [https://firmware.intel.com/blog/linux-efi-boot-stub Matt Fleming - The Linux EFI Boot Stub]{{Dead link|2020|02|26}}<br />
* [https://firmware.intel.com/blog/accessing-uefi-variables-linux Matt Fleming - Accessing UEFI Variables from Linux]{{Dead link|2020|02|26}}<br />
* [https://www.rodsbooks.com/linux-uefi/ Rod Smith - Linux on UEFI: A Quick Installation Guide]<br />
* [https://lkml.org/lkml/2011/6/8/322 UEFI Boot problems on some newer machines (LKML)]<br />
* [https://linuxplumbers.ubicast.tv/videos/plumbing-uefi-into-linux/ LPC 2012 Plumbing UEFI into Linux]<br />
* [https://linuxplumbers.ubicast.tv/videos/uefi-tutorial-part-1/ LPC 2012 UEFI Tutorial : part 1]<br />
* [https://linuxplumbers.ubicast.tv/videos/uefi-tutorial-part-2/ LPC 2012 UEFI Tutorial : part 2]<br />
* [https://www.tianocore.org/ Intel's TianoCore Project] for Open-Source UEFI firmware which includes DuetPkg for direct BIOS based booting and OvmfPkg used in QEMU and Oracle VirtualBox<br />
* [https://jdebp.eu/FGA/efi-boot-process.html FGA: The EFI boot process]<br />
* [https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-and-gpt-faq Microsoft's Windows and GPT FAQ]<br />
* [https://gitlab.com/tianocore_uefi_duet_builds/tianocore_uefi_duet_installer/wikis/Windows_x64_BIOS_to_UEFI Convert Windows x64 from BIOS-MBR mode to UEFI-GPT mode without Reinstall]<br />
* [https://gitlab.com/tianocore_uefi_duet_builds/tianocore_uefi_duet_installer/wikis/Linux_Windows_BIOS_UEFI_boot_USB Create a Linux BIOS+UEFI and Windows x64 BIOS+UEFI bootable USB drive]<br />
* [https://rodsbooks.com/bios2uefi/ Rod Smith - A BIOS to UEFI Transformation]<br />
* [https://software.intel.com/en-us/articles/efi-shells-and-scripting/ EFI Shells and Scripting - Intel Documentation]<br />
* [https://software.intel.com/en-us/articles/uefi-shell/ UEFI Shell - Intel Documentation]<br />
* [https://web.archive.org/web/20130929114218/http://www.hpuxtips.es/?q=node/293 UEFI Shell - bcfg command info]</div>Pdchttps://wiki.archlinux.org/index.php?title=Stumpwm&diff=588488Stumpwm2019-11-10T15:24:39Z<p>Pdc: /* With SBCL */ Replace cl-alexandria with cl-alexandria-git</p>
<hr />
<div>[[Category:Tiling WMs]]<br />
[[ja:Stumpwm]]<br />
StumpWM is a tiling, keyboard driven X11 window manager written entirely in<br />
Common Lisp.<br />
<br />
The successor to the cult classic [[Ratpoison]], StumpWM adds all the<br />
flexibility and hackability of Common Lisp, allowing the user to make<br />
modifications to the source of the window manager even while it is<br />
running. It is also known as "the emacs of WMs."<br />
<br />
From [https://stumpwm.github.io/ StumpWM's homepage]:<br />
<br />
:"StumpWM attempts to be customizable yet visually minimal. There are no window decorations, no icons, and no buttons. It does have various hooks to attach your personal customizations, and variables to tweak.<br />
<br />
:* Hack the good hack<br />
:* Debug your good hack<br />
:* Customize your window manager<br />
:While it's running That's right. With a 100% Common Lisp window manager there's no stopping the hacks. Just re-eval and GO!"<br />
<br />
Want to see it in action? A StumpWM user created<br />
a [http://www.archive.org/details/TheStumpWMExperience video].<br />
<br />
== Installation ==<br />
<br />
[[Install]] {{AUR|stumpwm}} or {{AUR|stumpwm-git}}. The stable version supports multiple common-lisp implementations. The git version only supports sbcl.<br />
<br />
SBCL is recommended for maximum performance.<br />
<br />
After installing put {{Ic|exec stumpwm}} in your {{Ic|~/.xinitrc}} and run {{Ic|startx}}.<br />
<br />
To quit, with the default configuration press {{Ic|C-t ;}} then type quit and press enter.<br />
<br />
=== With SBCL ===<br />
Install these packages in the following order:<br />
* {{Pkg|sbcl}}<br />
* {{AUR|cl-alexandria-git}}<br />
* {{AUR|clx-git}}<br />
* {{AUR|cl-ppcre}}<br />
* {{AUR|stumpwm}} or {{AUR|stumpwm-git}}<br />
<br />
=== With Clisp ===<br />
Install these packages from AUR in the following order:<br />
* {{AUR|clisp-new-clx}}<br />
* {{AUR|asdf}}<br />
* {{AUR|cl-ppcre}}<br />
* {{AUR|stumpwm}}<br />
<br />
Also, look at [https://bbs.archlinux.org/viewtopic.php?pid=543537#p543537 this post] if you run into troubles.<br />
<br />
== Documentation and Support ==<br />
<br />
There is a TeXInfo manual included in the AUR package, the source, and [https://stumpwm.github.io/git/stumpwm-git.html online].<br />
<br />
There is also a [http://github.com/sabetts/stumpwm/wiki wiki], an IRC channel<br />
(#stumpwm) on Freenode, and a mailing list. For more information, of<br />
course, see [https://stumpwm.github.io/ the project's website].<br />
<br />
== Tweaking ==<br />
<br />
See the wiki for a variety of useful tweaks for your .stumpwmrc.<br />
<br />
If you are an emacs user, you will find an emacs minor mode for editing<br />
StumpWM files (and interfacing with the program {{Ic|stumpish}}, but<br />
more on that below) in the contrib/ directory of the StumpWM source.<br />
If you are using clisp, this file can also be found in<br />
{{Ic|/usr/share/stumpwm/}}.<br />
<br />
{{Ic|stumpish}} is the STUMP window manager Interactive SHell. It is<br />
a program that allows the user to interact with StumpWM while it is<br />
running, from the comfort of a terminal (or using the emacs mode). It<br />
can be found in the contrib/ directory of the StumpWM source. If you<br />
use clisp, this file can also be found in {{Ic|/usr/bin/}}.<br />
<br />
==Configuration==<br />
<br />
StumpWM stores its configuration in {{Ic|~/.stumpwmrc}} or you can use {{Ic|~/.config/stumpwm/config}}<br />
<br />
===Change cursor from default X shape===<br />
By default StumpWM leaves the cursor as XOrg's standard X shape with the hotspot in the centre. You can have the more usual left-facing pointer by running<br />
<br />
xsetroot -cursor_name left_ptr<br />
<br />
You can also put this in your config file<br />
<br />
(run-shell-command "xsetroot -cursor_name left_ptr")<br />
<br />
===Change window focus on mouse click===<br />
Clicking on another window will send the click event to that window, but it will not get focus meaning any keyboard input will go to whichever window has focus. The following line makes focus change to any window that is clicked on.<br />
<br />
(setf *mouse-focus-policy* :click) <br />
<br />
===Enable modeline===<br />
This sets up a basic modeline with the group name followed by window names on the left and the date and time on the right.<br />
<br />
First set the window name format and overall modeline format<br />
<br />
(setf *window-format* "%m%n%s%c")<br />
(setf *screen-mode-line-format* (list "[^B%n^b] %W^>%d"))<br />
<br />
The date format is constructed using the same format specifiers as {{man|3|strftime}} e.g.<br />
<br />
(setf *time-modeline-string* "%a %b %e %k:%M")<br />
<br />
Optionally change how often the modeline updates on its own, in seconds (it also updates whenever you do something with StumpWM like switch window).<br />
<br />
(setf *mode-line-timeout* 2)<br />
<br />
Finally enable the modeline (this must come ''after'' you have set the options you wanted)<br />
<br />
(enable-mode-line (current-screen) (current-head) t)<br />
<br />
===Set font for messages and modeline===<br />
StumpWM uses the default XOrg font which is probably small and pixellated. You can use the ttf-fonts module to set a custom font.<br />
<br />
(ql:quickload "clx-truetype")<br />
(load-module "ttf-fonts")<br />
(set-font (make-instance 'xft:font :family "DejaVu Sans Mono" :subfamily "Book" :size 11))<br />
<br />
== Troubleshooting ==<br />
* If you have problems configuring multiple monitors, maybe you need to install 'xorg-xdpyinfo' package.<br />
<br />
* If you cannot start stumpwm and get<br />
debugger invoked on a SB-INT:SIMPLE-PARSE-ERROR in thread<br />
#:<br />
no non-whitespace characters in string "".<br />
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.<br />
(no restarts: If you did not do this on purpose, please report it as a bug.)<br />
(PARSE-INTEGER "" :START 0 :END NIL :RADIX 10 :JUNK-ALLOWED NIL)<br />
<br />
in the REPL, it can be solved by deleting {{ic|~/.Xauthority}}. See [https://github.com/sabetts/stumpwm/issues/1 this issue on github]<br />
<br />
* If you have an issue with the SBCL_HOME being set to NIL, you may need to set it manually<br />
{{Tip|You can find the path using<br />
{{ic|find / {{!}} grep sbcl.core}}<br />
}}<br />
{{bc|1=export SBCL_HOME=/usr/lib/sbcl/}}<br />
<br />
Then you may reinstall stumpwm<br />
<br />
* If you can't use the mousewheel to scroll in some programs, try adding<br />
(setf (getenv "GDK_CORE_DEVICE_EVENTS") "1")<br />
to your {{ic|.stumpwmrc}} (source: [https://mmk2410.org/2018/02/15/scrolling-doesnt-work-in-gtk-3-apps-in-stumpwm/])<br />
<br />
* Quicklisp won't work in StumpWM if you installed it after installing StumpWM - in that case uninstall and reinstall StumpWM</div>Pdchttps://wiki.archlinux.org/index.php?title=Systemd-nspawn&diff=585717Systemd-nspawn2019-10-13T09:59:10Z<p>Pdc: /* nsswitch.conf */ The version of /etc/nsswitch.conf in the filesystem package includes mymachines in the hosts section</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Virtualization]]<br />
[[Category:Sandboxing]]<br />
[[es:Systemd-nspawn]]<br />
[[ja:Systemd-nspawn]]<br />
[[ru:Systemd-nspawn]]<br />
[[zh-hans:Systemd-nspawn]]<br />
{{Related articles start}}<br />
{{Related|systemd}}<br />
{{Related|Linux Containers}}<br />
{{Related|systemd-networkd}}<br />
{{Related|Docker}}<br />
{{Related|Lxc-systemd}}<br />
{{Related articles end}}<br />
<br />
''systemd-nspawn'' is like the [[chroot]] command, but it is a ''chroot on steroids''.<br />
<br />
''systemd-nspawn'' may be used to run a command or OS in a light-weight namespace container. It is more powerful than [[chroot]] since it fully virtualizes the file system hierarchy, as well as the process tree, the various IPC subsystems and the host and domain name.<br />
<br />
''systemd-nspawn'' limits access to various kernel interfaces in the container to read-only, such as {{ic|/sys}}, {{ic|/proc/sys}} or {{ic|/sys/fs/selinux}}. Network interfaces and the system clock may not be changed from within the container. Device nodes may not be created. The host system cannot be rebooted and kernel modules may not be loaded from within the container.<br />
<br />
This mechanism differs from [[Lxc-systemd]] or [[Libvirt]]-lxc, as it is a much simpler tool to configure.<br />
<br />
== Installation ==<br />
<br />
''systemd-nspawn'' is part of and packaged with {{Pkg|systemd}}. <br />
<br />
== Examples ==<br />
<br />
=== Create and boot a minimal Arch Linux distribution in a container ===<br />
<br />
First install {{Pkg|arch-install-scripts}}.<br />
<br />
Next, create a directory to hold the container. In this example we will use {{ic|~/MyContainer}}. <br />
<br />
Next, we use pacstrap to install a basic arch-system into the container. At minimum we need to install the {{Pkg|base}} package. <br />
<br />
# pacstrap -c ~/MyContainer base [additional pkgs/groups]<br />
<br />
{{Note|The {{Pkg|base}} package does not depend on the {{Pkg|linux}} kernel package and is container-ready.}}<br />
<br />
Once your installation is finished, boot into the container:<br />
<br />
# systemd-nspawn -b -D ~/MyContainer<br />
<br />
The {{ic|-b}} option will boot the container (i.e. run {{ic|systemd}} as PID=1), instead of just running a shell, and {{ic|-D}} specifies the directory that becomes the container's root directory.<br />
<br />
After the container starts, log in as "root" with no password.<br />
<br />
{{Tip|If the login fails with "Login incorrect", the problem is likely the {{ic|securetty}} TTY device whitelist. Add {{ic|pts/0}} through {{ic|pts/9}} to the container's version of the file ({{ic|~/MyContainer/etc/securetty}}) and retry. See {{Bug|45903}} for details.}}<br />
<br />
The container can be powered off by running {{ic|poweroff}} from within the container. From the host, containers can be controlled by the [[#machinectl|machinectl]] tool.<br />
<br />
{{Note|To terminate the ''session'' from within the container, hold {{ic|Ctrl}} and rapidly press {{ic|]}} three times. Non-US keyboard users should use {{ic|%}} instead of {{ic|]}}.}}<br />
<br />
=== Create a Debian or Ubuntu environment ===<br />
<br />
Install {{Pkg|debootstrap}}, and one or both of {{Pkg|debian-archive-keyring}} and {{Pkg|ubuntu-keyring}} (obviously install the keyrings for the distros you want).<br />
<br />
{{Note|''systemd-nspawn'' requires that the operating system in the container has systemd running as PID 1 and ''systemd-nspawn'' is installed in the container. This means Ubuntu before 15.04 will not work out of the box and requires additional configuration to switch from upstart to systemd. Also make sure that the {{ic|systemd-container}} package is installed on the container system.}}<br />
<br />
From there it's rather easy to setup Debian or Ubuntu environments:<br />
<br />
# cd /var/lib/machines<br />
# debootstrap --include=systemd-container --components=main,universe <codename> myContainer <repository-url><br />
<br />
For Debian valid code names are either the rolling names like "stable" and "testing" or release names like "stretch" and "sid", for Ubuntu the code name like "xenial" or "zesty" should be used. A complete list of codenames is in {{ic|/usr/share/debootstrap/scripts}}. In case of a Debian image the "repository-url" can be {{ic|http://deb.debian.org/debian/}}. For an Ubuntu image, the "repository-url" can be {{ic|http://archive.ubuntu.com/ubuntu/}}.<br />
<br />
Unlike Arch, Debian and Ubuntu will not let you login without a password on first login. To set the root password login without the '-b' option and set a password:<br />
<br />
# systemd-nspawn -D myContainer<br />
# passwd<br />
# logout<br />
<br />
If the above did not work. One can start the container and use these commands instead:<br />
<br />
# systemd-nspawn -b -D myContainer #Starts the container<br />
# machinectl shell root@myContainer /bin/bash #Get a root bash shell<br />
# passwd<br />
# logout<br />
<br />
=== Creating private users (unprivileged containers) ===<br />
<br />
''systemd-nspawn'' supports unprivileged containers, though the containers need to be booted as root.<br />
<br />
{{Note|This feature requires {{man|7|user_namespaces}}, for further info see [[Linux Containers#Enable support to run unprivileged containers (optional)]]}}<br />
<br />
The easiest way to do this is to let ''systemd-nspawn'' decide everything:<br />
<br />
# systemd-nspawn -UD myContainer<br />
# passwd<br />
# logout<br />
# systemd-nspawn -bUD myContainer<br />
<br />
Here ''systemd-nspawn'' will see if the owner of the directory is being used, if not it will use that as base and 65536 IDs above it. On the other hand if the UID/GID is in use it will randomly pick an unused range of 65536 IDs from 524288 - 1878982656 and use them.<br />
<br />
{{Note|<br />
* The base of the range chosen is always a multiple of 65536.<br />
* {{ic|-U}} and {{ic|1=--private-users=pick}} is the same, if kernel supports user namespaces. {{ic|1=--private-users=pick}} also implies {{ic|1=--private-users-chown}}, see {{man|1|systemd-nspawn}} for details.<br />
}}<br />
<br />
You can also specify the UID/GID of the container manually:<br />
<br />
# systemd-nspawn -D myContainer --private-users=1354956800:65536 --private-users-chown<br />
# passwd<br />
# logout<br />
# systemd-nspawn -bUD myContainer<br />
<br />
While booting the container you could still use {{ic|1=--private-users=1354956800:65536}} with {{ic|--private-users-chown}}, but it is unnecessarily complicated, let {{ic|-U}} handle it after the assigning the IDs.<br />
<br />
=== Enable container on boot ===<br />
<br />
When using a container frequently, you may want to start it on boot.<br />
<br />
First [[enable]] the {{ic|machines.target}} target, then {{ic|systemd-nspawn@''myContainer''.service}}, where {{ic|myContainer}} is an nspawn container in {{ic|/var/lib/machines}}.<br />
<br />
{{Tip|To customize the startup of a container, edit {{ic|/etc/systemd/nspawn/''myContainer''.nspawn}}. See {{man|5|systemd.nspawn}} for all options.}}<br />
<br />
=== Build and test packages ===<br />
<br />
See [[Creating packages for other distributions]] for example uses.<br />
<br />
== Management ==<br />
<br />
=== machinectl ===<br />
<br />
{{Note|The ''machinectl'' tool requires [[systemd]] and {{Pkg|dbus}} to be installed in the container. See [https://github.com/systemd/systemd/issues/685] for detailed discussion.}}<br />
<br />
Managing your containers is essentially done with the {{ic|machinectl}} command. See {{man|1|machinectl}} for details.<br />
<br />
Examples:<br />
<br />
Spawn a new shell inside a running container: <br />
<br />
$ machinectl login ''MyContainer''<br />
<br />
Show detailed information about a container: <br />
<br />
$ machinectl status ''MyContainer''<br />
<br />
Reboot a container:<br />
<br />
$ machinectl reboot ''MyContainer''<br />
<br />
Poweroff a container:<br />
<br />
$ machinectl poweroff ''MyContainer''<br />
<br />
{{Tip|Poweroff and reboot operations can be performed from within a container session using the ''systemctl'' {{ic|poweroff}} or {{ic|reboot}} commands.}}<br />
<br />
Download an image:<br />
<br />
# machinectl pull-tar ''URL'' ''name''<br />
<br />
=== systemd toolchain ===<br />
<br />
Much of the core systemd toolchain has been updated to work with containers. Tools that do usually provide a {{ic|1=-M, --machine=}} option which will take a container name as argument.<br />
<br />
Examples:<br />
<br />
See journal logs for a particular machine:<br />
<br />
$ journalctl -M ''MyContainer''<br />
<br />
Show control group contents:<br />
<br />
$ systemd-cgls -M ''MyContainer''<br />
<br />
See startup time of container:<br />
<br />
$ systemd-analyze -M ''MyContainer''<br />
<br />
For an overview of resource usage:<br />
<br />
$ systemd-cgtop<br />
<br />
=== Resource control ===<br />
<br />
You can take advantage of control groups to implement limits and resource management of your containers with {{ic|systemctl set-property}}, see {{man|5|systemd.resource-control}}. For example, you may want to limit the memory amount or CPU usage. To limit the memory consumption of your container to 2 GiB:<br />
<br />
# systemctl set-property systemd-nspawn@''myContainer''.service MemoryMax=2G<br />
<br />
Or to limit the CPU time usage to roughly the equivalent of 2 cores:<br />
<br />
# systemctl set-property systemd-nspawn@''myContainer''.service CPUQuota=200%<br />
<br />
This will create permanent files in {{ic|/etc/systemd/system.control/systemd-nspawn@''myContainer''.service.d/}}.<br />
<br />
According to the documentation, {{ic|MemoryHigh}} is the preferred method to keep in check memory consumption, but it will not be hard-limited as is the case with {{ic|MemoryMax}}. You can use both options leaving {{ic|MemoryMax}} as the last line of defense. Also take in consideration that you will not limit the number of CPUs the container can see, but you will achieve similar results by limiting how much time the container will get at maximum, relative to the total CPU time.<br />
<br />
{{Tip|If you do not want this changes to be preserved after reboot you can pass the option {{ic|--runtime}} to make the changes temporary. You can check their results with {{ic|systemd-cgtop}}.}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Use an X environment ===<br />
<br />
{{Accuracy|The note about the systemd version at the end of this section seems to be obsolete. For me (systemd version 239) X applications also work if {{ic|/tmp/.X11-unix}} is bound rw.|section=/tmp/.X11-unix contents have to be bind-mounted as read-only - still relevant?}}<br />
<br />
See [[Xhost]] and [[Change root#Run graphical applications from chroot]].<br />
<br />
You will need to set the {{ic|DISPLAY}} environment variable inside your container session to connect to the external X server.<br />
<br />
X stores some required files in the {{ic|/tmp}} directory. In order for your container to display anything, it needs access to those files. To do so, append the {{ic|--bind-ro<nowiki>=</nowiki>/tmp/.X11-unix}} option when starting the container.<br />
<br />
{{Note|Since systemd version 235, {{ic|/tmp/.X11-unix}} contents [https://github.com/systemd/systemd/issues/7093 have to be bind-mounted as read-only], otherwise they will disappear from the filesystem. The read-only mount flag does not prevent using {{ic|connect()}} syscall on the socket. If you binded also {{ic|/run/user/1000}} then you might want to explicitly bind {{ic|/run/user/1000/bus}} as read-only to protect the dbus socket from being deleted. }}<br />
<br />
==== Avoiding xhost ====<br />
<br />
{{ic|xhost}} only provides rather coarse access rights to the X server. More fine-grained access control is possible via the {{ic|$XAUTHORITY}} file. Unfortunately, just making the {{ic|$XAUTHORITY}} file accessible in the container will not do the job:<br />
your {{ic|$XAUTHORITY}} file is specific to your host, but the container is a different host.<br />
The following trick adapted from [https://stackoverflow.com/a/25280523 stackoverflow] can be used to make your X server accept the {{ic|$XAUTHORITY}} file from an X application run inside the container:<br />
<br />
$ XAUTH=/tmp/container_xauth<br />
$ xauth nextract - "$DISPLAY" | sed -e 's/^..../ffff/' | xauth -f "$XAUTH" nmerge -<br />
$ sudo systemd-nspawn -D myContainer --bind=/tmp/.X11-unix --bind="$XAUTH" \<br />
-E DISPLAY="$DISPLAY" -E XAUTHORITY="$XAUTH" --as-pid2 /usr/bin/xeyes<br />
<br />
The second line above sets the connection family to "FamilyWild", value {{ic|65535}}, which causes the entry to match every display. See {{man|7|Xsecurity}} for more information.<br />
<br />
=== Run Firefox ===<br />
<br />
See [[Firefox tweaks#Run Firefox inside an nspawn container|Firefox tweaks]].<br />
<br />
=== Access host filesystem ===<br />
<br />
See {{ic|--bind}} and {{ic|--bind-ro}} in {{man|1|systemd-nspawn}}.<br />
<br />
If both the host and the container are Arch Linux, then one could, for example, share the pacman cache:<br />
<br />
# systemd-nspawn --bind=/var/cache/pacman/pkg<br />
<br />
Or you can specify per-container bind using the file:<br />
<br />
{{hc|/etc/systemd/nspawn/''my-container''.nspawn|<nowiki><br />
[Files]<br />
Bind=/var/cache/pacman/pkg<br />
</nowiki>}}<br />
<br />
See [[#Specify per-container settings]].<br />
<br />
=== Configure networking ===<br />
<br />
{{Style}}<br />
<br />
For the most simple setup, allowing outgoing connections to the internet, you can use [[systemd-networkd]] for network management and DHCP and [[systemd-resolved]] for DNS.<br />
<br />
This assumes you have started {{ic|systemd-nspawn}} with the {{ic|-n}} switch, creating a virtual Ethernet link to the host.<br />
<br />
Instead of using [[systemd-resolved]] you can also manually [[textedit|edit]] your container's {{ic|/etc/resolv.conf}} by adding your DNS server's IP address.<br />
<br />
Note the canonical [[systemd-networkd]] host and container .network files are from https://github.com/systemd/systemd/tree/master/network .<br />
<br />
See [[systemd-networkd#Usage with containers]] for more complex examples.<br />
<br />
==== nsswitch.conf ====<br />
<br />
{{Merge|systemd-networkd}}<br />
<br />
To make it easier to connect to a container from the host, you can enable local DNS resolution for container names. In {{ic|/etc/nsswitch.conf}}, ensure that the {{ic|hosts:}} section includes {{ic|mymachines}}, e.g.<br />
<br />
{{hc|/etc/nsswitch.conf|<nowiki><br />
hosts: files mymachines dns myhostname</nowiki>}}<br />
<br />
Then, any DNS lookup for hostname {{ic|foo}} on the host will first consult {{ic|/etc/hosts}}, then the names of local containers, then upstream DNS etc.<br />
<br />
==== Use host networking ====<br />
<br />
To disable private networking used by containers started with {{ic|machinectl start MyContainer}} add a {{ic|MyContainer.nspawn}} file to the{{ic|/etc/systemd/nspawn}} directory (create the directory if needed) and add the following: <br />
<br />
{{hc|/etc/systemd/nspawn/MyContainer.nspawn|<nowiki><br />
[Network]<br />
VirtualEthernet=no<br />
</nowiki>}}<br />
<br />
Parameters set in the {{ic|MyContainer.nspawn}} file will override the defaults used in {{ic|systemd-nspawn@.service}} and the newly started containers will use the host's networking.<br />
<br />
==== Virtual Ethernet interfaces ====<br />
<br />
If a container is started with {{ic|systemd-nspawn ... -n}}, systemd will automatically create one virtual Ethernet interface on the host, and one in the container, connected by a virtual Ethernet cable.<br />
<br />
If the name of the container is {{ic|foo}}, the name of the virtual Ethernet interface on the host is {{ic|ve-foo}}. The name of the virtual Ethernet interface in the container is always {{ic|host0}}.<br />
<br />
When examining the interfaces with {{ic|ip link}}, interface names will be shown with a suffix, such as {{ic|ve-foo@if2}} and {{ic|host0@if9}}. The {{ic|@ifN}} is not actually part of the name of the interface; instead, {{ic|ip link}} appends this information to indicate which "slot" the virtual Ethernet cable connects to on the other end.<br />
<br />
For example, a host virtual Ethernet interface shown as {{ic|ve-foo@if2}} will connect to container {{ic|foo}}, and inside the container to the second network interface -- the one shown with index 2 when running {{ic|ip link}} inside the container. Similarly, in the container, the interface named {{ic|host0@if9}} will connect to the 9th slot on the host.<br />
<br />
{{Note|If you use a firewall, the traffic of your virtual interface can be blocked as result. You will have to enable the necesary rules to by-pass your firewall.}}<br />
<br />
==== Use a network bridge ====<br />
<br />
If you have configured a network bridge on the host system in order to have an IP address assigned to the container as if it was a physical machine in your local network (see, for example, [[systemd-networkd#DHCP with two distinct IP]] or [[systemd-networkd#Static IP network]]) you can make systemd-nspawn use it by using the option {{ic|1=--network-bridge=''br0''}}.<br />
<br />
=== Run on a non-systemd system ===<br />
<br />
See [[Init#systemd-nspawn]].<br />
<br />
=== Specify per-container settings ===<br />
<br />
To specify per-container settings and not overrides for all (e.g. bind a directory to only one container), the ''.nspawn'' files can be used. See {{man|5|systemd.nspawn}} for details.<br />
<br />
=== Use Btrfs subvolume as container root ===<br />
<br />
To use a [[Btrfs#Subvolumes|Btrfs subvolume]] as a template for the container's root, use the {{ic|--template}} flag. This takes a snapshot of the subvolume and populates the root directory for the container with it.<br />
<br />
{{Note|If the template path specified is not the root of a subvolume, the '''entire''' tree is copied. This will be very time consuming.}}<br />
<br />
For example, to use a snapshot located at {{ic|/.snapshots/403/snapshot}}:<br />
<br />
# systemd-nspawn --template=/.snapshots/403/snapshots -b -D ''my-container''<br />
<br />
where {{ic|''my-container''}} is the name of the directory that will be created for the container. After powering off, the newly created subvolume is retained.<br />
<br />
=== Use temporary Btrfs snapshot of container ===<br />
<br />
One can use the {{ic|--ephemeral}} or {{ic|-x}} flag to create a temporary btrfs snapshot of the container and use it as the container root. Any changes made while booted in the container will be lost. For example:<br />
<br />
# systemd-nspawn -D ''my-container'' -xb<br />
<br />
where ''my-container'' is the directory of an '''existing''' container or system. For example, if {{ic|/}} is a btrfs subvolume one could create an ephemeral container of the currently running host system by doing:<br />
<br />
# systemd-nspawn -D / -xb <br />
<br />
After powering off the container, the btrfs subvolume that was created is immediately removed.<br />
<br />
=== Run docker in systemd-nspawn ===<br />
<br />
[[Docker]] requires {{ic|rw}} permission of {{ic|/sys/fs/cgroup}} to run its containers, which is mounted read-only by {{ic|systemd-nspawn}} by default due to cgroup namespace. However, it is possible to run Docker in a systemd-nspawn container by bind-mounting {{ic|/sys/fs/cgroup}} from host os and enabling necessary capabilities and permissions.<br />
<br />
{{Note|The following steps are essentially sharing the cgroup namespace to the container, giving kernel keyring permissions and making it a privileged container, which is likely to increase the attack surface and decrease security level. You should always evaluate the actual benefits by doing so before following the steps.}}<br />
<br />
First, cgroup namespace should be disabled by {{ic|systemctl edit systemd-nspawn@myContainer}}<br />
<br />
{{hc|systemctl edit systemd-nspawn@myContainer|<nowiki><br />
[Service]<br />
Environment=SYSTEMD_NSPAWN_USE_CGNS=0<br />
</nowiki>}}<br />
<br />
Then, edit {{ic|/etc/systemd/nspawn/myContainer.nspawn}} (create if absent) and add the following configurations.<br />
<br />
{{hc|/etc/systemd/nspawn/myContainer.nspawn|<nowiki><br />
[Exec]<br />
Capability=all<br />
SystemCallFilter=add_key keyctl<br />
<br />
[Files]<br />
Bind=/sys/fs/cgroup<br />
</nowiki>}}<br />
<br />
This grants all capabilities to the container, whitelists two system calls {{ic|add_key}} and {{ic|keyctl}} (related to kernel keyring and required by Docker), and bind-mounts {{ic|/sys/fs/cgroup}} from host to the container. After editing these files, you need to poweroff and restart your container for them to take effect.<br />
<br />
{{Note|You might need to load the {{ic|overlay}} module on the host before starting Docker inside the systemd-nspawn to use the {{ic|overlay2}} storage driver (default storage driver of Docker) properly. Failure to load the driver will cause Docker to choose the inefficient driver {{ic|vfs}} which copies everything for every layer of Docker containers. Consult [[Kernel modules#Automatic module loading with systemd]] on how to load the module automatically.}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Root login fails ===<br />
<br />
If you get the following error when you try to login (i.e. using {{ic|machinectl login <name>}}):<br />
<br />
arch-nspawn login: root<br />
Login incorrect<br />
<br />
And {{ic|journalctl}} shows:<br />
<br />
pam_securetty(login:auth): access denied: tty 'pts/0' is not secure !<br />
<br />
Add {{ic|pts/0}} to the list of terminal names in {{ic|/etc/securetty}} on the '''container''' filesystem, see [http://unix.stackexchange.com/questions/41840/effect-of-entries-in-etc-securetty/41939#41939]. You can also opt to delete {{ic|/etc/securetty}} on the '''container''' to allow root to login to any tty, see [https://github.com/systemd/systemd/issues/852].<br />
<br />
=== Unable to upgrade some packages on the container ===<br />
<br />
It can sometimes be impossible to upgrade some packages on the container, {{Pkg|filesystem}} being a perfect example. The issue is due to {{ic|/sys}} being mounted as Read Only. The workaround is to remount the directory in Read Write when running {{ic|mount -o remount,rw -t sysfs sysfs /sys}}, do the upgrade then reboot the container.<br />
<br />
=== execv(...) failed: Permission denied ===<br />
<br />
When trying to boot the container via {{ic|systemd-nspawn -bD ''/path/to/container''}} (or executing something in the container), and the following error comes up:<br />
<br />
execv(/usr/lib/systemd/systemd, /lib/systemd/systemd, /sbin/init) failed: Permission denied<br />
<br />
even though the permissions of the files in question (i.e. {{ic|/lib/systemd/systemd}}) are correct, this can be the result of having mounted the file system on which the container is stored as non-root user. For example, if you mount your disk manually with an entry in [[fstab]] that has the options {{ic|noauto,user,...}}, ''systemd-nspawn'' will not allow executing the files even if they are owned by root.<br />
<br />
=== Reboot not working ===<br />
<br />
When trying to reboot the container via machinectl or within the container, the container does not reboot.<br />
<br />
Workaround: edit {{ic|/usr/lib/systemd/system/systemd-nspawn@.service}} and remove {{ic|--keep-unit}}<br />
<br />
Reference: https://github.com/systemd/systemd/issues/2809<br />
<br />
=== Mounting a NFS share inside the container ===<br />
<br />
Not possible at this time (June 2019).<br />
<br />
== See also ==<br />
<br />
* [[Getty#Nspawn_console|Automatic console login]]<br />
* [http://www.freedesktop.org/software/systemd/man/machinectl.html machinectl man page]<br />
* [http://www.freedesktop.org/software/systemd/man/systemd-nspawn.html systemd-nspawn man page]<br />
* [http://lwn.net/Articles/572957/ Creating containers with systemd-nspawn]<br />
* [https://www.youtube.com/results?search_query=systemd-nspawn&aq=f Presentation by Lennart Pottering on systemd-nspawn]<br />
* [http://dabase.com/e/12009/ Running Firefox in a systemd-nspawn container]<br />
* [https://patrickskiba.com/sysytemd-nspawn/2019/03/21/graphical-applications-in-systemd-nspawn.html Graphical applications in systemd-nspawn]</div>Pdchttps://wiki.archlinux.org/index.php?title=File_systems&diff=584945File systems2019-10-09T16:42:04Z<p>Pdc: /* Types of file systems */ File system packages which were in the base group aren't required by the base package</p>
<hr />
<div>[[Category:File systems]]<br />
[[Category:Lists]]<br />
[[es:File systems]]<br />
[[hu:File systems]]<br />
[[it:File systems]]<br />
[[ja:ファイルシステム]]<br />
[[pl:File systems]]<br />
[[ru:File systems]]<br />
[[tr:File systems]]<br />
[[zh-hans:File systems]]<br />
{{Related articles start}}<br />
{{Related|Partitioning}}<br />
{{Related|Device file#lsblk}}<br />
{{Related|File permissions and attributes}}<br />
{{Related|fsck}}<br />
{{Related|fstab}}<br />
{{Related|List of applications#Mount tools}}<br />
{{Related|QEMU#Mounting a partition inside a raw disk image}}<br />
{{Related|udev}}<br />
{{Related|udisks}}<br />
{{Related|umask}}<br />
{{Related|USB storage devices}}<br />
{{Related articles end}}<br />
From [[Wikipedia:File system|Wikipedia]]:<br />
:In computing, a file system or filesystem controls how data is stored and retrieved. Without a file system, information placed in a storage medium would be one large body of data with no way to tell where one piece of information stops and the next begins. By separating the data into pieces and giving each piece a name, the information is easily isolated and identified. Taking its name from the way paper-based information systems are named, each group of data is called a "file". The structure and logic rules used to manage the groups of information and their names is called a "file system". <br />
<br />
Individual drive partitions can be setup using one of the many different available filesystems. Each has its own advantages, disadvantages, and unique idiosyncrasies. A brief overview of supported filesystems follows; the links are to Wikipedia pages that provide much more information.<br />
<br />
== Types of file systems ==<br />
<br />
{{Accuracy|{{ic|/proc/filesystems}} only lists file systems whose modules are either built-in or currently loaded. Since [[Kernel#Officially supported kernels|Arch kernels]] have most of the file systems built as loadable modules, {{ic|/proc/filesystems}} will show very few, if any, usable file systems.}}<br />
<br />
See {{man|5|filesystems}} for a general overview and [[Wikipedia:Comparison of file systems]] for a detailed feature comparison. File systems supported by the kernel are listed in {{ic|/proc/filesystems}}.<br />
<br />
{| class="wikitable sortable"<br />
|+ In-tree and FUSE file systems<br />
! File system<br />
! Creation command<br />
! Userspace utilities<br />
! [[Archiso]] [https://git.archlinux.org/archiso.git/tree/configs/releng/packages.x86_64]<br />
! Kernel documentation [https://www.kernel.org/doc/Documentation/filesystems/]<br />
! Notes<br />
|-<br />
| [[Btrfs]]<br />
| {{man|8|mkfs.btrfs}}<br />
| {{Pkg|btrfs-progs}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/Documentation/filesystems/btrfs.txt btrfs.txt]<br />
| [https://btrfs.wiki.kernel.org/index.php/Status Stability status]<br />
|-<br />
| [[VFAT]]<br />
| {{man|8|mkfs.fat}}<br />
| {{Pkg|dosfstools}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/Documentation/filesystems/vfat.txt vfat.txt]<br />
|<br />
|-<br />
| [[Wikipedia:exFAT|exFAT]]<br />
| {{man|8|mkexfatfs|}}<br />
| {{Pkg|exfat-utils}}<br />
| {{Yes}}<br />
| N/A (FUSE-based)<br />
|<br />
|-<br />
| [[F2FS]]<br />
| {{man|8|mkfs.f2fs}}<br />
| {{Pkg|f2fs-tools}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/Documentation/filesystems/f2fs.txt f2fs.txt]<br />
<br />
| Flash-based devices<br />
|-<br />
| [[ext3]]<br />
| {{man|8|mke2fs}}<br />
| {{Pkg|e2fsprogs}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/Documentation/filesystems/ext3.txt ext3.txt]<br />
|<br />
|-<br />
| [[ext4]]<br />
| {{man|8|mke2fs}}<br />
| {{Pkg|e2fsprogs}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/Documentation/filesystems/ext4.txt ext4.txt]<br />
|<br />
|-<br />
| [[Wikipedia:Hierarchical File System|HFS]]<br />
| {{man|8|mkfs.hfsplus|url=}}<br />
| {{AUR|hfsprogs}}<br />
| {{No}}<br />
| [https://www.kernel.org/doc/Documentation/filesystems/hfs.txt hfs.txt]<br />
| [[Wikipedia:Classic Mac OS|Classic Mac OS]] file system<br />
|-<br />
| [[Wikipedia:HFS Plus|HFS+]]<br />
| {{man|8|mkfs.hfsplus|url=}}<br />
| {{AUR|hfsprogs}}<br />
| {{No}}<br />
| [https://www.kernel.org/doc/Documentation/filesystems/hfsplus.txt hfsplus.txt]<br />
| [[Wikipedia:macOS|macOS]] (8–10.12) file system<br />
|-<br />
| [[JFS]]<br />
| {{man|8|mkfs.jfs}}<br />
| {{Pkg|jfsutils}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/Documentation/filesystems/jfs.txt jfs.txt]<br />
|<br />
|-<br />
| [[Wikipedia:NILFS|NILFS2]]<br />
| {{man|8|mkfs.nilfs2}}<br />
| {{Pkg|nilfs-utils}}<br />
| {{Yes}}<br />
| [https://www.kernel.org/doc/Documentation/filesystems/nilfs2.txt nilfs2.txt]<br />
|<br />
|-<br />
| [[NTFS]]<br />
| {{man|8|mkfs.ntfs}}<br />
| {{Pkg|ntfs-3g}}<br />
| {{Yes}}<br />
| N/A (FUSE-based)<br />
| [[Wikipedia:Microsoft Windows|Windows]] file system<br />
|-<br />
| [[Wikipedia:ReiserFS|ReiserFS]]<br />
| {{man|8|mkfs.reiserfs}}<br />
| {{Pkg|reiserfsprogs}}<br />
| {{Yes}}<br />
|<br />
|<br />
|-<br />
| [[Wikipedia:Universal Disk Format|UDF]]<br />
| {{man|8|mkfs.udf}}<br />
| {{Pkg|udftools}}<br />
| {{Y|Optional}}<br />
| [https://www.kernel.org/doc/Documentation/filesystems/udf.txt udf.txt]<br />
|<br />
|-<br />
| [[XFS]]<br />
| {{man|8|mkfs.xfs}}<br />
| {{Pkg|xfsprogs}}<br />
| {{Yes}}<br />
|<br />
[https://www.kernel.org/doc/Documentation/filesystems/xfs.txt xfs.txt]<br><br />
[https://www.kernel.org/doc/Documentation/filesystems/xfs-delayed-logging-design.txt xfs-delayed-logging-design.txt]<br><br />
[https://www.kernel.org/doc/Documentation/filesystems/xfs-self-describing-metadata.txt xfs-self-describing-metadata.txt]<br />
|<br />
|}<br />
<br />
{{Note|The kernel has its own NTFS driver (see [https://www.kernel.org/doc/Documentation/filesystems/ntfs.txt ntfs.txt]), but it has limited support for writing files.}}<br />
<br />
{| class="wikitable sortable"<br />
|+ Out-of-tree file systems<br />
! File system<br />
! Creation command<br />
! Kernel patchset<br />
! Userspace utilities<br />
! Notes<br />
|-<br />
| [[Wikipedia:Apple File System|APFS]]<br />
| {{man|8|mkapfs|url=}}<br />
| {{AUR|linux-apfs-dkms-git}}<br />
| {{AUR|apfsprogs-git}}<br />
| [[Wikipedia:macOS|macOS]] (10.13 and newer) file system. Read only, experimental.<br />
|-<br />
| [[Bcachefs]]<br />
| {{man|8|bcachefs|url=}}<br />
| {{AUR|linux-bcachefs-git}}<br />
| {{AUR|bcachefs-tools-git}}<br />
|<br />
|-<br />
| [[Reiser4]]<br />
| {{man|8|mkfs.reiser4|url=}}<br />
| {{AUR|linux-ck-reiser4}}<br />
| {{AUR|reiser4progs}}<br />
|<br />
|-<br />
| [[ZFS]]<br />
| <br />
| {{AUR|zfs-linux}}, {{AUR|zfs-dkms}}<br />
| {{AUR|zfs-utils}}<br />
| [[Wikipedia:OpenZFS|OpenZFS]] port<br />
|}<br />
<br />
=== Journaling ===<br />
<br />
All the above filesystems with the exception of ext2, FAT16/32, Reiser4 (optional), Btrfs and ZFS, use [[Wikipedia:Journaling file system|journaling]]. Journaling provides fault-resilience by logging changes before they are committed to the filesystem. In the event of a system crash or power failure, such file systems are faster to bring back online and less likely to become corrupted. The logging takes place in a dedicated area of the filesystem.<br />
<br />
Not all journaling techniques are the same. Ext3 and ext4 offer data-mode journaling, which logs both data and meta-data, as well as possibility to journal only meta-data changes. Data-mode journaling comes with a speed penalty and is not enabled by default. In the same vein, [[Reiser4]] offers so-called [https://reiser4.wiki.kernel.org/index.php/Reiser4_transaction_models "transaction models"] which not only change the features it provides, but in its journaling mode. It uses a different journaling techniques: a special model called [https://reiser4.wiki.kernel.org/index.php/V4#Wandering_Logs wandering logs] which eliminates the need to write to the disk twice, '''write-anywhere'''—a pure copy-on-write approach (mostly equivalent to btrfs' default but with a fundamentally different "tree" design) and a combined approach called '''hybrid''' which heuristically alternates between the two former.<br />
<br />
{{Note|Reiser4 does provide an almost equivalent to ext4's default journaling behavior (meta-data only) with the use of the '''node41''' plugin which also features meta-data and inline checksums, optionally combined with the wandering logs behaviour it provides depending on what transaction model is chosen at mount time.}}<br />
<br />
The other filesystems provide ordered-mode journaling, which only logs meta-data. While all journaling will return a filesystem to a valid state after a crash, data-mode journaling offers the greatest protection against corruption and data loss. There is a compromise in system performance, however, because data-mode journaling does two write operations: first to the journal and then to the disk (which Reiser4 avoids with its "wandering logs" feature. The trade-off between system speed and data safety should be considered when choosing the filesystem type. Reiser4 is the only filesystem that by design operates on full atomicity and also provides checksums for both meta-data and inline data (operations entirely occur, or they entirely do not and does not corrupt or destroy data due to operations half-occurring) and by design is therefor much less prone to data loss than other file systems like [[Btrfs]].<br />
<br />
Filesystems based on copy-on-write (also known as write-anywhere), such as Reiser4, Btrfs and ZFS, have no need to use traditional journal to protect metadata, because they are never updated in-place. Although Btrfs still has a journal-like log tree, it is only used to speed-up fdatasync/fsync.<br />
<br />
=== FUSE-based file systems ===<br />
<br />
See [[FUSE]].<br />
<br />
=== Stackable file systems ===<br />
<br />
* {{App|aufs|Advanced Multi-layered Unification Filesystem, a FUSE based union filesystem, a complete rewrite of Unionfs, was rejected from Linux mainline and instead OverlayFS was merged into the Linux Kernel.|http://aufs.sourceforge.net|{{AUR|aufs}}}}<br />
<br />
* {{App|[[eCryptfs]]|The Enterprise Cryptographic Filesystem is a package of disk encryption software for Linux. It is implemented as a POSIX-compliant filesystem-level encryption layer, aiming to offer functionality similar to that of GnuPG at the operating system level.|http://ecryptfs.org|{{Pkg|ecryptfs-utils}}}}<br />
<br />
* {{App|mergerfs|a FUSE based union filesystem.|https://github.com/trapexit/mergerfs|{{AUR|mergerfs}}}}<br />
<br />
* {{App|mhddfs|Multi-HDD FUSE filesystem, a FUSE based union filesystem.|http://mhddfs.uvw.ru|{{AUR|mhddfs}}}}<br />
<br />
* {{App|[[overlayfs]]|OverlayFS is a filesystem service for Linux which implements a union mount for other file systems.|https://www.kernel.org/doc/Documentation/filesystems/overlayfs.txt|{{Pkg|linux}}}}<br />
<br />
* {{App|Unionfs|Unionfs is a filesystem service for Linux, FreeBSD and NetBSD which implements a union mount for other file systems.|http://unionfs.filesystems.org/}}<br />
<br />
* {{App|unionfs-fuse|A user space Unionfs implementation.|https://github.com/rpodgorny/unionfs-fuse|{{Pkg|unionfs-fuse}}}}<br />
<br />
=== Read-only file systems ===<br />
<br />
* {{App|[[Wikipedia: SquashFS|SquashFS]]|SquashFS is a compressed read only filesystem. SquashFS compresses files, inodes and directories, and supports block sizes up to 1 MB for greater compression.|http://squashfs.sourceforge.net/|{{Pkg|squashfs-tools}}}}<br />
<br />
=== Clustered file systems ===<br />
<br />
* {{App|[[Ceph]]|Unified, distributed storage system designed for excellent performance, reliability and scalability.|https://ceph.com/|{{pkg|ceph}}}}<br />
* {{App|[[Glusterfs]]|Cluster file system capable of scaling to several peta-bytes.|https://www.gluster.org/|{{Pkg|glusterfs}}}}<br />
* {{App|[[IPFS]]|A peer-to-peer hypermedia protocol to make the web faster, safer, and more open. IPFS aims replace HTTP and build a better web for all of us. Uses blocks to store parts of a file, each network node stores only content it is interested, provides deduplication, distribution, scalable system limited only by users. (currently in aplha)|https://ipfs.io/|{{Pkg|go-ipfs}}}}<br />
* {{App|[[Wikipedia: MooseFS|MooseFS]]|MooseFS is a fault tolerant, highly available and high performance scale-out network distributed file system.|https://moosefs.com|{{Pkg|moosefs}}}}<br />
* {{App|[[OpenAFS]]|Open source implementation of the AFS distributed file system|http://www.openafs.org|{{AUR|openafs}}}}<br />
* {{App|[[Wikipedia: OrangeFS|OrangeFS]]|OrangeFS is a scale-out network file system designed for transparently accessing multi-server-based disk storage, in parallel. Has optimized MPI-IO support for parallel and distributed applications. Simplifies the use of parallel storage not only for Linux clients, but also for Windows, Hadoop, and WebDAV. POSIX-compatible. Part of Linux kernel since version 4.6. |http://www.orangefs.org/}}<br />
* {{App|Sheepdog|Distributed object storage system for volume and container services and manages the disks and nodes intelligently.|https://sheepdog.github.io/sheepdog/}}<br />
* {{App|[[Wikipedia:Tahoe-LAFS|Tahoe-LAFS]]|Tahoe Least-Authority Filesystem is a free and open, secure, decentralized, fault-tolerant, peer-to-peer distributed data store and distributed file system.<br />
|https://tahoe-lafs.org/|{{AUR|tahoe-lafs}}}}<br />
<br />
== Identify existing file systems ==<br />
<br />
To identify existing file systems, you can use [[lsblk]]:<br />
<br />
{{hc|1=$ lsblk -f|2=<br />
NAME FSTYPE LABEL UUID MOUNTPOINT<br />
sdb <br />
└─sdb1 vfat Transcend 4A3C-A9E9 <br />
}}<br />
<br />
An existing file system, if present, will be shown in the {{ic|FSTYPE}} column. If [[mount]]ed, it will appear in the {{ic|MOUNTPOINT}} column.<br />
<br />
== Create a file system ==<br />
<br />
File systems are usually created on a [[partition]], inside logical containers such as [[LVM]], [[RAID]] and [[dm-crypt]], or on a regular file (see [[Wikipedia:Loop device]]). This section describes the partition case.<br />
<br />
{{Note|1=File systems can be written directly to a disk, known as a ''superfloppy'' or [[Partitioning#Partitionless disk|partitionless disk]]. Certain limitations are involved with this method, particularly if [[Arch boot process|booting]] from such a drive. See [[Btrfs#Partitionless Btrfs disk]] for an example.}}<br />
<br />
{{Warning|<br />
* After creating a new filesystem, data previously stored on this partition can unlikely be recovered. '''Create a backup of any data you want to keep'''.<br />
*The purpose of a given partition may restrict the choice of file system. For example, an [[EFI system partition]] must contain a [[FAT32]] file system, and the file system containing the {{ic|/boot}} directory must be supported by the [[boot loader]].<br />
}}<br />
<br />
Before continuing, [[lsblk|identify the device]] where the file system will be created and whether or not it is mounted. For example:<br />
<br />
{{hc|$ lsblk -f|<br />
NAME FSTYPE LABEL UUID MOUNTPOINT<br />
sda<br />
├─sda1 C4DA-2C4D <br />
├─sda2 ext4 5b1564b2-2e2c-452c-bcfa-d1f572ae99f2 /mnt<br />
└─sda3 56adc99b-a61e-46af-aab7-a6d07e504652 <br />
}}<br />
<br />
Mounted file systems '''must''' be [[#Unmount a file system|unmounted]] before proceeding. In the above example an existing filesystem is on {{ic|/dev/sda2}} and is mounted at {{ic|/mnt}}. It would be unmounted with:<br />
<br />
# umount /dev/sda2<br />
<br />
To find just mounted file systems, see [[#List mounted file systems]].<br />
<br />
To create a new file system, use {{man|8|mkfs}}. See [[#Types of file systems]] for the exact type, as well as userspace utilities you may wish to install for a particular file system.<br />
<br />
For example, to create a new file system of type [[ext4]] (common for Linux data partitions) on {{ic|/dev/sda1}}, run:<br />
<br />
# mkfs.ext4 /dev/sda1<br />
<br />
{{Tip|<br />
* Use the {{ic|-L}} flag of ''mkfs.ext4'' to specify a [[Persistent block device naming#by-label|file system label]]. ''e2label'' can be used to change the label on an existing file system.<br />
* File systems may be ''resized'' after creation, with certain limitations. For example, an [[XFS]] filesystem's size can be increased, but it cannot reduced. See [[Wikipedia:Comparison of file systems#Resize capabilities]] and the respective file system documentation for details.}}<br />
<br />
The new file system can now be mounted to a directory of choice.<br />
<br />
== Mount a file system ==<br />
<br />
To manually mount filesystem located on a device (e.g., a partition) to a directory, use {{man|8|mount}}. This example mounts {{ic|/dev/sda1}} to {{ic|/mnt}}.<br />
<br />
# mount /dev/sda1 /mnt<br />
<br />
This attaches the filesystem on {{ic|/dev/sda1}} at the directory {{ic|/mnt}}, making the contents of the filesystem visible. Any data that existed at {{ic|/mnt}} before this action is made invisible until the device is unmounted.<br />
<br />
[[fstab]] contains information on how devices should be automatically mounted if present. See the [[fstab]] article for more information on how to modify this behavior.<br />
<br />
If a device is specified in {{ic|/etc/fstab}} and only the device or mount point is given on the command line, that information will be used in mounting. For example, if {{ic|/etc/fstab}} contains a line indicating that {{ic|/dev/sda1}} should be mounted to {{ic|/mnt}}, then the following will automatically mount the device to that location:<br />
<br />
# mount /dev/sda1<br />
<br />
Or<br />
<br />
# mount /mnt<br />
<br />
''mount'' contains several options, many of which depend on the file system specified.<br />
The options can be changed, either by:<br />
* using flags on the command line with ''mount''<br />
* editing [[fstab]]<br />
* creating [[udev]] rules<br />
* [[Arch Build System|compiling the kernel yourself]]<br />
* or using filesystem-specific mount scripts (located at {{ic|/usr/bin/mount.*}}).<br />
<br />
See these related articles and the article of the filesystem of interest for more information.<br />
<br />
{{Tip|File systems can also be mounted with ''systemd-mount'' instead of ''mount''. If the mount point is not specified, the file system will be mounted at {{ic|/run/media/system/''device_identifier''/}}. This allows to easily mount a file system without having to decide where to mount it. See {{man|1|systemd-mount}} for usage and more details.}}<br />
<br />
=== List mounted file systems ===<br />
<br />
To list all mounted file systems, use {{man|8|findmnt}}:<br />
<br />
$ findmnt<br />
<br />
''findmnt'' takes a variety of arguments which can filter the output and show additional information. For example, it can take a device or mount point as an argument to show only information on what is specified:<br />
<br />
$ findmnt /dev/sda1<br />
<br />
''findmnt'' gathers information from {{ic|/etc/fstab}}, {{ic|/etc/mtab}}, and {{ic|/proc/self/mounts}}.<br />
<br />
=== Unmount a file system ===<br />
<br />
To unmount a file system use {{man|8|umount}}. Either the device containing the file system (e.g., {{ic|/dev/sda1}}) or the mount point (e.g., {{ic|/mnt}}) can be specified:<br />
<br />
# umount /dev/sda1<br />
<br />
or<br />
<br />
# umount /mnt<br />
<br />
== See also ==<br />
<br />
* {{man|5|filesystems}}<br />
* {{man|1|systemd-mount}}<br />
* [https://www.kernel.org/doc/Documentation/filesystems/ Documentation of file systems supported by linux]<br />
* [[Wikipedia:File systems]]<br />
* [[Wikipedia:Mount (Unix)]]</div>Pdchttps://wiki.archlinux.org/index.php?title=Mail_server&diff=581523Mail server2019-09-05T16:40:39Z<p>Pdc: Undo silliness</p>
<hr />
<div>[[Category:Mail server]]<br />
[[es:Mail server]]<br />
[[pt:Mail server]]<br />
A mail server consists of multiple components. A [[Wikipedia:Message transfer agent|mail transfer agent]] (MTA) receives and sends emails via [[Wikipedia:Simple Mail Transfer Protocol|SMTP]]. Received and accepted emails are then passed to a [[Wikipedia:Mail delivery agent|mail delivery agent]] (MDA), which stores the mail in a mailbox (usually in [[Wikipedia:mbox|mbox]] or [[Wikipedia:Maildir|Maildir]] format). If you want users to be able to remotely access their mail using [[email client]]s (MUA), you need to run a [[Wikipedia:Post Office Protocol|POP3]] and/or [[Wikipedia:IMAP|IMAP]] server.<br />
<br />
{{Text art|<nowiki><br />
+---------+ SMTP +---+ +---+ +----------------+<br />
|Other MTA| <----> |MTA| --|MDA|-> Storage <-- |POP3/IMAP server|<br />
+---------+ +---+ +---+ +----------------+<br />
^ ^<br />
| SMTP +---+ |<br />
+-------------|MUA|---------------+<br />
+---+<br />
</nowiki>}}<br />
<br />
== Software ==<br />
<br />
{{Expansion|Add {{Pkg|mailutils}} somewhere.|talk:mail server#Should mailutils be added somewhere to mail server#software?}}<br />
<br />
All of these software except Sendmail include a mail delivery agent.<br />
<br />
* {{App|[[Exim]]|A highly configurable mail transfer agent.|https://exim.org/|{{Pkg|exim}}}}<br />
* {{App|[[OpenSMTPD]]|A mail transfer agent, part of the OpenBSD project.|https://opensmtpd.org/|{{Pkg|opensmtpd}}}}<br />
* {{App|[[Postfix]]|A mail transfer agent, meant to be fast, easy to administer, and secure.|http://www.postfix.org/|{{Pkg|postfix}}}}<br />
* {{App|[[Sendmail]]|A well-known mail transfer agent.|http://www.sendmail.org/|{{AUR|sendmail}}}}<br />
<br />
=== POP3/IMAP servers ===<br />
<br />
* {{App|[[Courier]]|A mail transfer agent, providing POP3, IMAP, webmail and mailing list services as individual components.|https://www.courier-mta.org/|{{AUR|courier-mta}}}}<br />
* {{App|[[Wikipedia:Cyrus IMAP server|Cyrus IMAP]]|A mail transfer agent with a custom mail spool format, provides POP3 and IMAP services.|https://www.cyrusimap.org/|{{AUR|cyrus-imapd}}}}<br />
* {{App|[[Dovecot]]|An IMAP and POP3 server written to be secure, fast and simple to set up.|https://dovecot.org/|{{Pkg|dovecot}}}}<br />
* {{App|[[UW IMAP]]|An IMAP/POP server.|https://www.washington.edu/imap/|{{Pkg|imap}}}}<br />
<br />
=== Standalone MDAs ===<br />
<br />
* {{App|[[fdm]]|A simple program for delivering and filtering mail.|https://github.com/nicm/fdm|{{Pkg|fdm}}}}<br />
* {{App|[[Procmail]]|A program for filtering, sorting and storing email (unmaintained).|http://www.procmail.org/|{{Pkg|procmail}}}}<br />
* {{App|Maildrop|A mail filter/mail delivery agent used by the Courier Mail Server.|https://www.courier-mta.org/maildrop/|{{AUR|courier-maildrop}}}}<br />
<br />
See also [[Wikipedia:Comparison of e-mail servers]].<br />
<br />
== Ports ==<br />
<br />
{| class="wikitable"<br />
! Purpose !! Port !! Protocol !! Encryption<br />
|-<br />
| Accept mail from other MTAs. || 25 || SMTP || STARTTLS<br />
|-<br />
|rowspan=2| Accept submissions from MUAs. || 587 || SMTP || STARTTLS<br />
|-<br />
| 465 || [[Wikipedia:SMTPS|SMTPS]] || implicit TLS<br />
|-<br />
|rowspan=4| Let MUAs access mail.<br />
| 110 || POP3 || STARTTLS<br />
|-<br />
| 995 || POP3S || implicit TLS<br />
|-<br />
| 143 || IMAP || STARTTLS<br />
|-<br />
| 993 || IMAPS || implicit TLS<br />
|}<br />
<br />
{{Note|Implicit TLS is more secure than [[Wikipedia:Opportunistic TLS|STARTTLS]] because the latter is vulnerable to [[Wikipedia:Man-in-the-middle attack|man-in-the-middle attacks]]. For more information, see [https://serverfault.com/questions/523804/is-starttls-less-safe-than-tls-ssl] and [[RFC:8314]].}}<br />
<br />
== MX record ==<br />
<br />
Hosting a mail server requires a [[Wikipedia:Domain name|domain name]] with an [[Wikipedia:MX record|MX record]] pointing to the domain name of your mail transfer agent. <br />
The domain name used as the value of the MX record must map to at least one [[Wikipedia:A record|address record]] (A, AAAA) and must not have a [[Wikipedia:CNAME record|CNAME record]] to conform with [[RFC:2181#section-10.3|RFC 2181]], otherwise you may not get mail from some mail servers. Configuring DNS records is usually done from the configuration interface of your [[Wikipedia:Domain name registrar|domain name registrar]].<br />
<br />
== TLS ==<br />
<br />
{{Warning|If you deploy [[Wikipedia:TLS|TLS]], be sure to follow [[Server-side TLS]] to prevent vulnerabilities.}}<br />
<br />
To obtain a certificate, see [[OpenSSL#Usage]].<br />
<br />
== Authentication ==<br />
<br />
There are various [[Wikipedia:Email authentication|email authentication]] techniques.<br />
<br />
=== Sender Policy Framework ===<br />
<br />
From [[Wikipedia:Sender Policy Framework|Wikipedia]]:<br />
:'''Sender Policy Framework''' ('''SPF''') is an email validation protocol designed to detect and block email spoofing by providing a mechanism to allow receiving mail exchangers to verify that incoming mail from a domain comes from an IP Address authorized by that domain's administrators.<br />
<br />
To allow other mail exchangers to validate mails apparently sent from your domain, you need to set a DNS TXT record as explained in the [[Wikipedia:Sender Policy Framework|Wikipedia article]] (there is also [https://www.spfwizard.net/ an online wizard]). To validate incoming mail using SPF you need to configure your mail transfer agent to use a SPF implementation. There are several [http://www.openspf.org/Implementations SPF implementations] available, {{Pkg|libspf2}}, {{Pkg|perl-mail-spf}} and {{Pkg|perl-mail-spf-query}} can be found in the official repositories.<br />
<br />
{|class="wikitable sortable"<br />
|+ SPF validation support<br />
! [[Courier]]<br />
| {{Yes}}, built-in<br />
|-<br />
! [[Postfix]]<br />
| {{G|[[Postfix#Sender Policy Framework|Yes]]}}<br />
|-<br />
! [[Sendmail]]<br />
| {{G|through [[Wikipedia:Milter|Milter]] and {{AUR|spfmilter-acme}}}}<br />
|-<br />
! [[Exim]]<br />
| {{Y|[https://github.com/Exim/exim/wiki/SPF experimental], requires {{Pkg|libspf2}}}}<br />
|-<br />
! [[OpenSMTPD]]<br />
| {{No}}<br />
|-<br />
! [[Wikipedia:Cyrus IMAP server|Cyrus IMAP]]<br />
| {{C|?}}<br />
|}<br />
<br />
The following websites let you validate your SPF record:<br />
<br />
* [http://www.kitterman.com/spf/validate.html SPF Record Checker]<br />
* [http://www.appmaildev.com/en/spf SPF Email test]<br />
<br />
{{Tip|SPF can even be helpful for domains not used to send email. Publishing a policy like {{ic|1=v=spf1 -all}} makes any mail server enforcing SPF reject emails from your domain name, thus preventing misuse.}}<br />
<br />
=== Sender Rewriting Scheme ===<br />
<br />
The [[Wikipedia:Sender Rewriting Scheme|Sender Rewriting Scheme]] (SRS) is a secure scheme to allow forwardable bounces for server-side forwarded emails without breaking the [[#Sender Policy Framework|Sender Policy Framework]].<br />
<br />
For [[Postfix]], see [[Postfix#Sender Rewriting Scheme]].<br />
<br />
=== DKIM ===<br />
<br />
[[Wikipedia:DomainKeys Identified Mail|DomainKeys Identified Mail]] (DKIM) is a domain-level email authentication method designed to detect email spoofing.<br />
<br />
Available DKIM implementations are [[OpenDKIM]] and {{Pkg|dkimproxy}}.<br />
<br />
== Testing ==<br />
There are several options to help you test DNS records, deliver ability, and encryption support.<br />
<br />
=== Dedicated tools ===<br />
<br />
* {{Pkg|swaks}}<br />
<br />
=== Dedicated websites ===<br />
<br />
There are several handy web sites that can help you testing.<br />
<br />
* https://mxtoolbox.com/<br />
* http://ismyemailworking.com/<br />
* https://www.mail-tester.com/ (3 free tries only!)<br />
* https://www.checktls.com/<br />
* https://pingability.com/zoneinfo.jsp<br />
<br />
== Tips and tricks ==<br />
<br />
Most mail servers can be configured to strip users' IP addresses and [[Wikipedia:User agent|user agents]] from outgoing mail.<br />
<br />
Available extras that can usually be integrated are:<br />
<br />
* [[ClamAV]] for virus checking emails<br />
* [[SpamAssassin]] to identify and filter spam<br />
* [[Wikipedia:Sieve (mail filtering language)|Sieve]] – a mail filtering programming language<br />
* [[Wikipedia:Webmail|webmail]] like [[Roundcube]] or [[Squirrelmail]]</div>Pdchttps://wiki.archlinux.org/index.php?title=Microcode&diff=581517Microcode2019-09-05T16:36:06Z<p>Pdc: Undo revision 581514 by UsernameIsInvalid (talk)</p>
<hr />
<div>[[Category:CPU]]<br />
[[Category:Security]]<br />
[[de:Microcode]]<br />
[[es:Microcode]]<br />
[[ja:マイクロコード]]<br />
[[ru:Microcode]]<br />
[[zh-hans:Microcode]]<br />
Processor manufacturers release stability and security updates to the processor [[Wikipedia:Microcode|microcode]]. These updates provide bug fixes that can be critical to the stability of your system. Without them, you may experience spurious crashes or unexpected system halts that can be difficult to track down.<br />
<br />
All users with an AMD or Intel CPU should install the microcode updates to ensure system stability.<br />
<br />
Microcode updates are usually shipped with the motherboard's firmware and applied during firmware initialization. Since OEMs might not release firmware updates in a timely fashion and old systems do not get new firmware updates at all, the ability to apply CPU microcode updates during boot was added to the Linux kernel. [https://www.kernel.org/doc/Documentation/x86/microcode.txt The Linux microcode loader] supports three loading methods:<br />
<br />
# '''Early loading''' updates the microcode very early during boot, before the initramfs stage, so it is the preferred method. This is mandatory for CPUs with severe hardware bugs, like the Intel Haswell and Broadwell processor families.<br />
# '''Late loading''' updates the microcode after booting which could be too late since the CPU might have already tried to use a bugged instruction set. Even if already using early loading, late loading can still be used to apply a newer microcode update without needing to reboot.<br />
# '''Built-in microcode''' can be compiled into the kernel that is then applied by the early loader.<br />
<br />
== Early loading ==<br />
<br />
Microcode must be loaded by the [[boot loader]]. Because of the wide variability in users' early-boot configuration, microcode updates may not be triggered automatically by Arch's default configuration. Many AUR kernels have followed the path of the official Arch [[kernels]] in this regard.<br />
<br />
These updates must be enabled by adding {{ic|/boot/amd-ucode.img}} or {{ic|/boot/intel-ucode.img}} as the '''first initrd in the bootloader config file'''. This is in addition to the normal initrd file. See below for instructions for common bootloaders.<br />
<br />
{{Note|In the following sections replace {{ic|''cpu_manufacturer''}} with your CPU manufacturer, i.e. {{ic|amd}} or {{ic|intel}}.}}<br />
<br />
{{Tip|For [[Installing Arch Linux on a USB key|Arch Linux on a removable drive]] add both microcode files as {{ic|initrd}} to the boot loader configuration. Their order does not matter as long as they both are specified before the real initramfs image.}}<br />
<br />
=== Installation ===<br />
<br />
For AMD processors, [[install]] the {{Pkg|amd-ucode}} package.<br />
<br />
For Intel processors, [[install]] the {{Pkg|intel-ucode}} package.<br />
<br />
If your Arch installation is [[Installing Arch Linux on a USB key|on a removable drive]] that needs to have microcode for both manufacturer processors, install both packages.<br />
<br />
=== Configuration ===<br />
<br />
==== Enabling early microcode loading in custom kernels ====<br />
<br />
In order for early loading to work in custom kernels, "CPU microcode loading support" needs to be compiled into the kernel, '''not''' compiled as a module. This will enable the "Early load microcode" prompt which should be set to {{ic|Y}}.<br />
<br />
CONFIG_BLK_DEV_INITRD=Y<br />
CONFIG_MICROCODE=y<br />
CONFIG_MICROCODE_INTEL=Y<br />
CONFIG_MICROCODE_AMD=y<br />
<br />
==== GRUB ====<br />
<br />
''grub-mkconfig'' will automatically detect the microcode update and configure [[GRUB]] appropriately. After installing the microcode package, regenerate the GRUB config to activate loading the microcode update by running:<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
Alternatively, users that manage their GRUB config file manually can add {{ic|/boot/''cpu_manufacturer''-ucode.img}} (or {{ic|/''cpu_manufacturer''-ucode.img}} if {{ic|/boot}} is a separate partition) as follows:<br />
<br />
{{hc|/boot/grub/grub.cfg|<br />
...<br />
echo 'Loading initial ramdisk'<br />
initrd '''/boot/''cpu_manufacturer''-ucode.img''' /boot/initramfs-linux.img<br />
...<br />
}}<br />
<br />
Repeat it for each menu entry.<br />
<br />
==== systemd-boot ====<br />
<br />
Use the {{ic|initrd}} option to load the microcode, before the initial ramdisk, as follows:<br />
<br />
{{hc|/boot/loader/entries/''entry''.conf|<br />
title Arch Linux<br />
linux /vmlinuz-linux<br />
'''initrd /''cpu_manufacturer''-ucode.img'''<br />
initrd /initramfs-linux.img<br />
...<br />
}}<br />
<br />
The latest microcode {{ic|''cpu_manufacturer''-ucode.img}} must be available at boot time in your [[EFI system partition]] (ESP). The ESP must be mounted as {{ic|/boot}} in order to have the microcode updated every time {{Pkg|amd-ucode}} or {{Pkg|intel-ucode}} is updated. Otherwise, copy {{ic|/boot/''cpu_manufacturer''-ucode.img}} to your ESP at every update of the microcode package.<br />
<br />
{{Accuracy|What does this do, why isn't the above enough and why/how is it specific to this particular section?|section=Addition in EFI Boot stub}}<br />
<br />
For [[systemd-boot#Preparing kernels for /EFI/Linux|kernels that have been generated as a single file]] containing all initrd, cmdline and kernel, first generate the initrd to integrate by creating a new one as follows: <br />
<br />
{{bc|1=<br />
cat /boot/''cpu_manufacturer''-ucode.img /boot/initramfs-linux.img > my_new_initrd<br />
objcopy ... --add-section .initrd=my_new_initrd <br />
}}<br />
<br />
==== EFISTUB ====<br />
<br />
Append two {{ic|1=initrd=}} options:<br />
<br />
'''initrd=/''cpu_manufacturer''-ucode.img''' initrd=/initramfs-linux.img<br />
<br />
==== rEFInd ====<br />
<br />
Edit boot options in {{ic|/boot/refind_linux.conf}} and add {{ic|1=initrd=/boot/''cpu_manufacturer''-ucode.img}} (or {{ic|1=initrd=/''cpu_manufacturer''-ucode.img}} if {{ic|/boot}} is a separate partition) as the first initramfs. For example:<br />
<br />
"Boot using default options" "root=PARTUUID=''XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'' rw add_efi_memmap '''initrd=/boot/''cpu_manufacturer''-ucode.img''' initrd=/boot/initramfs-%v.img"<br />
<br />
Users employing [[rEFInd#Manual boot stanzas|manual stanzas]] in {{ic|''esp''/EFI/refind/refind.conf}} to define the kernels should simply add {{ic|1=initrd=/boot/''cpu_manufacturer''-ucode.img}} (or {{ic|/''cpu_manufacturer''-ucode.img}} if {{ic|/boot}} is a separate partition) as required to the options line, and not in the main part of the stanza. E.g.:<br />
<br />
options "root=PARTUUID=''XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'' rw add_efi_memmap '''initrd=/boot/''cpu_manufacturer''-ucode.img'''"<br />
<br />
==== Syslinux ====<br />
<br />
{{Note|There must be no spaces between the {{ic|''cpu_manufacturer''-ucode.img}} and {{ic|initramfs-linux.img}} initrd files. The {{ic|INITRD}} line must be exactly as illustrated below.}}<br />
<br />
Multiple initrd's can be separated by commas in {{ic|/boot/syslinux/syslinux.cfg}}:<br />
<br />
LABEL arch<br />
MENU LABEL Arch Linux<br />
LINUX ../vmlinuz-linux<br />
INITRD '''../''cpu_manufacturer''-ucode.img''',../initramfs-linux.img<br />
...<br />
<br />
==== LILO ====<br />
<br />
[[LILO]] and potentially other old bootloaders do not support multiple initrd images. In that case, {{ic|''cpu_manufacturer''-ucode.img}} and {{ic|initramfs-linux.img}} will have to be merged into one image.<br />
<br />
{{Warning|The merged image must be recreated after each kernel update!}}<br />
<br />
{{Note|The order is important. The original image {{ic|initramfs-linux.img}} must be placed '''after''' {{ic|''cpu_manufacturer''-ucode.img}} in the resulting image.}}<br />
<br />
To merge both images into one image named {{ic|initramfs-merged.img}}, the following command can be used:<br />
<br />
# cat /boot/''cpu_manufacturer''-ucode.img /boot/initramfs-linux.img > /boot/initramfs-merged.img<br />
<br />
Now, edit {{ic|/etc/lilo.conf}} to load the new image.<br />
<br />
...<br />
initrd=/boot/initramfs-merged.img<br />
...<br />
<br />
And run {{ic|lilo}} as root:<br />
<br />
# lilo<br />
<br />
== Late loading ==<br />
<br />
Late loading of microcode updates happens after the system has booted. It uses files in {{ic|/usr/lib/firmware/amd-ucode/}} and {{ic|/usr/lib/firmware/intel-ucode/}}.<br />
<br />
For AMD processors the microcode update files are provided by {{Pkg|linux-firmware}}.<br />
<br />
For Intel processors no package provides the microcode update files ({{Bug|59841}}). To use late loading you need to manually extract {{ic|intel-ucode/}} from Intel's provided archive.<br />
<br />
=== Enabling late microcode updates ===<br />
<br />
Unlike early loading, late loading of microcode updates on Arch Linux are enabled by default using {{ic|/usr/lib/tmpfiles.d/linux-firmware.conf}}. After boot the file gets parsed by {{man|8|systemd-tmpfiles-setup.service}} and CPU microcode gets updated.<br />
<br />
To manually reload the microcode, e.g. after updating the microcode files in {{ic|/usr/lib/firmware/amd-ucode/}} or {{ic|/usr/lib/firmware/intel-ucode/}}, run:<br />
<br />
# echo 1 > /sys/devices/system/cpu/microcode/reload<br />
<br />
This allows to apply newer microcode updates without rebooting the system. For {{Pkg|linux-firmware}} you can automate it with a [[pacman hook]], e.g.:<br />
<br />
{{hc|/etc/pacman.d/hooks/microcode_reload.hook|2=<br />
[Trigger]<br />
Operation = Install<br />
Operation = Upgrade<br />
Operation = Remove<br />
Type = File<br />
Target = usr/lib/firmware/amd-ucode/*<br />
<br />
[Action]<br />
Description = Applying CPU microcode updates...<br />
When = PostTransaction<br />
Depends = sh<br />
Exec = /bin/sh -c 'echo 1 > /sys/devices/system/cpu/microcode/reload'<br />
}}<br />
<br />
=== Disabling late microcode updates ===<br />
<br />
For AMD systems the CPU microcode will get updated even if {{Pkg|amd-ucode}} is not installed since the files in {{ic|/usr/lib/firmware/amd-ucode/}} are provided by the {{Pkg|linux-firmware}} package ({{Bug|59840}}).<br />
<br />
For [[virtual machine]]s and [[Wikipedia:Container (virtualization)|containers]] ({{Bug|46591}}) it is not possible to update the CPU microcode, so you may want to disable microcode updates. To do so, you must override the [[tmpfile]] {{ic|/usr/lib/tmpfiles.d/linux-firmware.conf}} that is provided by {{Pkg|linux-firmware}}. It can be done by creating a file with the same filename in {{ic|/etc/tmpfiles.d/}}:<br />
<br />
# ln -s /dev/null /etc/tmpfiles.d/linux-firmware.conf<br />
<br />
== Verifying that microcode got updated on boot ==<br />
<br />
Use ''dmesg'' to see if the microcode has been updated:<br />
<br />
$ dmesg | grep microcode<br />
<br />
On Intel systems one should see something similar to the following on every boot, indicating that microcode is updated very early on:<br />
<br />
[ 0.000000] CPU0 microcode updated early to revision 0x1b, date = 2014-05-29<br />
[ 0.221951] CPU1 microcode updated early to revision 0x1b, date = 2014-05-29<br />
[ 0.242064] CPU2 microcode updated early to revision 0x1b, date = 2014-05-29<br />
[ 0.262349] CPU3 microcode updated early to revision 0x1b, date = 2014-05-29<br />
[ 0.507267] microcode: CPU0 sig=0x306a9, pf=0x2, revision=0x1b<br />
[ 0.507272] microcode: CPU1 sig=0x306a9, pf=0x2, revision=0x1b<br />
[ 0.507276] microcode: CPU2 sig=0x306a9, pf=0x2, revision=0x1b<br />
[ 0.507281] microcode: CPU3 sig=0x306a9, pf=0x2, revision=0x1b<br />
[ 0.507286] microcode: CPU4 sig=0x306a9, pf=0x2, revision=0x1b<br />
[ 0.507292] microcode: CPU5 sig=0x306a9, pf=0x2, revision=0x1b<br />
[ 0.507296] microcode: CPU6 sig=0x306a9, pf=0x2, revision=0x1b<br />
[ 0.507300] microcode: CPU7 sig=0x306a9, pf=0x2, revision=0x1b<br />
[ 0.507335] microcode: Microcode Update Driver: v2.2.<br />
<br />
{{Note|The date displayed does not correspond to the version of the {{Pkg|intel-ucode}} package installed. It does show the last time Intel updated the microcode that corresponds to the specific hardware being updated.}}<br />
<br />
It is entirely possible, particularly with newer hardware, that there is no microcode update for the CPU. In that case, the output may look like this:<br />
<br />
[ 0.292893] microcode: CPU0 sig=0x306c3, pf=0x2, revision=0x1c<br />
[ 0.292899] microcode: CPU1 sig=0x306c3, pf=0x2, revision=0x1c<br />
[ 0.292906] microcode: CPU2 sig=0x306c3, pf=0x2, revision=0x1c<br />
[ 0.292912] microcode: CPU3 sig=0x306c3, pf=0x2, revision=0x1c<br />
[ 0.292956] microcode: Microcode Update Driver: v2.2.<br />
<br />
On AMD systems using early loading the output would look something like this:<br />
<br />
[ 2.119089] microcode: microcode updated early to new patch_level=0x0700010f<br />
[ 2.119157] microcode: CPU0: patch_level=0x0700010f<br />
[ 2.119171] microcode: CPU1: patch_level=0x0700010f<br />
[ 2.119183] microcode: CPU2: patch_level=0x0700010f<br />
[ 2.119189] microcode: CPU3: patch_level=0x0700010f<br />
[ 2.119269] microcode: Microcode Update Driver: v2.2.<br />
<br />
On AMD systems using late loading the output will show the version of the old microcode before reloading the microcode and the new one once it is reloaded. It would look something like this:<br />
<br />
[ 2.112919] microcode: CPU0: patch_level=0x0700010b<br />
[ 2.112931] microcode: CPU1: patch_level=0x0700010b<br />
[ 2.112940] microcode: CPU2: patch_level=0x0700010b<br />
[ 2.112951] microcode: CPU3: patch_level=0x0700010b<br />
[ 2.113043] microcode: Microcode Update Driver: v2.2.<br />
[ 6.429109] microcode: CPU2: new patch_level=0x0700010f<br />
[ 6.430416] microcode: CPU0: new patch_level=0x0700010f<br />
[ 6.431722] microcode: CPU1: new patch_level=0x0700010f<br />
[ 6.433029] microcode: CPU3: new patch_level=0x0700010f<br />
[ 6.433073] x86/CPU: CPU features have changed after loading microcode, but might not take effect.<br />
<br />
== Which CPUs accept microcode updates ==<br />
<br />
Users may consult either Intel or AMD at the following links to see if a particular model is supported:<br />
<br />
* [http://www.amd64.org/microcode.html AMD's Operating System Research Center]{{Dead link|2019|07|01}}.<br />
* [https://downloadcenter.intel.com/SearchResult.aspx?lang=eng&keyword=processor%20microcode%20data%20file Intel's download center].<br />
<br />
=== Detecting available microcode update ===<br />
<br />
It is possible to find out if the {{ic|intel-ucode.img}} contains a microcode image for the running CPU with {{Pkg|iucode-tool}}.<br />
<br />
# [[Install]] {{Pkg|intel-ucode}} (changing initrd is not required for detection)<br />
# [[Install]] {{Pkg|iucode-tool}}<br />
# {{bc|# modprobe cpuid}}<br />
# Extract microcode image and search it for your cpuid:<br/>{{bc|# bsdtar -Oxf /boot/intel-ucode.img {{!}} iucode_tool -tb -lS -}}<br />
# If an update is available, it should show up below ''selected microcodes''<br />
# The microcode might already be in your vendor bios and not show up loading in dmesg. Compare to the current microcode running {{ic|grep microcode /proc/cpuinfo}}<br />
<br />
== See also ==<br />
<br />
* [https://flossexperiences.wordpress.com/2013/11/17/updating-microcodes/ Updating microcodes – Experiences in the community]<br />
* [http://inertiawar.com/microcode/ Notes on Intel Microcode updates – Ben Hawkes]<br />
* [https://www.kernel.org/doc/Documentation/x86/microcode.txt Kernel microcode loader – kernel documentation]<br />
* [http://www.anandtech.com/show/8376/intel-disables-tsx-instructions-erratum-found-in-haswell-haswelleep-broadwelly Erratum found in Haswell/Broadwell – AnandTech]<br />
* [https://gitlab.com/iucode-tool/iucode-tool iucode-tool GitLab project]</div>Pdchttps://wiki.archlinux.org/index.php?title=Scheme&diff=581317Scheme2019-09-01T16:49:11Z<p>Pdc: /* Implementations */ Remove "Dead link" for Gambit Scheme home page: link is live on 2019-09-01</p>
<hr />
<div>[[Category:Lisp dialects]]<br />
[[ja:Scheme]]<br />
[[ru:Scheme]]<br />
According to [[Wikipedia:Scheme (programming language)|Wikipedia]]:<br />
<br />
:Scheme is a programming language that supports multiple paradigms, including functional programming and imperative programming, and is one of the two main dialects of [[Lisp]]. Unlike [[Common Lisp]], the other main dialect, Scheme follows a minimalist design philosophy specifying a small standard core with powerful tools for language extension. <br />
<br />
== Implementations ==<br />
<br />
* {{App|Bigloo|Fast scheme compiler|https://www-sop.inria.fr/mimosa/fp/Bigloo/|{{Pkg|bigloo}}}}<br />
* {{App|CHICKEN|Feature rich R5RS Scheme compiler and interpreter|http://call-cc.org/|{{Pkg|chicken}}}}<br />
* {{App|Gambit Scheme|Scheme R5RS interpreter and compiler|http://gambitscheme.org/|{{Pkg|gambit-c}}}}<br />
* {{App|Gauche|R5RS Scheme implementation (provides gosh)|https://practical-scheme.net/gauche/|{{Pkg|gauche}}}}<br />
* {{App|Guile|Portable, embeddable Scheme implementation written in C|https://www.gnu.org/software/guile/|{{Pkg|guile}}}}<br />
* {{App|MIT/GNU Scheme|MIT/GNU Scheme|https://www.gnu.org/software/mit-scheme/|{{Pkg|mit-scheme}}}}<br />
* {{App|Racket|A full-spectrum language with DrRacket IDE. Formerly known as PLT Scheme.|https://racket-lang.org/|{{Pkg|racket}}}}</div>Pdchttps://wiki.archlinux.org/index.php?title=Bcachefs&diff=577320Bcachefs2019-07-12T14:45:19Z<p>Pdc: /* See also */ fix typo</p>
<hr />
<div>[[Category:File systems]]<br />
[https://bcachefs.org/ Bcachefs] is a next-generation CoW filesystem that aims to provide features from [[Btrfs]] and [[ZFS]] with a cleaner codebase, more stability, greater speed and a GPL-compatible license.<br />
<br />
It is built upon [[Bcache]] and is mainly developed by Kent Overstreet.<br />
<br />
== Installation ==<br />
<br />
Bcachefs is not in the upstream [[Kernel]] yet but the {{AUR|linux-bcachefs-git}} kernel can be installed from the [[AUR]].<br />
<br />
The Bcachefs userspace tools are available from {{AUR|bcachefs-tools-git}}.<br />
<br />
== See also ==<br />
<br />
* [https://www.patreon.com/bcachefs Kent Overstreet's Patreon page]<br />
* [[Wikipedia:Bcachefs]]</div>Pdchttps://wiki.archlinux.org/index.php?title=OpenSSH&diff=575755OpenSSH2019-06-16T09:33:35Z<p>Pdc: /* Run command at login */ simplify unnecessary pipe</p>
<hr />
<div>[[Category:Secure Shell]]<br />
[[Category:Servers]]<br />
[[Category:OpenBSD]]<br />
[[de:SSH]]<br />
[[es:OpenSSH]]<br />
[[fa:SSH]]<br />
[[fr:ssh]]<br />
[[ja:Secure Shell]]<br />
[[pt:Secure Shell]]<br />
[[ru:OpenSSH]]<br />
[[zh-hans:Secure Shell]]<br />
{{Related articles start}}<br />
{{Related|SSH keys}}<br />
{{Related|Pam abl}}<br />
{{Related|fail2ban}}<br />
{{Related|sshguard}}<br />
{{Related|Sshfs}}<br />
{{Related|Syslog-ng}}<br />
{{Related|SFTP chroot}}<br />
{{Related|SCP and SFTP}}<br />
{{Related articles end}}<br />
<br />
[[Wikipedia:OpenSSH|OpenSSH]] (OpenBSD Secure Shell) is a set of computer programs providing encrypted communication sessions over a computer network using the [[Secure Shell]] (SSH) protocol. It was created as an open source alternative to the proprietary Secure Shell software suite offered by SSH Communications Security. OpenSSH is developed as part of the OpenBSD project, which is led by Theo de Raadt.<br />
<br />
OpenSSH is occasionally confused with the similarly-named OpenSSL; however, the projects have different purposes and are developed by different teams, the similar name is drawn only from similar goals.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|openssh}} package.<br />
<br />
== Client usage ==<br />
<br />
To connect to a server, run:<br />
<br />
$ ssh -p ''port'' ''user''@''server-address''<br />
<br />
If the server only allows public-key authentication, follow [[SSH keys]].<br />
<br />
=== Configuration ===<br />
<br />
The client can be configured to store common options and hosts. All options can be declared globally or restricted to specific hosts. For example:<br />
<br />
{{hc|~/.ssh/config|# global options<br />
User ''user''<br />
<br />
# host-specific options<br />
Host ''myserver''<br />
HostName ''server-address''<br />
Port ''port''<br />
}}<br />
<br />
With such a configuration, the following commands are equivalent<br />
<br />
$ ssh -p ''port'' ''user''@''server-address''<br />
$ ssh ''myserver''<br />
<br />
See {{man|5|ssh_config}} for more information.<br />
<br />
Some options do not have command line switch equivalents, but you can specify config options on the command line with {{ic|-o}}. For example {{ic|1=-oKexAlgorithms=+diffie-hellman-group1-sha1}}.<br />
<br />
== Server usage ==<br />
<br />
=== Configuration ===<br />
<br />
The SSH daemon configuration file can be found and edited in {{ic|/etc/ssh/ssh'''d'''_config}}.<br />
<br />
To allow access only for some users add this line:<br />
<br />
AllowUsers ''user1 user2''<br />
<br />
To allow access only for some groups:<br />
<br />
AllowGroups ''group1 group2''<br />
<br />
To add a nice welcome message (e.g. from the {{ic|/etc/issue}} file), configure the {{ic|Banner}} option:<br />
<br />
Banner /etc/issue<br />
<br />
Public and private host keys are automatically generated in {{ic|/etc/ssh}} by the ''sshd'' [[#Daemon management|service files]] on the first run after installation. Four key pairs are provided based on the algorithms [[SSH keys#Choosing the authentication key type|dsa, rsa, ecdsa and ed25519]]. To have sshd use a particular key, specify the following option:<br />
<br />
HostKey /etc/ssh/ssh_host_rsa_key<br />
<br />
If the server is to be exposed to the WAN, it is recommended to change the default port from 22 to a random higher one like this:<br />
Port 39901<br />
<br />
{{Tip|<br />
* To help select an alternative port that is not already assigned to a common service, review the [[Wikipedia:List of TCP and UDP port numbers|list of TCP and UDP port numbers]]. You can also find port information locally in {{ic|/etc/services}}. A port change from default port 22 will reduce the number of log entries caused by automated authentication attempts but will not eliminate them. See [[Port knocking]] for related information.<br />
* It is recommended to disable password logins entirely. This will greatly increase security, see [[#Force public key authentication]] for more information. See [[#Protection]] for more recommend security methods.<br />
* OpenSSH can listen to multiple ports simply by having multiple {{ic|Port ''port_number''}} lines in the config file.<br />
}}<br />
<br />
=== Daemon management ===<br />
<br />
{{Pkg|openssh}} comes with two kinds of [[systemd]] service files:<br />
<br />
# {{ic|sshd.service}}, which will keep the SSH daemon permanently active and fork for each incoming connection.[https://projects.archlinux.org/svntogit/packages.git/tree/trunk/sshd.service?h=packages/openssh#n16] It is especially suitable for systems with a large amount of SSH traffic.[https://projects.archlinux.org/svntogit/packages.git/tree/trunk/sshd.service?h=packages/openssh&id=4cadf5dff444e4b7265f8918652f4e6dff733812#n15] <br />
# {{ic|sshd.socket}} + {{ic|sshd@.service}}, which spawn on-demand instances of the SSH daemon per connection. Using it implies that ''systemd'' listens on the SSH socket and will only start the daemon process for an incoming connection. It is the recommended way to run {{ic|sshd}} in almost all cases.[https://projects.archlinux.org/svntogit/packages.git/tree/trunk/sshd.service?h=packages/openssh&id=4cadf5dff444e4b7265f8918652f4e6dff733812#n18][http://lists.freedesktop.org/archives/systemd-devel/2011-January/001107.html][http://0pointer.de/blog/projects/inetd.html]<br />
<br />
You can [[start]] and [[enable]] either {{ic|sshd.service}} '''or''' {{ic|sshd.socket}} to begin using the daemon.<br />
<br />
If using the socket service, you will need to [[edit]] the unit file if you want it to listen on a port other than the default 22:<br />
<br />
{{hc|# systemctl edit sshd.socket|<nowiki><br />
[Socket]<br />
ListenStream=<br />
ListenStream=12345<br />
</nowiki>}}<br />
<br />
{{Warning|Using {{ic|sshd.socket}} negates the {{ic|ListenAddress}} setting, so it will allow connections over any address. To achieve the effect of setting {{ic|ListenAddress}}, you must specify the port ''and'' IP for {{ic|ListenStream}} (e.g. {{ic|1=ListenStream=192.168.1.100:22}}). You must also add {{ic|1=FreeBind=true}} under {{ic|[Socket]}} or else setting the IP address will have the same drawback as setting {{ic|ListenAddress}}: the socket will fail to start if the network is not up in time.}}<br />
<br />
{{Tip|When using socket activation a transient instance of {{ic|sshd@.service}} will be started for each connection (with different instance names). Therefore, neither {{ic|sshd.socket}} nor the daemon's regular {{ic|sshd.service}} allow to monitor connection attempts in the log. The logs of socket-activated instances of SSH can be seen with {{ic|journalctl -u "sshd@*"}} or with {{ic|journalctl /usr/bin/sshd}}.}}<br />
<br />
{{Note|Even the {{ic|sshd.socket}} unit may fail (e.g. due to out-of-memory situation) and {{ic|1=Restart=always}} cannot be specified on socket units. [https://github.com/systemd/systemd/issues/11553]}}<br />
<br />
=== Protection ===<br />
<br />
Allowing remote log-on through SSH is good for administrative purposes, but can pose a threat to your server's security. Often the target of brute force attacks, SSH access needs to be limited properly to prevent third parties gaining access to your server.<br />
<br />
Several other good guides and tools are available on the topic, for example:<br />
<br />
* [[MozillaWiki:Security/Guidelines/OpenSSH|Article by Mozilla Infosec Team]]<br />
* [https://github.com/mozilla/ssh_scan Mozilla ssh_scan]<br />
* [https://stribika.github.io/2015/01/04/secure-secure-shell.html Secure sshd]<br />
<br />
==== Force public key authentication ====<br />
<br />
If a client cannot authenticate through a public key, by default the SSH server falls back to password authentication, thus allowing a malicious user to attempt to gain access by [[#Protecting against brute force attacks|brute-forcing]] the password. One of the most effective ways to protect against this attack is to disable password logins entirely, and force the use of [[SSH keys]]. This can be accomplished by disabling the following options in the daemon configuration file:<br />
<br />
{{hc|/etc/ssh/sshd_config|PasswordAuthentication no}}<br />
<br />
{{Warning|Before adding this to your configuration, make sure that all accounts which require SSH access have public-key authentication set up in the corresponding {{ic|authorized_keys}} files. See [[SSH keys#Copying the public key to the remote server]] for more information.}}<br />
<br />
==== Two-factor authentication and public keys ====<br />
<br />
SSH can be set up to require multiple ways of authentication, you can tell which authentication methods are required using the {{ic|AuthenticationMethods}} option. This enables you to use public keys as well as a two-factor authorization.<br />
<br />
See [[Google Authenticator]] to set up Google Authenticator.<br />
<br />
To use [[PAM]] with OpenSSH, edit the following files:<br />
<br />
{{hc|/etc/ssh/sshd_config|<br />
ChallengeResponseAuthentication yes<br />
AuthenticationMethods publickey keyboard-interactive:pam<br />
}}<br />
<br />
Then you can log in with either a publickey '''or''' the user authentication as required by your PAM setup.<br />
<br />
If, on the other hand, you want to authenticate the user on both a publickey '''and''' the user authentication as required by your PAM setup, use a comma instead of a space to separate the AuthenticationMethods:<br />
<br />
{{hc|/etc/ssh/sshd_config|<br />
ChallengeResponseAuthentication yes<br />
AuthenticationMethods publickey''','''keyboard-interactive:pam<br />
}}<br />
<br />
With required pubkey '''and''' pam authentication you may wish to disable the password requirement:<br />
<br />
{{hc|/etc/pam.d/sshd|<br />
auth required pam_securetty.so #disable remote root<br />
#Require google authenticator<br />
auth required pam_google_authenticator.so<br />
#But not password<br />
#auth include system-remote-login<br />
account include system-remote-login<br />
password include system-remote-login<br />
session include system-remote-login<br />
}}<br />
<br />
==== Protecting against brute force attacks ====<br />
<br />
Brute forcing is a simple concept: One continuously tries to log in to a webpage or server log-in prompt like SSH with a high number of random username and password combinations.<br />
<br />
===== Using ufw =====<br />
<br />
See [[ufw#Rate limiting with ufw]].<br />
<br />
===== Using iptables =====<br />
<br />
{{Merge|Simple stateful firewall#Bruteforce attacks|Out of scope, same technique as already described in the SSF.}}<br />
<br />
If you are already using iptables you can easily protect SSH against brute force attacks by using the following rules. <br />
<br />
{{note|In this example the SSH port was changed to port 42660 TCP.}}<br />
<br />
Before the following rules can be used we create a new rule chain to log and drop too many connection attempts:<br />
<br />
# iptables -N LOG_AND_DROP<br />
<br />
The first rule will be applied to packets that signal the start of new connections headed for TCP port 42660<br />
<br />
# iptables -A INPUT -p tcp -m tcp --dport 42660 -m state --state NEW -m recent --set --name DEFAULT --rsource<br />
<br />
The next rule tells iptables to look for packets that match the previous rule's parameters, and which also come from hosts already added to the watch list.<br />
<br />
# iptables -A INPUT -p tcp -m tcp --dport 42660 -m state --state NEW -m recent --update --seconds 90 --hitcount 4 --name DEFAULT --rsource -j LOG_AND_DROP<br />
<br />
Now iptables decides what to do with TCP traffic to port 42660 which does not match the previous rule.<br />
<br />
# iptables -A INPUT -p tcp -m tcp --dport 42660 -j ACCEPT<br />
<br />
We are appending this rule to the LOG_AND_DROP table, and we use the -j (jump) operator to pass the packet's information to the logging facility<br />
<br />
# iptables -A LOG_AND_DROP -j LOG --log-prefix "iptables deny: " --log-level 7<br />
<br />
After they are logged by the first rule, all packets are then dropped<br />
<br />
# iptables -A LOG_AND_DROP -j DROP<br />
<br />
===== Anti-brute-force tools =====<br />
<br />
You can protect yourself from brute force attacks by using an automated script that blocks anybody trying to brute force their way in, for example [[fail2ban]] or [[sshguard]].<br />
<br />
* Only allow incoming SSH connections from trusted locations<br />
* Use [[fail2ban]] or [[sshguard]] to automatically block IP addresses that fail password authentication too many times.<br />
* Use [https://github.com/jtniehof/pam_shield pam_shield] to block IP addresses that perform too many login attempts within a certain period of time. In contrast to [[fail2ban]] or [[sshguard]], this program does not take login success or failure into account.<br />
<br />
==== Limit root login ====<br />
<br />
{{Out of date|Root login has been disabled by default upstream in the current version. Unclear to me what parts of this section and subsections are redundant.}}<br />
<br />
It is generally considered bad practice to allow the root user to log in without restraint over SSH. There are two methods by which SSH root access can be restricted for increased security.<br />
<br />
===== Deny =====<br />
<br />
Sudo selectively provides root rights for actions requiring these without requiring authenticating against the root account. This allows locking the root account against access via SSH and potentially functions as a security measure against brute force attacks, since now an attacker must guess the account name in addition to the password.<br />
<br />
SSH can be configured to deny remote logins with the root user by editing the "Authentication" section in the daemon configuration file. Simply set {{ic|PermitRootLogin}} to {{ic|no}}:<br />
<br />
{{hc|/etc/ssh/sshd_config|PermitRootLogin no}}<br />
<br />
Next, [[restart]] the SSH daemon.<br />
<br />
You will now be unable to log in through SSH under root, but will still be able to log in with your normal user and use [[su]] or [[sudo]] to do system administration.<br />
<br />
===== Restrict =====<br />
<br />
Some automated tasks such as remote, full-system backup require full root access. To allow these in a secure way, instead of disabling root login via SSH, it is possible to only allow root logins for selected commands. This can be achieved by editing {{ic|~root/.ssh/authorized_keys}}, by prefixing the desired key, e.g. as follows:<br />
<br />
command="/usr/lib/rsync/rrsync -ro /" ssh-rsa …<br />
<br />
This will allow any login with this specific key only to execute the command specified between the quotes.<br />
<br />
The increased attack surface created by exposing the root user name at login can be compensated by adding the following to {{ic|sshd_config}}:<br />
<br />
PermitRootLogin forced-commands-only<br />
<br />
This setting will not only restrict the commands which root may execute via SSH, but it will also disable the use of passwords, forcing use of public key authentication for the root account.<br />
<br />
A slightly less restrictive alternative will allow any command for root, but makes brute force attacks infeasible by enforcing public key authentication. For this option, set:<br />
<br />
PermitRootLogin prohibit-password<br />
<br />
==== Securing the authorized_keys file ====<br />
<br />
For additional protection, you can prevent users from adding new public keys and connecting from them.<br />
<br />
In the server, make the {{ic|authorized_keys}} file read-only for the user and deny all other permissions:<br />
<br />
$ chmod 400 ~/.ssh/authorized_keys<br />
<br />
To keep the user from simply changing the permissions back, [[File permissions and attributes#chattr and lsattr|set the immutable bit]] on the {{ic|authorized_keys}} file. After that the user could rename the {{ic|~/.ssh}} directory to something else and create a new {{ic|~/.ssh}} directory and {{ic|authorized_keys}} file. To prevent this, set the immutable bit on the {{ic|~/.ssh}} directory too.<br />
<br />
{{Note|If you find yourself needing to add a new key, you will first have to remove the immutable bit from {{ic|authorized_keys}} and make it writable. Follow the steps above to secure it again.}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Encrypted SOCKS tunnel ===<br />
<br />
This is highly useful for laptop users connected to various unsafe wireless connections. The only thing you need is an SSH server running at a somewhat secure location, like your home or at work. It might be useful to use a dynamic DNS service like [http://www.dyndns.org/ DynDNS] so you do not have to remember your IP-address.<br />
<br />
==== Step 1: start the connection ====<br />
<br />
You only have to execute this single command to start the connection:<br />
<br />
$ ssh -TND 4711 ''user''@''host''<br />
<br />
where {{Ic|''user''}} is your username at the SSH server running at the {{Ic|''host''}}. It will ask for your password, and then you are connected. The {{Ic|N}} flag disables the interactive prompt, and the {{Ic|D}} flag specifies the local port on which to listen on (you can choose any port number if you want). The {{Ic|T}} flag disables pseudo-tty allocation.<br />
<br />
It is nice to add the verbose ({{Ic|-v}}) flag, because then you can verify that it is actually connected from that output.<br />
<br />
==== Step 2: configure your browser (or other programs) ====<br />
<br />
The above step is useful only in combination with a web browser or another program that uses this newly created SOCKS tunnel. Since SSH currently supports both SOCKS v4 and SOCKS v5, you can use either of them.<br />
<br />
* For Firefox: At ''Preferences > General'' navigates to the bottom of the page and click ''Settings...'', which is to the right of the Network Settings title. Next, within the new semi window, check the ''Manual proxy configuration'' option and enter {{ic|localhost}} in the ''SOCKS host'' text field, and the port number in the ''Port'' text field ({{ic|4711}} in the example above) next to it.<br />
:Firefox does not automatically make DNS requests through the socks tunnel. This potential privacy concern can be mitigated by scrolling further down, checking in the ''Proxy DNS when using SOCKS v5''. Obviously, this will only work if you chooses SOCKS v5 rather then v4.<br />
: Restart Firefox to activate these settings.<br />
<br />
* For Chromium: You can set the SOCKS settings as environment variables or as command line options. I recommend to add one of the following functions to your {{ic|.bashrc}}:<br />
<br />
function secure_chromium {<br />
port=4711<br />
export SOCKS_SERVER=localhost:$port<br />
export SOCKS_VERSION=5<br />
chromium &<br />
exit<br />
}<br />
<br />
OR<br />
<br />
function secure_chromium {<br />
port=4711<br />
chromium --proxy-server="socks://localhost:$port" &<br />
exit<br />
}<br />
<br />
Now open a terminal and just do:<br />
<br />
$ secure_chromium<br />
<br />
Enjoy your secure tunnel!<br />
<br />
=== X11 forwarding ===<br />
<br />
X11 forwarding is a mechanism that allows graphical interfaces of X11 programs running on a remote system to be displayed on a local client machine. For X11 forwarding the remote host does not need to have a full X11 system installed, however it needs at least to have ''xauth'' installed. ''xauth'' is a utility that maintains {{ic|Xauthority}} configurations used by server and client for authentication of X11 session ([http://xmodulo.com/2012/11/how-to-enable-x11-forwarding-using-ssh.html source]).<br />
<br />
{{Warning|X11 forwarding has important security implications which should be at least acknowledged by reading relevant sections of {{man|1|ssh}}, {{man|5|sshd_config}}, and {{man|5|ssh_config}} manual pages. See also [https://security.stackexchange.com/questions/14815/security-concerns-with-x11-forwarding this StackExchange question.]}}<br />
<br />
==== Setup ====<br />
<br />
===== Remote =====<br />
<br />
* [[install]] the {{Pkg|xorg-xauth}} and {{Pkg|xorg-xhost}} packages<br />
* in {{ic|/etc/ssh/ssh'''d'''_config}}:<br />
** set {{ic|X11Forwarding}} to ''yes''<br />
** verify that {{ic|AllowTcpForwarding}} and {{ic|X11UseLocalhost}} options are set to ''yes'', and that {{ic|X11DisplayOffset}} is set to ''10'' (those are the default values if nothing has been changed, see {{man|5|sshd_config}})<br />
* then [[restart]] the [[#Daemon management|''sshd'' daemon]].<br />
<br />
===== Client =====<br />
<br />
* [[install]] the {{Pkg|xorg-xauth}} package<br />
* enable the {{ic|ForwardX11}} option by either specifying the {{ic|-X}} switch on the command line for opportunistic connections, or by setting {{ic|ForwardX11}} to ''yes'' in the [[#Configuration|client's configuration]].<br />
<br />
{{Tip|You can enable the {{ic|ForwardX11Trusted}} option ({{ic|-Y}} switch on the command line) if GUI is drawing badly or you receive errors; this will prevent X11 forwardings from being subjected to the [http://www.x.org/wiki/Development/Documentation/Security/ X11 SECURITY extension] controls. Be sure you have read [[#X11 forwarding|the warning]] at the beginning of this section if you do so.}}<br />
<br />
==== Usage ====<br />
<br />
{{Accuracy|{{ic|xhost}} is [http://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-from-ubuntu-machine#comment17148_12772 generally not needed]|section=X11 forwarding}}<br />
<br />
Log on to the remote machine normally, specifying the {{ic|-X}} switch if ''ForwardX11'' was not enabled in the client's configuration file:<br />
<br />
$ ssh -X ''user@host''<br />
<br />
If you receive errors trying to run graphical applications, try ''ForwardX11Trusted'' instead:<br />
<br />
$ ssh -Y ''user@host''<br />
<br />
You can now start any X program on the remote server, the output will be forwarded to your local session:<br />
<br />
$ xclock<br />
<br />
If you get "Cannot open display" errors try the following command as the non root user:<br />
<br />
$ xhost +<br />
<br />
The above command will allow anybody to forward X11 applications. To restrict forwarding to a particular host type:<br />
<br />
$ xhost +hostname<br />
<br />
where hostname is the name of the particular host you want to forward to. See {{man|1|xhost}} for more details.<br />
<br />
Be careful with some applications as they check for a running instance on the local machine. [[Firefox]] is an example: either close the running Firefox instance or use the following start parameter to start a remote instance on the local machine:<br />
<br />
$ firefox --no-remote<br />
<br />
If you get "X11 forwarding request failed on channel 0" when you connect (and the server {{ic|/var/log/errors.log}} shows "Failed to allocate internet-domain X11 display socket"), make sure package {{Pkg|xorg-xauth}} is installed. If its installation is not working, try to either:<br />
<br />
* enable the {{ic|AddressFamily any}} option in {{ic|ssh'''d'''_config}} on the ''server'', or<br />
* set the {{ic|AddressFamily}} option in {{ic|ssh'''d'''_config}} on the ''server'' to inet.<br />
Setting it to inet may fix problems with Ubuntu clients on IPv4.<br />
<br />
For running X applications as other user on the SSH server you need to {{Ic|xauth add}} the authentication line taken from {{Ic|xauth list}} of the SSH logged in user.<br />
<br />
{{Tip|[http://unix.stackexchange.com/a/12772/29867 Here] are [http://unix.stackexchange.com/a/46748/29867 some] useful [http://superuser.com/a/805060/185665 links] for troubleshooting {{ic|X11 Forwarding}} issues.}}<br />
<br />
=== Forwarding other ports ===<br />
<br />
In addition to SSH's built-in support for X11, it can also be used to securely tunnel any TCP connection, by use of local forwarding or remote forwarding.<br />
<br />
Local forwarding opens a port on the local machine, connections to which will be forwarded to the remote host and from there on to a given destination. Very often, the forwarding destination will be the same as the remote host, thus providing a secure shell and, e.g. a secure [[VNC]] connection, to the same machine. Local forwarding is accomplished by means of the {{Ic|-L}} switch and it is accompanying forwarding specification in the form of {{Ic|<tunnel port>:<destination address>:<destination port>}}.<br />
<br />
Thus:<br />
<br />
$ ssh -L 1000:mail.google.com:25 192.168.0.100<br />
<br />
will use SSH to login to and open a shell on {{ic|192.168.0.100}}, and will also create a tunnel from the local machine's TCP port 1000 to mail.google.com on port 25. Once established, connections to {{ic|localhost:1000}} will connect to the Gmail SMTP port. To Google, it will appear that any such connection (though not necessarily the data conveyed over the connection) originated from {{ic|192.168.0.100}}, and such data will be secure between the local machine and 192.168.0.100, but not between {{ic|192.168.0.100}} and Google, unless other measures are taken.<br />
<br />
Similarly:<br />
<br />
$ ssh -L 2000:192.168.0.100:6001 192.168.0.100<br />
<br />
will allow connections to {{ic|localhost:2000}} which will be transparently sent to the remote host on port 6001. The preceding example is useful for VNC connections using the vncserver utility--part of the [[tightvnc]] package--which, though very useful, is explicit about its lack of security.<br />
<br />
Remote forwarding allows the remote host to connect to an arbitrary host via the SSH tunnel and the local machine, providing a functional reversal of local forwarding, and is useful for situations where, e.g., the remote host has limited connectivity due to firewalling. It is enabled with the {{Ic|-R}} switch and a forwarding specification in the form of {{Ic|<tunnel port>:<destination address>:<destination port>}}.<br />
<br />
Thus:<br />
<br />
$ ssh -R 3000:irc.freenode.net:6667 192.168.0.200<br />
<br />
will bring up a shell on {{ic|192.168.0.200}}, and connections from {{ic|192.168.0.200}} to itself on port 3000 (the remote host's {{ic|localhost:3000}}) will be sent over the tunnel to the local machine and then on to irc.freenode.net on port 6667, thus, in this example, allowing the use of IRC programs on the remote host to be used, even if port 6667 would normally be blocked to it.<br />
<br />
Both local and remote forwarding can be used to provide a secure "gateway", allowing other computers to take advantage of an SSH tunnel, without actually running SSH or the SSH daemon by providing a bind-address for the start of the tunnel as part of the forwarding specification, e.g. {{Ic|<tunnel address>:<tunnel port>:<destination address>:<destination port>}}. The {{Ic|<tunnel address>}} can be any address on the machine at the start of the tunnel. The address {{Ic|localhost}} allows connections via the {{ic|localhost}} or loopback interface, and an empty address or {{Ic|*}} allow connections via any interface. By default, forwarding is limited to connections from the machine at the "beginning" of the tunnel, i.e. the {{Ic|<tunnel address>}} is set to {{Ic|localhost}}. Local forwarding requires no additional configuration, however remote forwarding is limited by the remote server's SSH daemon configuration. See the {{Ic|GatewayPorts}} option in {{man|5|sshd_config}} and {{ic|-L address}} option in {{man|1|ssh}} for more information about remote forwarding and local forwarding, respectively.<br />
<br />
=== Jump hosts ===<br />
<br />
In certain scenarios, there might not be a direct connection to your target SSH daemon, and the use of a jump server (or bastion server) is required. Thus, we attempt to connect together two or more SSH tunnels, and assuming your local keys are authorized against each server in the chain. This is possible using SSH agent forwarding ({{ic|-A}}) and pseudo-terminal allocation ({{ic|-t}}) which forwards your local key with the following syntax:<br />
<br />
$ ssh -A -t -l user1 bastion1 \<br />
ssh -A -t -l user2 intermediate2 \<br />
ssh -A -t -l user3 target<br />
<br />
An easier way to do this is using the {{ic|-J}} flag:<br />
<br />
$ ssh -J user1@bastion1,user2@intermediate2 user3@target<br />
<br />
Multiple hosts in the {{ic|-J}} directive can be separted with a comma, they will be connected to in the order listed. The {{ic|user...@}} part is not required, but can be used. The host specifications for {{ic|-J}} use the ssh configuration file, so specific per-host options can be set there, if needed.<br />
<br />
=== Reverse SSH through a relay ===<br />
<br />
{{Style|The idea of SSH tunneling is classic, so some references for detailed explanation would be nice. E.g. [https://unix.stackexchange.com/questions/46235/how-does-reverse-ssh-tunneling-work/118650#118650] which includes other scenarios.}}<br />
<br />
The idea is that client connects to the server via another relay, while the server is connected to the same relay using a reverse SSH tunnel. This is for example useful when the server is behind a NAT and relay is a publicly accessible SSH server used as a proxy to which the user has access. So the prerequisite is that client's keys are authorized against both the relay and the server and server's need to be authorized against the relay as well for the reverse SSH connection.<br />
<br />
The following configuration example assumes that user1 is the user account used on client, user2 on relay and user3 on server. First the server needs to establish the reverse tunnel with:<br />
<br />
ssh -R 2222:localhost:22 -N user2@relay<br />
<br />
Which can also be automated with a startup script, systemd service or [[#Autossh - automatically restarts SSH sessions and tunnels|autossh]].<br />
<br />
{{Expansion|Explain why {{ic|ssh user3@relay -p 2222}} is not sufficient.}}<br />
<br />
At the client side the connection is established with:<br />
<br />
ssh user2@relay ssh user3@localhost -p 2222<br />
<br />
The remote command to establish the connection to reverse tunnel can also be defined in relay's {{ic|~/.ssh/authorized_keys}} by including the {{ic|command}} field as follows:<br />
<br />
command="ssh user3@localhost -p 2222" ssh-rsa KEY2 user1@client<br />
<br />
In this case the connection is established with:<br />
<br />
ssh user2@relay<br />
<br />
Note that SCP's autocomplete function in client's terminal is not working and even the SCP transfers themselves are not working under some configurations.<br />
<br />
=== Multiplexing ===<br />
<br />
The SSH daemon usually listens on port 22. However, it is common practice for many public internet hotspots to block all traffic that is not on the regular HTTP/S ports (80 and 443, respectively), thus effectively blocking SSH connections. The immediate solution for this is to have {{ic|sshd}} listen additionally on one of the whitelisted ports:<br />
<br />
{{hc|/etc/ssh/sshd_config|<br />
Port 22<br />
Port 443<br />
}}<br />
<br />
However, it is likely that port 443 is already in use by a web server serving HTTPS content, in which case it is possible to use a multiplexer, such as {{Pkg|sslh}}, which listens on the multiplexed port and can intelligently forward packets to many services.<br />
<br />
=== Speeding up SSH ===<br />
<br />
There are several [[#Configuration|client configuration]] options which can speed up connections either globally or for specific hosts. See {{man|5|ssh_config}} for full descriptions of these options.<br />
<br />
* ''Use a faster cipher'': on modern CPUs with AESNI instructions, {{ic|aes128-gcm@openssh.com}} and {{ic|aes256-gcm@openssh.com}} should offer significantly better performance over openssh's default preferred cipher, usually {{ic|chacha20-poly1305@openssh.com}}. Cipher can be selected {{ic|-c}} flag. For a permanent effect, put {{ic|Ciphers}} option in your ~/.ssh/config with ciphers in new preferred order, e.g.:<br />
*: {{bc|Ciphers aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr}}<br />
<br />
* ''Enable or disable compression'': compression can increase speed on slow connections, it is enabled with the {{ic|Compression yes}} option or the {{ic|-C}} flag. However the compression algorithm used is the relatively slow {{man|1|gzip}} which becomes the bottleneck on fast networks. In order to speed up the connection one should use the {{ic|Compression no}} option on local or fast networks.<br />
<br />
* ''Connection sharing'': you can make all sessions to the same host share a single connection using these options:<br />
*: {{bc|<nowiki><br />
ControlMaster auto<br />
ControlPersist yes<br />
ControlPath ~/.ssh/sockets/socket-%r@%h:%p<br />
</nowiki>}}<br />
: where {{ic|~/.ssh/sockets}} can be any directory not writable by other users.<br />
<br />
* {{ic|ControlPersist}} specifies how long the master should wait in the background for new clients after the initial client connection has been closed. Possible values are either: <br />
** {{ic|no}} to close the connection immediately after the last client disconnects, <br />
** a time in seconds,<br />
** {{ic|yes}} to wait forever, the connection will never be closed automatically.<br />
<br />
* Login time can be shortened by bypassing IPv6 lookup using the {{ic|AddressFamily inet}} option or {{ic|-4}} flag.<br />
<br />
* Last, if you intend to use SSH for SFTP or SCP, [https://www.psc.edu/index.php/hpn-ssh High Performance SSH/SCP] can significantly increase throughput by raising dynamically the SSH buffer sizes. Install the package {{AUR|openssh-hpn-git}} to use a patched version of OpenSSH with this enhancement.<br />
<br />
=== Mounting a remote filesystem with SSHFS ===<br />
<br />
Please refer to the [[SSHFS]] article to mount a SSH-accessible remote system to a local folder, so you will be able to do any operation on the mounted files with any tool (copy, rename, edit with vim, etc.). ''sshfs'' is generally preferred over ''shfs'', the latter has not been updated since 2004.<br />
<br />
=== Keep alive ===<br />
<br />
By default, the SSH session automatically logs out if it has been idle for a certain time. To keep the session up, the client can send a keep-alive signal to the server if no data has been received for some time, or symmetrically the server can send messages at regular intervals if it has not heard from the client.<br />
<br />
* On the '''server''' side, {{ic|ClientAliveInterval}} sets the timeout in seconds after which if no data has been received from the client, ''sshd'' will send a request for response. The default is 0, no message is sent. For example to request a response every 60 seconds from the client, set the {{ic|ClientAliveInterval 60}} option in your [[#Configuration_2|server configuration]]. See also the {{ic|ClientAliveCountMax}} and {{ic|TCPKeepAlive}} options.<br />
* On the '''client''' side, {{ic|ServerAliveInterval}} controls the interval between the requests for response sent from the client to the server. For example to request a response every 120 seconds from the server, add the {{ic|ServerAliveInterval 120}} option to your [[#Configuration|client configuration]]. See also the {{ic|ServerAliveCountMax}} and {{ic|TCPKeepAlive}} options.<br />
<br />
{{Note| To ensure a session is kept alive, only one of either the client or the server needs to send keep alive requests. If ones control both the servers and the clients, a reasonable choice is to only configure the clients that require a persistent session with a positive {{ic|ServerAliveInterval}} and leave other clients and servers in their default configuration.}}<br />
<br />
=== Automatically restart SSH tunnels with systemd ===<br />
<br />
[[systemd]] can automatically start SSH connections on boot/login ''and'' restart them when they fail. This makes it a useful tool for maintaining SSH tunnels.<br />
<br />
The following service can start an SSH tunnel on login using the connection settings in your [[#Configuration|ssh configuration]]. If the connection closes for any reason, it waits 10 seconds before restarting it:<br />
<br />
{{hc|~/.config/systemd/user/tunnel.service|<nowiki><br />
[Unit]<br />
Description=SSH tunnel to myserver<br />
<br />
[Service]<br />
Type=simple<br />
Restart=always<br />
RestartSec=10<br />
ExecStart=/usr/bin/ssh -F %h/.ssh/config -N myserver<br />
</nowiki>}}<br />
<br />
Then [[enable]] and [[start]] the [[Systemd/User]] service. See [[#Keep alive]] for how to prevent the tunnel from timing out. If you wish to start the tunnel on boot, you might want to [[Systemd#Writing_unit_files|rewrite the unit]] as a system service.<br />
<br />
=== Autossh - automatically restarts SSH sessions and tunnels ===<br />
<br />
When a session or tunnel cannot be kept alive, for example due to bad network conditions causing client disconnections, you can use {{Pkg|autossh}} to automatically restart them.<br />
<br />
Usage examples:<br />
<br />
$ autossh -M 0 -o "ServerAliveInterval 45" -o "ServerAliveCountMax 2" username@example.com<br />
<br />
Combined with [[SSHFS]]:<br />
<br />
$ sshfs -o reconnect,compression=yes,transform_symlinks,ServerAliveInterval=45,ServerAliveCountMax=2,ssh_command='autossh -M 0' username@example.com: /mnt/example <br />
<br />
Connecting through a SOCKS-proxy set by [[Proxy settings]]:<br />
<br />
$ autossh -M 0 -o "ServerAliveInterval 45" -o "ServerAliveCountMax 2" -NCD 8080 username@example.com <br />
<br />
With the {{ic|-f}} option autossh can be made to run as a background process. Running it this way however means the passphrase cannot be entered interactively.<br />
<br />
The session will end once you type {{ic|exit}} in the session, or the autossh process receives a SIGTERM, SIGINT of SIGKILL signal.<br />
<br />
==== Run autossh automatically at boot via systemd ====<br />
<br />
If you want to automatically start autossh, you can create a systemd unit file:<br />
<br />
{{hc|/etc/systemd/system/autossh.service|2=<br />
[Unit]<br />
Description=AutoSSH service for port 2222<br />
After=network.target<br />
<br />
[Service]<br />
Environment="AUTOSSH_GATETIME=0"<br />
ExecStart=/usr/bin/autossh -M 0 -NL 2222:localhost:2222 -o TCPKeepAlive=yes foo@bar.com<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
Here {{ic|1=AUTOSSH_GATETIME=0}} is an environment variable specifying how long ssh must be up before autossh considers it a successful connection, setting it to 0 autossh also ignores the first run failure of ssh. This may be useful when running autossh at boot. Other environment variables are available at {{man|1|autossh}}. Of course, you can make this unit more complex if necessary (see the systemd documentation for details), and obviously you can use your own options for autossh, but note that the {{ic|-f}} implying {{ic|1=AUTOSSH_GATETIME=0}} does not work with systemd. <br />
<br />
Remember to [[start]] and/or [[enable]] the service afterwards.<br />
<br />
You may also need to disable ControlMaster e.g.<br />
<br />
ExecStart=/usr/bin/autossh -M 0 -o ControlMaster=no -NL 2222:localhost:2222 -o TCPKeepAlive=yes foo@bar.com<br />
<br />
{{Tip|It is also easy to maintain several autossh processes, to keep several tunnels alive. Just create multiple service files with different names.}}<br />
<br />
=== Alternative service should SSH daemon fail ===<br />
<br />
For remote or headless servers which rely exclusively on SSH, a failure to start the SSH daemon (e.g., after a system upgrade) may prevent administration access. [[systemd]] offers a simple solution via {{ic|OnFailure}} option.<br />
<br />
Let us suppose the server runs {{ic|sshd}} and [[telnet]] is the fail-safe alternative of choice. Create a file as follows. Do '''not''' [[enable]] telnet.socket!<br />
<br />
{{hc|/etc/systemd/system/sshd.service.d/override.conf|2=<br />
[Unit]<br />
OnFailure=telnet.socket<br />
}}<br />
<br />
That's it. Telnet is not available when {{ic|sshd}} is running. Should {{ic|sshd}} fail to start, a telnet session can be opened for recovery.<br />
<br />
=== Terminal background color based on host ===<br />
<br />
To better distinguish when you are on different hosts, you can set a [https://bryangilbert.com/post/etc/term/dynamic-ssh-terminal-background-colors/ different background color based on the kind of host].<br />
<br />
This solution works, but is not universal (ZSH only).<br />
<br />
=== Network specific configuration ===<br />
<br />
You can use host configuration specific to the network you are connected to using a {{ic|Match exec}}.<br />
<br />
For example, when using nmcli, and the connection is configured (manually or through DHCP) to use a search-domain:<br />
<br />
{{bc|1=<br />
Match exec "nmcli {{!}} grep domains: {{!}} grep example.com"<br />
CanonicalDomains example.com<br />
# Should you use a different username on this network<br />
#User username<br />
# Use a different known_hosts file (for private network or synchronisation)<br />
#UserKnownHostsFile <network>_known_hosts<br />
}}<br />
<br />
=== Private networks hostkeys verification ===<br />
<br />
Because different servers on different networks are likely to share a common private IP address, you might want to handle them differently.<br />
<br />
{{Accuracy|The best solution would not need a warning to use something else in practice.}}<br />
<br />
The best solution is to use the [[#Network specific configuration]] to use a different {{ic|UserKnownHostsFile}} depending on the network you are on. The second solution, best used as default when you are working on new/prototype networks, would be to simply ignore hostkeys for private networks:<br />
<br />
{{bc|1=<br />
Host 10.* 192.168.*.* 172.31.* 172.30.* 172.2?.* 172.1?.*<br />
# Disable HostKey verification<br />
# Trust HostKey automatically<br />
StrictHostKeyChecking no<br />
# Do not save the HostKey<br />
UserKnownHostsFile=/dev/null<br />
# Do not display: "Warning: Permanently Added ..."<br />
LogLevel Error<br />
}}<br />
<br />
{{Accuracy|The {{ic|known_hosts}} file records an IP address even when you use hostname to access the server.}}<br />
<br />
{{Warning|In a production environment, make sure to either use the hostname to access the host and/or to use network specific known_hosts files.}}<br />
<br />
=== Run command at login ===<br />
<br />
If you are using an interactive session, there are multiple ways to execute a command on login:<br />
<br />
* use the {{ic|authorized_keys}} file on the remote host (see {{ic|AUTHORIZED_KEYS FILE FORMAT}} in {{man|8|sshd}})<br />
* use {{ic|~/.ssh/rc}} on the remote host if the server has enabled the {{ic|PermitUserRC}} option<br />
* use your shell config file on the remote host, e.g. {{ic|.bashrc}}<br />
<br />
{{Remove|Using {{ic|RemoteCommand}} and {{ic|RequestTTY}} in the config breaks execution of custom commands like {{ic|ssh ''host'' ''some command''}}, using {{ic|ssh -t ''host'' "cat /etc/os-release {{!}} grep '^NAME'; bash"}} is so long that it's not worth the effort. There is no point in showing these hacks.}}<br />
<br />
* use a combination of {{ic|RemoteCommand}} and {{ic|RequestTTY}} ({{ic|-t}})<br />
<br />
For example, to automatically show your host's distribution on login:<br />
<br />
$ ssh -t ''host'' "grep '^NAME' /etc/os-release; bash"<br />
<br />
Or using your config file:<br />
<br />
RemoteCommand grep '^NAME' /etc/os-release; bash<br />
RequestTTY yes<br />
<br />
== Troubleshooting ==<br />
<br />
=== Checklist ===<br />
<br />
Check these simple issues before you look any further.<br />
<br />
# The config directory {{ic|~/.ssh}}, its contents should be accessible only by the user (check this on both the client and the server), and the user's home folder should only be writable by the user: {{bc|<nowiki><br />
$ chmod go-w ~<br />
$ chmod 700 ~/.ssh<br />
$ chmod 600 ~/.ssh/*<br />
$ chown -R $USER ~/.ssh<br />
</nowiki>}}<br />
# Check that the client's public key (e.g. {{ic|id_rsa.pub}}) is in {{ic|~/.ssh/authorized_keys}} on the server.<br />
# Check that you did not limit SSH access with {{ic|AllowUsers}} or {{ic|AllowGroups}} in the [[#Configuration_2|server config]].<br />
# Check if the user has set a password. Sometimes new users who have not yet logged in to the server do not have a password.<br />
# [[Append]] {{ic|LogLevel DEBUG}} to {{ic|/etc/ssh/sshd_config}}.<br />
# Use {{ic|journalctl -xe}} for possible (error) messages.<br />
# [[Restart]] {{ic|sshd}} and logout/login on both client and server.<br />
<br />
=== Connection refused or timeout problem ===<br />
<br />
==== Port forwarding ====<br />
<br />
If you are behind a NAT mode/router (which is likely unless you are on a VPS or publicly addressed host), make sure that your router is forwarding incoming ssh connections to your machine. Find the server's internal IP address with {{ic|$ ip addr}} and set up your router to forward TCP on your SSH port to that IP. [http://portforward.com portforward.com] can help with that.<br />
<br />
==== Is SSH running and listening? ====<br />
<br />
The [[ss]] utility shows all the processes listening to a TCP port with the following command line:<br />
<br />
$ ss --tcp --listening<br />
<br />
If the above command do not show the system is listening to the port {{ic|ssh}}, then SSH is NOT running: check {{ic|/var/log/messages}} for errors etc.<br />
<br />
==== Are there firewall rules blocking the connection? ====<br />
<br />
[[Iptables]] may be blocking connections on port {{ic|22}}. Check this with:<br />
{{bc|# iptables -nvL}}<br />
and look for rules that might be dropping packets on the {{ic|INPUT}} chain. Then, if necessary, unblock the port with a command like: <br />
{{bc|<br />
# iptables -I INPUT 1 -p tcp --dport 22 -j ACCEPT<br />
}}<br />
For more help configuring firewalls, see [[firewalls]].<br />
<br />
==== Is the traffic even getting to your computer? ====<br />
<br />
Start a traffic dump on the computer you are having problems with:<br />
<br />
# tcpdump -lnn -i any port ssh and tcp-syn<br />
<br />
This should show some basic information, then wait for any matching traffic to happen before displaying it. Try your connection now. If you do not see any output when you attempt to connect, then something outside of your computer is blocking the traffic (e. g., hardware firewall, NAT router etc.).<br />
<br />
==== Your ISP or a third party blocking default port? ====<br />
<br />
{{Note|Try this step if you '''know''' you are not running any firewalls and you know you have configured the router for DMZ or have forwarded the port to your computer and it still does not work. Here you will find diagnostic steps and a possible solution.}}<br />
<br />
In some cases, your ISP might block the default port (SSH port 22) so whatever you try (opening ports, hardening the stack, defending against flood attacks, et al) ends up useless. To confirm this, create a server on all interfaces (0.0.0.0) and connect remotely. <br />
<br />
If you get an error message comparable to this:<br />
<br />
ssh: connect to host www.inet.hr port 22: Connection refused<br />
<br />
That means the port is '''not''' being blocked by the ISP, but the server does not run SSH on that port (See [[wikipedia:Security through obscurity|security through obscurity]]).<br />
<br />
However, if you get an error message comparable to this:<br />
<br />
ssh: connect to host 111.222.333.444 port 22: Operation timed out <br />
<br />
That means that something is rejecting your TCP traffic on port 22. Basically that port is stealth, either by your firewall or 3rd party intervention (like an ISP blocking and/or rejecting incoming traffic on port 22). If you know you are not running any firewall on your computer, and you know that Gremlins are not growing in your routers and switches, then your ISP is blocking the traffic.<br />
<br />
To double check, you can run Wireshark on your server and listen to traffic on port 22. Since Wireshark is a Layer 2 Packet Sniffing utility, and TCP/UDP are Layer 3 and above (see [[wikipedia:Internet protocol suite|IP Network stack]]), if you do not receive anything while connecting remotely, a third party is most likely to be blocking the traffic on that port to your server.<br />
<br />
===== Diagnosis =====<br />
<br />
[[Install]] either {{Pkg|tcpdump}} or Wireshark with the {{Pkg|wireshark-cli}} package.<br />
<br />
For tcpdump:<br />
<br />
# tcpdump -ni ''interface'' "port 22"<br />
<br />
For Wireshark:<br />
<br />
$ tshark -f "tcp port 22" -i ''interface''<br />
<br />
where {{ic|''interface''}} is the network interface for a WAN connection (see {{ic|ip a}} to check). If you are not receiving any packets while trying to connect remotely, you can be very sure that your ISP is blocking the incoming traffic on port 22.<br />
<br />
===== Possible solution =====<br />
<br />
The solution is just to use some other port that the ISP is not blocking. Open the {{ic|/etc/ssh/sshd_config}} and configure the file to use different ports. For example, add:<br />
<br />
Port 22<br />
Port 1234<br />
<br />
Also make sure that other "Port" configuration lines in the file are commented out. Just commenting "Port 22" and putting "Port 1234" will not solve the issue because then sshd will only listen on port 1234. Use both lines to run the SSH server on both ports. <br />
<br />
[[Restart]] the server {{ic|sshd.service}} and you are almost done. You still have to configure your client(s) to use the other port instead of the default port. There are numerous solutions to that problem, but let us cover two of them here.<br />
<br />
==== Read from socket failed: connection reset by peer ====<br />
<br />
Recent versions of openssh sometimes fail with the above error message when connecting to older ssh servers. This can be worked around by setting various [[#Configuration|client options]] for that host. See {{man|5|ssh_config}} for more information about the following options.<br />
<br />
The problem could be the {{ic|ecdsa-sha2-nistp*-cert-v01@openssh}} elliptical host key algorithms. These can be disabled by setting {{ic|HostKeyAlgorithms}} to a list excluding those algorithms.<br />
<br />
If that does not work, it could be that the list of ciphers is too long. Set the {{ic|Ciphers}} option to a shorter list (fewer than 80 characters should be enough). Similarly, you can also try shortening the list of {{ic|MACs}}.<br />
<br />
See also the [http://www.gossamer-threads.com/lists/openssh/dev/51339 discussion] on the openssh bug forum.<br />
<br />
=== "[your shell]: No such file or directory" / ssh_exchange_identification problem ===<br />
<br />
One possible cause for this is the need of certain SSH clients to find an absolute path (one returned by {{Ic|whereis -b [your shell]}}, for instance) in {{Ic|$SHELL}}, even if the shell's binary is located in one of the {{Ic|$PATH}} entries.<br />
<br />
==="Terminal unknown" or "Error opening terminal" error message===<br />
<br />
If you receive the above errors upon logging in, this means the server does not recognize your terminal. Ncurses applications like nano may fail with the message "Error opening terminal".<br />
<br />
The correct solution is to install the client terminal's terminfo file on the server. This tells console programs on the server how to correctly interact with your terminal. You can get info about current terminfo using {{ic|$ infocmp}} and then find out [[pacman#Querying package databases|which package owns it]].<br />
<br />
If you cannot [[install]] it normally, you can copy your terminfo to your home directory on the server:<br />
<br />
$ ssh myserver mkdir -p ~/.terminfo/${TERM:0:1}<br />
$ scp /usr/share/terminfo/${TERM:0:1}/$TERM myserver:~/.terminfo/${TERM:0:1}/<br />
<br />
After logging in and out from the server the problem should be fixed.<br />
<br />
==== TERM hack ====<br />
<br />
{{Note|This should only be used as a last resort.}}<br />
<br />
Alternatively, you can simply set {{ic|1=TERM=xterm}} in your environment on the server (e.g. in {{ic|.bash_profile}}). This will silence the error and allow ncurses applications to run again, but you may experience strange behavior and graphical glitches unless your terminal's control sequences exactly match xterm's.<br />
<br />
=== Connection closed by x.x.x.x [preauth] ===<br />
<br />
If you are seeing this error in your sshd logs, make sure you have set a valid HostKey<br />
<br />
HostKey /etc/ssh/ssh_host_rsa_key<br />
<br />
=== id_dsa refused by OpenSSH 7.0 ===<br />
<br />
OpenSSH 7.0 deprecated DSA public keys for security reasons. If you absolutely must enable them, set the [[#Configuration|config]] option {{ic|PubkeyAcceptedKeyTypes +ssh-dss}} (http://www.openssh.com/legacy.html does not mention this).<br />
<br />
=== No matching key exchange method found by OpenSSH 7.0 ===<br />
<br />
OpenSSH 7.0 deprecated the diffie-hellman-group1-sha1 key algorithm because it is weak and within theoretical range of the so-called Logjam attack (see http://www.openssh.com/legacy.html). If the key algorithm is needed for a particular host, ssh will produce an error message like this:<br />
<br />
Unable to negotiate with 127.0.0.1: no matching key exchange method found.<br />
Their offer: diffie-hellman-group1-sha1<br />
<br />
The best resolution for these failures is to upgrade/configure the server to not use deprecated algorithms. If that is not possible, you can force the client to reenable the algorithm with the [[#Configuration|client option]] {{ic|KexAlgorithms +diffie-hellman-group1-sha1}}.<br />
<br />
=== tmux/screen session killed when disconnecting from SSH ===<br />
<br />
If your processes get killed at the end of the session, it is possible that you are using socket activation and it gets killed by {{Pkg|systemd}} when it notices that the SSH session process exited. In that case there are two solutions. One is to avoid using socket activation by using {{ic|ssh.service}} instead of {{ic|ssh.socket}}. The other is to set {{ic|1=KillMode=process}} in the Service section of {{ic|ssh@.service}}.<br />
<br />
The {{ic|1=KillMode=process}} setting may also be useful with the classic {{ic|ssh.service}}, as it avoids killing the SSH session process or the {{Pkg|screen}} or {{Pkg|tmux}} processes when the server gets stopped or restarted.<br />
<br />
=== SSH session stops responding ===<br />
<br />
SSH responds to [[Wikipedia:Software flow control|flow control commands]] {{ic|XON}} and {{ic|XOFF}}. It will freeze/hang/stop responding when you hit {{ic|Ctrl+s}}. Use {{ic|Ctrl+q}} to resume your session.<br />
<br />
=== Broken pipe ===<br />
<br />
If you attempt to create a connection which results in a {{ic|Broken pipe}} response for {{ic|packet_write_wait}}, you should reattempt the connection in debug mode and see if the output ends in error:<br />
{{bc|debug3: send packet: type 1<br />
packet_write_wait: Connection to A.B.C.D port 22: Broken pipe}}<br />
The {{ic|send packet}} line above indicates that the reply packet was never received. So, it follows that this is a ''QoS'' issue. To decrease the likely-hood of a packet being dropped, set {{ic|IPQoS}}:<br />
{{hc|/etc/ssh/ssh_config|Host *<br />
IPQoS reliability}}<br />
The {{ic|reliability}} ({{ic|0x04}}) type-of-service should resolve the issue, as well as {{ic|0x00}} and {{ic|throughput}} ({{ic|0x08}}).<br />
<br />
=== Slow daemon startup after reboot ===<br />
<br />
If you are experiencing excessively long daemon startup times after reboots (e.g. several minutes before the daemon starts accepting connections), especially on headless or virtualized servers, it may be due to a lack of entropy.[https://bbs.archlinux.org/viewtopic.php?id=241954] This can be remedied by installing either [[Rng-tools]] or [[Haveged]], as appropriate for your system. However, take note of the associated security implications discussed in each package's respective wiki page.<br />
<br />
== See also ==<br />
<br />
* [http://www.la-samhna.de/library/brutessh.html Defending against brute force ssh attacks]<br />
* OpenSSH key management: [http://www.ibm.com/developerworks/library/l-keyc/index.html Part 1] on IBM developerWorks, [https://www.funtoo.org/OpenSSH_Key_Management,_Part_2 Part 2], [https://www.funtoo.org/OpenSSH_Key_Management,_Part_3 Part 3] on funtoo.org<br />
* [https://stribika.github.io/2015/01/04/secure-secure-shell.html Secure Secure Shell]</div>Pdchttps://wiki.archlinux.org/index.php?title=Termite&diff=575370Termite2019-06-13T16:42:04Z<p>Pdc: /* Colors */ add cursor_foreground to list of properties</p>
<hr />
<div>[[Category:Terminal emulators]]<br />
[[ja:Termite]]<br />
[[pl:Termite]]<br />
[https://www.github.com/thestinger/termite Termite] is a minimal VTE-based [[:Category:Terminal emulators|terminal emulator]]. It is a ''modal'' application, similar to [[Vim]], with an insert mode and selection mode where keybindings have different functions. Termite is based on the [https://developer.gnome.org/vte/unstable/ VTE] library.<br />
<br />
The configuration file allows to change colors and set some options. Termite supports transparency along with both the 256 color and true color (16 million colors) palettes. It has a similar look and feel to [[urxvt]].<br />
<br />
== Installation ==<br />
<br />
Install the {{Pkg|termite}} package, or {{AUR|termite-git}} for the development version. For Wayland tiling WM users, you may want to install {{AUR|termite-nocsd}} which disable client side decorations.<br />
<br />
== Usage ==<br />
<br />
Termite starts in insert mode by default. Text may be selected using the mouse, or by using selection-mode keys. In insert mode, {{ic|Ctrl+Shift+c}} is used to copy selected text to the [[X]] clipboard, {{ic|Ctrl+Shift+v}} to paste. {{ic|Ctrl+Tab}} starts scrollback completion, and {{ic|Ctrl+Shift+Up}} / {{ic|Ctrl+Shift+Down}} scroll the screen up or down.<br />
<br />
{{ic|Ctrl+Shift+Space}} enters selection-mode, similar to vim's normal-mode. Many commands are borrowed from [[Vim]], for example {{ic|v}} for visual mode, {{ic|Shift+v}} for visual line mode, {{ic|Ctrl+v}} for visual block mode, {{ic|y}} to copy ("yank") selected text, {{ic|/}} and {{ic|?}} for searching, {{ic|w}}, {{ic|b}}, {{ic|^}}, {{ic|$}} for movement, and {{ic|Escape}} to go back to insert mode.<br />
<br />
== Configuration ==<br />
Termite looks for configuration files in {{ic|$XDG_CONFIG_HOME/termite/config}}, {{ic|~/.config/termite/config}}, {{ic|$XDG_CONFIG_DIRS/termite/config}} and {{ic|/etc/xdg/termite.cfg}}. The configuration file is used to change options such as font, colors, window hints, etc. The configuration file syntax is inspired by [https://standards.freedesktop.org/desktop-entry-spec/latest/ XDG Desktop Entry Specification] [[.desktop]] files (inspired by Microsoft Windows ''.ini'' files), with three sections: ''options'', ''colors'', and ''hints''.<br />
<br />
To start customizing termite copy the base example file to your home dir first:<br />
$ cp /etc/xdg/termite/config ~/.config/termite/config<br />
<br />
=== Font ===<br />
Fonts are specified in the format {{ic|1=font=<font_name> <font_size>}} under the ''options'' section. {{ic|<font_name>}} is specified according to [[fontconfig]], not [[X Logical Font Description|Xft]]. Use {{ic|fc-list}} to see which fonts are available on the system (see also [[Font configuration#Font paths]]).<br />
<br />
{{hc|~/.config/termite/config|2=<br />
[options]<br />
font = Monospace 9<br />
font = xos4 Terminus 12px<br />
font = Droid Sans Mono 8}}<br />
<br />
=== Colors ===<br />
Colors consist of either a 24-bit hex value (e.g. {{ic|#4a32b1}}), or an rgba vector (e.g. {{ic|rgba(16, 32, 64, 0.5)}}). Valid properties for colors are {{ic|foreground}}, {{ic|foreground_bold}}, {{ic|foreground_dim}}, {{ic|background}}, {{ic|cursor}}, {{ic|cursor_foreground}}, and {{ic|colorN}} (where N is an integer from zero through 254; used to assign a 24-bit color value to terminal colorN).<br />
<br />
An amazing collection of termite color schemes can be found here: https://github.com/khamer/base16-termite/tree/master/themes<br />
<br />
{{hc|~/.config/termite/config|2=<br />
[colors]<br />
foreground = #dcdccc<br />
background = #3f3f3f}}<br />
<br />
== Transparency ==<br />
As of version 9, Termite supports true transparency via color definitions that specify an alpha channel value [https://github.com/thestinger/termite/issues/191]. This requires a compositor to be running, such as [[Compton]] or {{pkg|xcompmgr}}. Most compositors do not require special configuration for Termite to use transparency.<br />
<br />
{{hc|~/.config/termite/config|2=<br />
[colors]<br />
background = rgba(63, 63, 63, 0.8)<br />
}}<br />
<br />
{{Note|In [[i3]], in stacked/tabbed layout, this shows all windows "stacked" on top of each other, in the order they were most recently in the foreground, rather than showing the desktop (the root window) directly behind Termite. This is due to i3 reordering windows rather than hiding invisible windows in tiling mode. You can configure your compositor to make windows with {{ic|1=_NET_WM_STATE=_NET_WM_STATE_HIDDEN}} fully transparent to solve this. For example, for compton use<br />
{{hc|head=~/.compton.conf|output=opacity-rule = [<br />
"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"<br />
];}}<br />
}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Ctrl+Shift+t ===<br />
<br />
If opening a new tab through {{ic|Ctrl+Shift+t}} fails with {{ic|no directory uri set}}, [[source]] {{ic|/etc/profile.d/vte.sh}}. See [[GNOME/Tips and tricks#New terminals adopt current directory]].<br />
<br />
If it continues to fail, ensure your [[hostname]] is valid. See {{man|7|hostname}}.<br />
<br />
=== Remote SSH error ===<br />
<br />
When Termite is using remote SSH connection sometimes the error occurs: ''Error opening terminal: xterm-termite.'' or ''Open terminal failed: missing or unsuitable terminal: xterm-termite.''<br />
<br />
This error can occur when trying to edit file with vim or nano. To fix this issue you should execute this command on the remote system:<br />
<br />
$ export TERM=xterm-color<br />
<br />
Alternatively, follow the instructions on Termite's [https://github.com/thestinger/termite#terminfo GitHub]. This will allow you to use all of Termite's features when using SSH, whereas the above may not. [https://github.com/thestinger/termite/issues/229#issuecomment-250659169]<br />
<br />
== See also ==<br />
<br />
* [https://github.com/thestinger/termite/blob/master/README.rst Termite readme]</div>Pdchttps://wiki.archlinux.org/index.php?title=List_of_applications/Utilities&diff=570013List of applications/Utilities2019-03-28T20:24:50Z<p>Pdc: /* Terminal multiplexers */ dtach moved to AUR</p>
<hr />
<div><noinclude><br />
[[Category:Applications]]<br />
[[Category:Lists of software]]<br />
[[es:List of applications/Utilities]]<br />
[[it:List of applications/Utilities]]<br />
[[ja:アプリケーション一覧/ユーティリティ]]<br />
[[ru:List of applications/Utilities]]<br />
[[zh-hans:List of applications/Utilities]]<br />
[[zh-hant:List of applications/Utilities]]<br />
{{List of applications navigation}}<br />
</noinclude><br />
== Utilities ==<br />
<br />
=== Terminal ===<br />
<br />
==== Command shells ====<br />
<br />
See the main article: [[Command-line shell]].<br />
<br />
See also [[Wikipedia:Comparison of command shells]].<br />
<br />
==== Terminal emulators ====<br />
<br />
Terminal emulators show a GUI Window that contains a terminal. Most emulate Xterm, which in turn emulates VT102, which emulates typewriter. For further background information, see [[Wikipedia:Terminal emulator]].<br />
<br />
For a comprehensive list, see [[Wikipedia:List of terminal emulators]].<br />
<br />
* {{App|Alacritty|A cross-platform, GPU-accelerated terminal emulator.|https://github.com/jwilm/alacritty|{{Pkg|alacritty}}}}<br />
* {{App|aterm|Xterm replacement with transparency support. It has been deprecated in favour of urxvt since 2008.|http://aterm.sourceforge.net/|{{AUR|aterm}}}}<br />
* {{App|Cool Retro Term|A good looking terminal emulator which mimics the old cathode display.|https://github.com/Swordfish90/cool-retro-term|{{Pkg|cool-retro-term}}}}<br />
* {{App|Eterm|Terminal emulator intended as a replacement for xterm and designed for the [[Enlightenment]] desktop.|http://eterm.org{{Dead link|2018|01|17}}|{{AUR|eterm}}}}<br />
* {{App|Gate One|Web-based terminal emulator and SSH client.|https://github.com/liftoff/GateOne|{{AUR|gateone-git}}}}<br />
* {{App|Hyper|A terminal with JS/CSS support.|https://github.com/zeit/hyper|{{AUR|hyper}}}}<br />
* {{App|[[Wikipedia:Konsole|Konsole]]|Terminal emulator included in the [[KDE]] desktop.|https://www.kde.org/applications/system/konsole/|{{Pkg|konsole}}}}<br />
* {{App|[[kitty]]|A modern, hackable, featureful, OpenGL based terminal emulator|https://github.com/kovidgoyal/kitty|{{Pkg|kitty}}}}<br />
* {{App|mlterm|A multi-lingual terminal emulator supporting various character sets and encodings in the world.|https://sourceforge.net/projects/mlterm/|{{AUR|mlterm}}}}<br />
* {{App|[[PuTTY]]|Highly configurable ssh/telnet/serial console program.|https://www.chiark.greenend.org.uk/~sgtatham/putty/|{{Pkg|putty}}}}<br />
* {{App|QTerminal|Lightweight Qt-based terminal emulator.|https://github.com/qterminal/qterminal|{{Pkg|qterminal}}}}<br />
* {{App|[[Wikipedia:Rxvt|rxvt]]|Popular replacement for the xterm.|http://rxvt.sourceforge.net/|{{AUR|rxvt}}}}<br />
* {{App|shellinabox|A web-based SSH Terminal|https://github.com/shellinabox/shellinabox|{{AUR|shellinabox-git}}}}<br />
* {{App|[[st]]|Simple terminal implementation for X.|http://st.suckless.org|{{AUR|st}}}}<br />
* {{App|Terminology|Terminal emulator by the Enlightenment project team with innovative features: file thumbnails and media play like a media player.|https://www.enlightenment.org/about-terminology|{{Pkg|terminology}}}}<br />
* {{App|[[urxvt]]|Highly extendable (with Perl) unicode enabled rxvt-clone terminal emulator featuring tabbing, url launching, a Quake style drop-down mode and pseudo-transparency.|http://software.schmorp.de/pkg/rxvt-unicode.html|{{Pkg|rxvt-unicode}}}}<br />
* {{App|[[xterm]]|Simple terminal emulator for the X Window System. It provides DEC VT102 and Tektronix 4014 compatible terminals for programs that can't use the window system directly.|http://invisible-island.net/xterm/|{{Pkg|xterm}}}}<br />
* {{App|[[Yakuake]]|Drop-down terminal (Quake style) emulator based on Konsole.|https://yakuake.kde.org/|{{Pkg|yakuake}}}}<br />
<br />
===== VTE-based =====<br />
<br />
[https://developer.gnome.org/vte/unstable/ VTE] (Virtual Terminal Emulator) is a widget developed during early GNOME days for use in the GNOME Terminal. It has since given birth to many terminals with similar capabilities.<br />
<br />
* {{App|Deepin Terminal|Terminal emulation application for Deepin desktop.|https://www.deepin.org/en/original/deepin-terminal/|{{Pkg|deepin-terminal}}}}<br />
* {{App|evilvte|Very lightweight and highly customizable terminal emulator with support for tabs, auto-hiding and different encodings.|http://calno.com/evilvte/|{{AUR|evilvte-git}}}}<br />
* {{App|Germinal|Minimalist terminal emulator which provides a borderless maximized terminal, attached to a tmux session by default, hence providing tabs and panels.|http://www.imagination-land.org/tags/germinal.html|{{AUR|germinal}}}}<br />
* {{App|[[Wikipedia:GNOME Terminal|GNOME Terminal]]|A terminal emulator included in the [[GNOME]] desktop with support for Unicode and pseudo-transparency.|https://wiki.gnome.org/Apps/Terminal|{{Pkg|gnome-terminal}}}}<br />
* {{App|[[Guake]]|Drop-down terminal for the GNOME desktop.|http://guake-project.org/|{{Pkg|guake}}}}<br />
* {{App|LXTerminal|Desktop independent terminal emulator for [[LXDE]].|https://wiki.lxde.org/en/LXTerminal|{{Pkg|lxterminal}}}}<br />
* {{App|MATE terminal|A fork of [[Wikipedia:GNOME terminal]] for the [[MATE]] desktop.|http://www.mate-desktop.org/|{{Pkg|mate-terminal}}}}<br />
* {{App|Pantheon Terminal|A super lightweight, beautiful, and simple terminal emulator. It's designed to be setup with sane defaults and little to no configuration.|https://github.com/elementary/terminal|{{Pkg|pantheon-terminal}}}}<br />
* {{App|ROXTerm|Tabbed terminal emulator with a small footprint.|http://roxterm.sourceforge.net/|{{AUR|roxterm}}}}<br />
* {{App|sakura|Terminal emulator based on GTK+ and VTE.|http://www.pleyades.net/david/projects/sakura|{{Pkg|sakura}}}}<br />
* {{App|[[Terminator]]|Terminal emulator supporting multiple resizable terminal panels.|https://gnometerminator.blogspot.com/|{{Pkg|terminator}}}}<br />
* {{App|[[Termite]]|Keyboard-centric VTE-based terminal, aimed at use within a window manager with tiling and/or tabbing support.|https://github.com/thestinger/termite|{{Pkg|termite}}}}<br />
* {{App|[[Tilda]]|Configurable drop down terminal emulator.|https://github.com/lanoxx/tilda/|{{Pkg|tilda}}}}<br />
* {{App|Tilix|Tiling terminal emulator for GNOME.|https://gnunn1.github.io/tilix-web/|{{Pkg|tilix}}}}<br />
* {{App|tinyterm|Very lightweight terminal emulator based on VTE.|https://github.com/lahwaacz/tinyterm|{{AUR|tinyterm-git}}}}<br />
* {{App|[[Wikipedia:Terminal (Xfce)|Xfce Terminal]]|Terminal emulator included in the [[Xfce]] desktop with support for a colorized prompt and a tabbed interface.|https://docs.xfce.org/apps/terminal/start|{{Pkg|xfce4-terminal}}}}<br />
<br />
===== KMS-based =====<br />
<br />
The following terminal emulators are based on the [[kernel mode setting]] that could be invoked without X.<br />
* {{App|[[KMSCON]]|A KMS/DRM-based system console(getty) with an integrated terminal emulator for Linux operating systems.|https://github.com/dvdhrm/kmscon|{{Pkg|kmscon}}}}<br />
<br />
===== framebuffer-based =====<br />
<br />
In the GNU/Linux world, the [[Wikipedia:Framebuffer|framebuffer]] can refer to a virtual device in the Linux kernel ('''fbdev''') or the virtual framebuffer system for X ('''xvfb'''). This section mainly lists the terminal emulators based on the in-kernel virtual device, i.e. '''fbdev'''.<br />
<br />
* {{App|yaft|A simple terminal emulator for living without X, with UCS2 glyphs, wallpaper and 256color support.|https://github.com/uobikiemukot/yaft|{{aur|yaft}}}}<br />
<br />
==== Terminal pagers ====<br />
<br />
See also [[Wikipedia:Terminal pager]].<br />
<br />
* {{App|[[Wikipedia:More_(command)|more]]|A simple and feature-light pager. It is a part of util-linux.|https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/about/|{{Pkg|util-linux}}}}<br />
* {{App|[[Core_utilities#Essentials|less]]|A program similar to more, but with support for both forward and backward scrolling, as well as partial loading of files.|https://www.gnu.org/software/less/|{{Pkg|less}}}}<br />
* {{App|[[Wikipedia:Most_(Unix)|most]]|A pager with support for multiple windows, left and right scrolling, and built-in colour support|http://www.jedsoft.org/most/|{{Pkg|most}}}}<br />
* {{App|mcview|A pager with mouse and colour support. It is bundled with midnight commander.|http://midnight-commander.org/|{{Pkg|mc}}}}<br />
* [[Vim]] can [[Vim#Vim as a pager|also be used as a pager]].<br />
<br />
==== Terminal multiplexers ====<br />
<br />
See also [[Wikipedia:Terminal multiplexer]].<br />
<br />
* {{App|abduco|Tool for session attach and detach support which allows a process to run independently from its controlling terminal.|http://www.brain-dump.org/projects/abduco/|{{Pkg|abduco}}}}<br />
* {{App|[[Wikipedia:Byobu (software)|byobu]]|An GPLv3 licensed addon for tmux or screen. It requires a terminal multiplexer installed.|http://byobu.co/|{{AUR|byobu}}}}<br />
* {{App|[[dtach]]|Program that emulates the detach feature of [[GNU Screen]].|http://dtach.sourceforge.net/|{{AUR|dtach}}}}<br />
* {{App|dvtm|[[dwm]]-style window manager in the console.|http://brain-dump.org/projects/dvtm/|{{Pkg|dvtm}}}}<br />
* {{App|[[GNU Screen]]|Full-screen window manager that multiplexes a physical terminal.|https://www.gnu.org/software/screen/|{{Pkg|screen}}}}<br />
* {{App|mtm|Simple terminal multiplexer with just four commands: change focus, split, close, and screen redraw.|https://github.com/deadpixi/mtm|{{AUR|mtm-git}}}}<br />
* {{App|[[tmux]]|BSD licensed terminal multiplexer.|https://tmux.github.io/|{{Pkg|tmux}}}}<br />
<br />
=== Files ===<br />
<br />
==== File managers ====<br />
<br />
See also [[Wikipedia:Comparison of file managers]].<br />
<br />
===== Console =====<br />
<br />
* {{App|Clex|File manager with full-screen user interface|http://www.clex.sk/|{{Aur|clex}}}}<br />
* {{App|ded|directory editor, file manager similar to Emacs dired|http://invisible-island.net/ded/ded.html|{{AUR|ded}}}}<br />
* {{App|[[Wikipedia:Dired|Dired]]|Directory editor integrated with [[Emacs]].|https://www.gnu.org/software/emacs/manual/html_node/emacs/Dired.html|{{pkg|emacs}}}}<br />
* {{App|Last File Manager|Powerful file manager written in Python 3 with a curses interface.|https://inigo.katxi.org/devel/lfm/|{{AUR|lfm3-hg}}}}<br />
* {{App|lf|Terminal file manager written in Go using server/client architecture.|https://github.com/gokcehan/lf|{{aur|lf-git}}}}<br />
* {{App|[[Midnight Commander]]|Console-based, dual-paneled file manager.|http://www.midnight-commander.org|{{Pkg|mc}}}}<br />
* {{App|nffm|"Nothing Fancy File Manager", a mouseless ncurses file manager written in C.|https://github.com/mariostg/nffm|{{AUR|nffm-git}}}}<br />
* {{App|nnn|Tiny, lightning fast, feature-packed file manager.|https://github.com/jarun/nnn|{{Pkg|nnn}}}}<br />
* {{App|Pilot|File manager that comes with the [[Alpine]] email client.|https://www.washington.edu/alpine/|{{AUR|alpine}}}}<br />
* {{App|[[Ranger]]|Console-based file manager with vi bindings, customizability, and lots of features.|https://ranger.github.io/|{{Pkg|ranger}}}}<br />
* {{App|[[Vifm]]|Ncurses-based two-panel file manager with vi-like keybindings.|http://vifm.info|{{Pkg|vifm}}}}<br />
<br />
===== Graphical =====<br />
<br />
* {{App|Caja|The file manager for the MATE desktop.|https://github.com/mate-desktop/caja|{{Pkg|caja}}}}<br />
* {{App|Deepin File Manager|File manager developed for [[Deepin]].|https://www.deepin.org/en/original/dde-file-manager/|{{Pkg|deepin-file-manager}}}}<br />
* {{App|[[Dolphin]]|File manager included in the KDE desktop.|https://userbase.kde.org/Dolphin|{{Pkg|dolphin}}}}<br />
* {{App|Gentoo|A lightweight file manager for GTK.|https://sourceforge.net/projects/gentoo/|{{AUR|gentoo}}}}<br />
* {{App|[[GNOME Files]]|Extensible, heavyweight file manager used by default in GNOME with support for custom scripts.|https://wiki.gnome.org/Apps/Files|{{Pkg|nautilus}}}}<br />
* {{App|[[Wikipedia:Konqueror|Konqueror]]|File manager and web browser for the KDE desktop.|https://konqueror.org/|{{Pkg|konqueror}}}}<br />
* {{App|Liri Files|The file manager for Liri.|https://github.com/lirios/files|{{Pkg|liri-files}}}}<br />
* {{App|[[Nemo]]|Nemo is the file manager of the Cinnamon desktop. A fork of Nautilus.|http://cinnamon.linuxmint.com/|{{Pkg|nemo}}}}<br />
* {{App|Pantheon Files|File browser designed for elementary OS.|https://github.com/elementary/files|{{Pkg|pantheon-files}}}}<br />
* {{App|PathFinder|File browser that comes with the [[Wikipedia:Fox_toolkit|FOX toolkit]].|http://fox-toolkit.org/|{{Pkg|fox}}}}<br />
* {{App|[[PCManFM]]|Very fast and lightweight file manager which can also optionally manage the desktop icons and background.|https://wiki.lxde.org/en/PCManFM|{{Pkg|pcmanfm}}}}<br />
* {{App|qtFM|Small, lightweight filemanager for Linux desktops based on pure Qt.|http://www.qtfm.eu/|{{AUR|qtfm}}}}<br />
* {{App|ROX|Small and fast file manager which can optionally manage the desktop background and panels.|http://rox.sourceforge.net|{{Pkg|rox}}}}<br />
* {{App|[[Thunar]]|File manager that can be run as a daemon with excellent start up and directory load times.|http://docs.xfce.org/xfce/thunar/start|{{Pkg|thunar}}}}<br />
<br />
====== Twin-panel ======<br />
<br />
Note that some of these twin-panel file managers can also be set to have only one pane.<br />
<br />
* {{App|Double Commander|File manager with two panels side by side. It is inspired by Total Commander and features some new ideas.|http://doublecmd.sourceforge.net//|GTK+: {{Pkg|doublecmd-gtk2}}, Qt5: {{Pkg|doublecmd-qt5}}}}<br />
* {{App|[[Wikipedia:emelFM2|emelFM2]]|File manager that implements the popular two-panel design.|http://emelfm2.net/|{{Pkg|emelfm2}}}}<br />
* {{App|[[Wikipedia:GNOME Commander|GNOME Commander]]|A dual-paned file manager for the GNOME Desktop.|https://gcmd.github.io/|{{AUR|gnome-commander}}}}<br />
* {{App|[[Wikipedia:Krusader|Krusader]]|Advanced twin panel (Midnight Commander style) file manager for the KDE desktop.|http://www.krusader.org/|{{Pkg|krusader}}}}<br />
* {{App|muCommander|A lightweight, cross-platform file manager with a dual-pane interface written in Java.|http://www.mucommander.com/|{{AUR|mucommander}}}}<br />
* {{App|[[SpaceFM]]|GTK+ multi-panel tabbed file manager.|http://ignorantguru.github.com/spacefm/|{{AUR|spacefm}}}}<br />
* {{App|Sunflower|Small and highly customizable twin-panel file manager for Linux with support for plugins.|http://sunflower-fm.org/|{{AUR|sunflower}}}}<br />
* {{App|trolCommander|Lightweight, dual-pane file manager written in Java. Fork of muCommander.|https://github.com/trol73/mucommander|{{AUR|trolcommander}}}}<br />
* {{App|Tux Commander|Windowed file manager with two panels side by side similar to popular Total Commander or Midnight Commander file managers.|http://tuxcmd.sourceforge.net/description.php|{{Pkg|tuxcmd}}}}<br />
* {{App|Worker|Fast, lightweight and feature-rich file manager for the X Window System.|http://www.boomerangsworld.de/worker/|{{AUR|worker}}}}<br />
* {{App|[[Wikipedia:Xfe|Xfe]]|Microsoft Explorer-like file manager for X (X File Explorer).|http://roland65.free.fr/xfe/|{{AUR|xfe}}}}<br />
<br />
==== Trash management ====<br />
<br />
* {{App|trash-cli|A command-line interface implementing FreeDesktop.org's Trash specification.|https://github.com/andreafrancia/trash-cli|{{Pkg|trash-cli}}}}<br />
<br />
==== File synchronization ====<br />
<br />
{{Merge|Synchronization and backup programs#Data synchronization|There's a dedicated article.}}<br />
<br />
See also [[Synchronization and backup programs#Data synchronization]] and [[Wikipedia:Comparison of file synchronization software]].<br />
<br />
* {{App|[[Wikipedia:DirSync Pro|DirSync Pro]]|Small, but powerful utility for file and folder synchronization.|https://dirsyncpro.org/|{{AUR|dirsyncpro}}}}<br />
* {{App|[[Wikipedia:FreeFileSync|FreeFileSync]]|Folder comparison and synchronization software that creates and manages backup copies of all your important files.|https://www.freefilesync.org/|{{AUR|freefilesync}}}}<br />
* {{App|[[Wikipedia:git-annex|git-annex]]|Manage files with git, without checking the file contents into git.|https://git-annex.branchable.com/|{{Pkg|git-annex}}}}<br />
* {{App|hsync|Command line program to sync only those files that have been renamed/moved but otherwise unchanged. It works by issuing simple move operations at the destination without actually transferring the files, and is meant to be used in conjunction with other synchronization programs that lack this capability.|https://ambrevar.bitbucket.io/hsync/|{{AUR|hsync}}}}<br />
* {{App|rclone|Command line program to sync files and directories to and from Amazon S3, Dropbox, Google Drive, Microsoft OneDrive, Yandex Disk and many other cloud storage services as well as between local paths.|https://rclone.org/|{{Pkg|rclone}}}}<br />
* {{App|[[rsync]]|File transfer program that uses the "rsync algorithm" which provides a very fast method for bringing remote files into sync. It does this by sending just the differences in the files across the link, without requiring that both sets of files are present at one of the ends of the link beforehand.|https://rsync.samba.org/|{{Pkg|rsync}}}}<br />
* {{App|[[Wikipedia:SparkleShare|SparkleShare]]|File sharing and collaboration application written in C#. It can sync with any Git server over SSH.|http://sparkleshare.org/|{{Pkg|sparkleshare}}}}<br />
* {{App|[[Syncthing]]|Continuous file synchronization program. It synchronizes files between two or more computers in a simple way without advanced configuration.|https://syncthing.net/|Web: {{Pkg|syncthing}}, GTK+: {{Pkg|syncthing-gtk}}}}<br />
* {{App|Syncany|Cloud storage and filesharing application with a focus on security and abstraction of storage.|https://www.syncany.org/|{{AUR|syncany}}}}<br />
* {{App|[[Wikipedia:Synkron|Synkron]]|Application that helps you keep your files and folders always updated. You can easily sync your documents, music or pictures to have their latest versions everywhere.|http://synkron.sourceforge.net/|{{AUR|synkron}}}}<br />
* {{App|[[Unison]]|File synchronization tool that allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other.|https://www.cis.upenn.edu/~bcpierce/unison/|{{Pkg|unison}}}}<br />
<br />
==== Archiving and compression tools ====<br />
<br />
For archiving and compression command-line tools, see [[Archiving and compression]].<br />
<br />
===== Archive managers =====<br />
<br />
* {{App|[[Wikipedia:Ark (software)|Ark]]|Archiving tool included in the KDE desktop.|https://www.kde.org/applications/utilities/ark/|{{Pkg|ark}}}}<br />
* {{App|Engrampa|Archive manager for [[MATE]]|https://github.com/mate-desktop/engrampa|{{Pkg|engrampa}}}}<br />
* {{App|[[Wikipedia:GNOME Archive Manager|GNOME Archive Manager]]|Archive manager included in the GNOME desktop (previously File Roller).|https://wiki.gnome.org/Apps/FileRoller|{{Pkg|file-roller}}}}<br />
* {{App|p7zip-gui|The GUI belonging to the p7zip software.|http://p7zip.sourceforge.net/|{{AUR|p7zip-gui}}}}<br />
* {{App|[[Wikipedia:PeaZip|PeaZip]]|Open source file and archive manager.|http://www.peazip.org/peazip-linux.html|GTK+: {{AUR|peazip-gtk2}}, Qt: {{AUR|peazip-qt}}}}<br />
* {{App|Squeeze|Featherweight front-end for commandline archiving tools.|http://squeeze.xfce.org/|{{AUR|squeeze-git}}}}<br />
* {{App|[[Wikipedia:Xarchiver|Xarchiver]]|Lightweight desktop independent archive manager built with GTK+.|https://github.com/ib/xarchiver|GTK+ 3: {{Pkg|xarchiver}}, GTK+ 2: {{Pkg|xarchiver-gtk2}}}}<br />
<br />
==== Comparison, diff, merge ====<br />
<br />
See also [[Wikipedia:Comparison of file comparison tools]].<br />
<br />
For managing ''pacnew''/''pacsave'' files, specialised tools exist. See [[Pacnew and Pacsave files#Managing .pacnew files]].<br />
<br />
* {{App|colordiff|A Perl script wrapper for 'diff' that produces the same output but with pretty 'syntax' highlighting.|http://www.colordiff.org/|{{Pkg|colordiff}}}}<br />
* {{App|Diffuse|Small and simple text merge tool written in Python.|http://diffuse.sourceforge.net/|{{Pkg|diffuse}}}}<br />
* {{App|KDiff3|File and directory diff and merge tool for the KDE desktop.|http://kdiff3.sourceforge.net/|{{Pkg|kdiff3}}}}<br />
* {{App|[[Wikipedia:Kompare|Kompare]]|GUI front-end program for viewing and merging differences between source files. It supports a variety of diff formats and provides many options to customize the information level displayed.|https://www.kde.org/applications/development/kompare/|{{Pkg|kompare}}}}<br />
* {{App|[[Wikipedia:Meld (software)|Meld]]|Visual diff and merge tool that can compare files, directories, and version controlled projects.|http://meldmerge.org/|{{Pkg|meld}}}}<br />
* {{App|xxdiff|A graphical browser for file and directory differences.|http://furius.ca/xxdiff/|{{AUR|xxdiff}}}}<br />
<br />
[[Vim]] and [[Emacs]] provide merge functionality with [[Vim#Merging_files|vimdiff]] and {{ic|ediff}}.<br />
<br />
==== Batch renamers ====<br />
<br />
* {{App|[[Wikipedia:GPRename|GPRename]]|GTK+ batch renamer for files and directories.|http://gprename.sourceforge.net|{{Pkg|gprename}}}}<br />
* {{App|[[Wikipedia:KRename|KRename]]|Very powerful batch file renamer for the KDE desktop.|http://www.krename.net|{{Pkg|krename}}}}<br />
* {{App|metamorphose2|wxPython based batch renamer with support for regular expressions, renaming multimedia files according to their metadata, etc.|http://file-folder-ren.sourceforge.net|{{AUR|metamorphose2}}}}<br />
* {{App|pyRenamer|Application for the mass renaming of files.|https://github.com/SteveRyherd/pyRenamer|{{AUR|pyrenamer}}}}<br />
* {{App|rename.pl|Batch renamer based on perl regex.|http://search.cpan.org/~pederst/rename/bin/rename.PL|{{Pkg|perl-rename}}}}<br />
* {{App|[[Thunar]] Bulk Rename|Change the name of multiple files at once using some criterion that applies to at least one of the files. Run with {{ic|thunar -B}}.|https://docs.xfce.org/xfce/thunar/bulk-renamer/start|{{Pkg|thunar}}}}<br />
<br />
==== File searching ====<br />
<br />
This section lists utilities for file searching based on filename, file path or metadata. For full-text searching, see the next section.<br />
<br />
See also [[Wikipedia:List of search engines#Desktop search engines]].<br />
<br />
===== Console =====<br />
<br />
See [[find]] and its alternatives.<br />
<br />
===== Graphical =====<br />
<br />
* {{App|Catfish|Versatile file searching tool by Xfce, can be powered by find, locate and Zeitgeist.|https://launchpad.net/catfish-search|{{Pkg|catfish}}}}<br />
* {{App|GNOME Search Tool|GNOME utility to search for files, depends on [[GNOME/Files]].|https://gitlab.gnome.org/GNOME/gnome-search-tool|{{Pkg|gnome-search-tool}}}}<br />
* {{App|KFind|Search tool for KDE to find files by name, type or content. Has internal search and supports locate.|https://www.kde.org/applications/utilities/kfind/|{{Pkg|kfind}}}}<br />
* {{App|MATE Search Tool|MATE utility to search for files.|https://github.com/mate-desktop/mate-utils|{{Pkg|mate-utils}}}}<br />
* {{App|regexxer|Interactive search and replace tool featuring Perl-style regular expressions.|http://regexxer.sourceforge.net/|{{Pkg|regexxer}}}}<br />
* {{App|Searchmonkey|Powerful GUI search utility for matching regex patterns.|http://searchmonkey.sourceforge.net/|{{AUR|searchmonkey}}}}<br />
<br />
====== File indexers ======<br />
<br />
These programs index your files to allow for quick searching.<br />
<br />
* {{App|Basenji|Volume indexing tool designed for easy and fast indexing of CD/DVD and other type of volume collections.|https://github.com/pulb/basenji|{{AUR|basenji}}}}<br />
* {{App|fsearch|A fast file search utility for Unix-like systems based on GTK+3.|https://github.com/cboxdoerfer/fsearch|{{AUR|fsearch-git}}}}<br />
<br />
==== Full-text searching ====<br />
<br />
[[Grep]] and its alternatives provide non-indexed [[Wikipedia:Full-text search|full-text search]].<br />
<br />
===== Full-text indexers =====<br />
<br />
* {{App|[[Baloo]]|KDE's file indexing and search solution, has a CLI and is used by [[KRunner]].|https://community.kde.org/Baloo|{{Pkg|baloo}}}}<br />
* {{App|[[Wikipedia:DocFetcher|DocFetcher]]|Graphical Java desktop search application.|http://docfetcher.sourceforge.net|{{AUR|docfetcher}}}}<br />
* {{App|[[Wikipedia:Recoll|Recoll]]|Full text search tool based on Xapian, has CLI and GUI.|https://lesbonscomptes.com/recoll/|{{Pkg|recoll}}}}<br />
* {{App|[[Wikipedia:Tracker (search software)|Tracker]]|All-in-one indexer, search tool and metadata database, used by [[GNOME]] Documents, Music, Photos and Videos.|https://wiki.gnome.org/Projects/Tracker|{{Pkg|tracker}}}}<br />
* {{App|[[Zeitgeist]]|Event aggregation framework for the user's activities and notifications (files opened, websites visited, conversations had, etc.), has several third-party front-ends.|https://launchpad.net/zeitgeist-project|{{Pkg|zeitgeist}}}}<br />
<br />
=== Development ===<br />
<br />
==== Version control systems ====<br />
<br />
See also [[Wikipedia:Comparison of revision control software]].<br />
<br />
* {{App|[[Bazaar]]|Distributed version control system that helps you track project history over time and to collaborate easily with others.|https://bazaar.canonical.com/|{{Pkg|bzr}}}}<br />
* {{App|[[CVS]]|Concurrent Versions System, a client-server revision control system.|http://cvs.nongnu.org/|{{Pkg|cvs}}}}<br />
* {{App|[[Wikipedia:Darcs|Darcs]]|Distributed revision control system that was designed to replace traditional, centralized source control systems such as CVS and Subversion.|http://darcs.net/|{{Pkg|darcs}}}}<br />
* {{App|[[Wikipedia:Fossil (software)|Fossil]]|Distributed VCS with bug tracking, wiki, forum, and technotes.|https://www.fossil-scm.org/|{{Pkg|fossil}}}}<br />
* {{App|[[Git]]|Distributed revision control and source code management system with an emphasis on speed.|https://git-scm.com/|{{Pkg|git}}}}<br />
* {{App|[[Mercurial]]|Distributed version control system written in Python and similar in many ways to Git.|https://www.mercurial-scm.org/|{{Pkg|mercurial}}}}<br />
* {{App|[[Subversion]]|Full-featured centralized version control system originally designed to be a better CVS.|https://subversion.apache.org/|{{Pkg|subversion}}}}<br />
<br />
==== Build automation ====<br />
<br />
See also [[Wikipedia:List of build automation software]].<br />
<br />
* {{App|[[Wikipedia:Apache Ant|Apache Ant]]|Java library and command-line tool whose mission is to drive processes described in build files as targets and extension points dependent upon each other.|http://ant.apache.org/|{{Pkg|ant}}}}<br />
* {{App|[[Wikipedia:Apache Maven|Apache Maven]]|Build automation tool used primarily for Java.|http://maven.apache.org/|{{Pkg|maven}}}}<br />
* {{App|[[Wikipedia:CMake|CMake]]|Family of tools designed to build, test and package software.|https://cmake.org/|{{Pkg|cmake}}}}<br />
* {{App|[[Wikipedia:Make (software)|GNU make]]|GNU make utility to maintain groups of programs.|http://www.gnu.org/software/make|{{Pkg|make}} (part of {{Grp|base-devel}})}}<br />
* {{App|[[Wikipedia:Gradle|Gradle]]|Powerful build system for the JVM.|https://gradle.org/|{{Pkg|gradle}}}}<br />
* {{App|Phing|PHP program designed to automate tasks of all kinds.|https://www.phing.info/|{{AUR|phing}}}}<br />
<br />
==== Integrated development environments ====<br />
<br />
See also [[Wikipedia:Comparison of integrated development environments]].<br />
<br />
* {{App|[[Wikipedia:Anjuta|Anjuta]]|Versatile IDE with project management, an application wizard, an interactive debugger, a source editor, version control support and many more tools.|http://anjuta.org/|{{Pkg|anjuta}}}}<br />
* {{App|[[Wikipedia:Aptana#Aptana_Studio|Aptana Studio]]|IDE based on Eclipse, but geared towards web development, with support for HTML, CSS, Javascript, Ruby on Rails, PHP, Adobe AIR and others.|http://www.aptana.com/|{{AUR|aptana-studio}}}}<br />
* {{App|[[Wikipedia:Bluefish (software)|Bluefish]]|Powerful editor targeted towards programmers and webdevelopers, with many options to write websites, scripts and programming code. It supports many programming and markup languages.|http://bluefish.openoffice.nl/|{{Pkg|bluefish}}}}<br />
* {{App|[[Wikipedia:Code::Blocks|Code::Blocks]]|C, C++ and Fortran IDE built to meet the most demanding needs of its users. It is designed to be very extensible and fully configurable.|http://codeblocks.org/|{{Pkg|codeblocks}}}}<br />
* {{App|[[Wikipedia:JetBrains#CLion|CLion]]|A cross-platform IDE for C and C++.|http://www.jetbrains.com/clion|{{AUR|clion}}}}<br />
* {{App|[[Wikipedia:CodeLite|CodeLite]]|Open source and cross-platform C/C++/PHP and Node.js IDE written in C++ .|http://www.codelite.org/|{{AUR|codelite}}}}<br />
* {{App|[[Wikipedia:Cloud9 IDE|Cloud9]]|State-of-the-art IDE that runs in your browser and lives in the cloud, allowing you to run, debug and deploy applications from anywhere, anytime.|https://c9.io/|{{AUR|c9.core}}}}<br />
* {{App|[[Eclipse]]|IDE for Java, C/C++, PHP, Perl and Python with subversion support and task management.|https://www.eclipse.org/|Java EE: {{Pkg|eclipse-jee}}, Java: {{Pkg|eclipse-java}}, C/C++: {{Pkg|eclipse-cpp}}, PHP: {{Pkg|eclipse-php}}, JavaScript and Web: {{Pkg|eclipse-javascript}}}}<br />
* {{App|[[Wikipedia:Eric (software)|Eric]]|Full-featured Python and Ruby IDE written in PyQt5.|https://eric-ide.python-projects.org/|{{Pkg|eric}}}}<br />
* {{App|[[Gambas]]|IDE based on a Basic interpreter with object extensions.|http://gambas.sourceforge.net/en/main.html|{{Pkg|gambas3-ide}}}}<br />
* {{App|[[Wikipedia:Geany|Geany]]|Small and lightweight IDE with many supported many programming and markup languages including C, Java, PHP, HTML, Python, Perl, Pascal.|https://geany.org/|{{Pkg|geany}}}}<br />
* {{App|[[Wikipedia:GNOME Builder|GNOME Builder]]|Tool to write and contribute to great GNOME-based applications.|https://wiki.gnome.org/Apps/Builder|{{Pkg|gnome-builder}}}}<br />
* {{App|[[Wikipedia:KDevelop|KDevelop]]|Feature-full, plugin extensible IDE for C/C++ and other programming languages.|https://www.kdevelop.org/|{{Pkg|kdevelop}}}}<br />
* {{App|[[Wikipedia:Komodo_Edit|Komodo Edit]]|A free, multi-language editor.|http://www.activestate.com/komodo-edit|{{AUR|komodo-edit}}}}<br />
* {{App|[[Wikipedia:Lazarus (IDE)|Lazarus]]|Delphi (Object Pascal) compatible IDE for Rapid Application Development. It has variety of components ready for use and a graphical form designer to easily create complex graphical user interfaces.|https://www.lazarus-ide.org/|{{Pkg|lazarus}}}}<br />
* {{App|LiteIDE|Simple Go IDE.|https://github.com/visualfc/liteide|{{Pkg|liteide}}}}<br />
* {{App|[[Wikipedia:MonoDevelop|MonoDevelop]]|Cross-platform IDE targeted for the Mono and .NET frameworks.|http://monodevelop.com/|{{AUR|monodevelop-git}}}}<br />
* {{App|[[Wikipedia:MPLAB|MPLAB]]|IDE for Microchip PIC and dsPIC development.|http://www.microchip.com/mplabx|{{AUR|microchip-mplabx-bin}}}}<br />
* {{App|[[Netbeans]]|IDE for developing with Java, JavaScript, PHP, Python, Ruby, Groovy, C, C++, Scala, Clojure, and other languages.|https://netbeans.org/|{{Pkg|netbeans}}}}<br />
* {{App|[[PHPStorm]]|JetBrains PhpStorm is a commercial, cross-platform IDE for PHP built on JetBrains' IntelliJ IDEA platform, providing an editor for PHP, HTML and JavaScript with on-the-fly code analysis, error prevention and automated refactorings for PHP and JavaScript code.|https://www.jetbrains.com/phpstorm/|{{Aur|phpstorm}} {{Aur|phpstorm-eap}}}}<br />
* {{App|[[Wikipedia:Qt Creator|Qt Creator]]|Lightweight, cross-platform C++ integrated development environment with a focus on Qt.|https://www.qt.io/ide/|{{Pkg|qtcreator}}}}<br />
<br />
===== Java IDEs =====<br />
<br />
* {{App|[[Wikipedia:BlueJ|BlueJ]]|Fully featured Java IDE used mainly for educational and beginner purposes.|https://bluej.org/|{{AUR|bluej}}}}<br />
* {{App|[[Wikipedia:IntelliJ IDEA|IntelliJ IDEA]]|IDE for Java, Groovy and other programming languages with advanced refactoring features.|http://www.jetbrains.com/idea/|{{Pkg|intellij-idea-community-edition}}}}<br />
<br />
===== Python IDEs =====<br />
<br />
* {{App|[[Wikipedia:Ninja-IDE|Ninja-IDE]]|IDE for Python development.|http://ninja-ide.org/|{{AUR|ninja-ide}}}}<br />
* {{App|[[Wikipedia:PyCharm|PyCharm]]|Python IDE with support for code analysis, debugging, unit testing, version control and web development with Django.|http://www.jetbrains.com/pycharm/|{{Pkg|pycharm-community-edition}}}}<br />
* {{App|[[Wikipedia:Spyder (software)|Spyder]]|Scientific Python Development Environment providing MATLAB-like features.|https://github.com/spyder-ide/spyder|{{Pkg|spyder2}} (Python 2) or {{Pkg|spyder3}} (Python 3)}}<br />
* {{App|[[Wikipedia:Thonny|Thonny]]|Python IDE for beginners.|http://thonny.org/|{{AUR|thonny}}}}<br />
* {{App|[[Wikipedia:Wing IDE|WingIDE]]|Proprietary Python development environment. It is fully featured and meant for professional use.|http://www.wingware.com|{{Aur|wingide}}}}<br />
<br />
===== Educational IDEs =====<br />
<br />
* {{App|[[Wikipedia:Etoys (programming language)|Etoys]]|Educational tool and media-rich authoring environment for teaching children.|http://squeakland.org/|{{AUR|etoys}}}}<br />
* {{App|[[Wikipedia:KTurtle|KTurtle]]|Educational programming environment that aims to make learning how to program as easily as possible. Part of {{Grp|kdeedu}}.|https://www.kde.org/applications/education/kturtle/|{{Pkg|kturtle}}}}<br />
* {{App|[[Wikipedia:Processing (programming language)|Processing]]|Playground for teaching non-programmers the fundamentals of computer programming in a visual context.|https://processing.org/|{{Pkg|processing}}}}<br />
* {{App|[[Wikipedia:Scratch (programming language)|Scratch]]|Programming system and content development tool for educational and entertainment purposes, such as creating interactive projects and simple sprite-based games. It is used primarly by unskilled users (such as children) as an entry to [[Wikipedia:Event-driven_programming|event-driven programming]].|https://scratch.mit.edu/|{{Pkg|scratch}}}}<br />
<br />
==== Debuggers ====<br />
<br />
* {{App|Accerciser|Interactive Python accessibility explorer. It uses the AT-SPI library to inspect, examine, and interact with widgets, allowing you to check if an application is providing correct information to assistive technologies and automated testing frameworks.|https://wiki.gnome.org/Apps/Accerciser|{{Pkg|accerciser}}}}<br />
* {{App|Alleyoop|Find memory-management problems in your programs using the valgrind tool.|http://alleyoop.sourceforge.net/|{{Pkg|alleyoop}}}}<br />
* {{App|Bustle|Draws sequence diagrams of D-Bus activity. It shows signal emissions, method calls and their corresponding returns, with time stamps for each individual event and the duration of each method call.|https://www.freedesktop.org/wiki/Software/Bustle/|{{AUR|bustle-git}}}}<br />
* {{App|[[Wikipedia:Data Display Debugger|Data Display Debugger]]|Graphical front-end for command-line debuggers such as GDB.|https://www.gnu.org/software/ddd/|{{AUR|ddd}}}}<br />
* {{App|D-Feet|Easy to use D-Bus debugger to inspect D-Bus interfaces of running programs and invoke methods on those interfaces.|https://wiki.gnome.org/Apps/DFeet|{{Pkg|d-feet}}}}<br />
* {{App|GammaRay|Qt-application inspection and manipulation tool.|https://www.kdab.com/development-resources/qt-tools/gammaray/|{{Pkg|gammaray}}}}<br />
* {{App|KCachegrind|Profile data visualization tool, used to determine the most time consuming execution parts of program.|https://www.kde.org/applications/development/kcachegrind/|KDE: {{Pkg|kcachegrind}}, Qt: {{Pkg|qcachegrind}}}}<br />
* {{App|[[Wikipedia:KDbg|KDbg]]|Graphical user interface to GDB, the GNU debugger. It provides an intuitive interface for setting breakpoints, inspecting variables, and stepping through code.|http://kdbg.org/|{{Pkg|kdbg}}}}<br />
* {{App|Massif-Visualizer|Visualizer for Valgrind Massif data files.|https://phabricator.kde.org/source/massif-visualizer/|{{Pkg|massif-visualizer}}}}<br />
* {{App|[[Wikipedia:Nemiver|Nemiver]]|Easy to use standalone C/C++ debugger (GDB front-end) that integrates well in the GNOME environment.|https://wiki.gnome.org/Apps/Nemiver|{{Pkg|nemiver}}}}<br />
* {{App|Qt QDbusViewer|Tool to introspect D-Bus objects and messages.|http://doc.qt.io/qt-5/qdbusviewer.html|{{Pkg|qt5-tools}}}}<br />
* {{App|scanmem|Debugging utility designed to isolate the address of an arbitrary variable in an executing process.|https://github.com/scanmem/scanmem|CLI: {{Pkg|scanmem}}, GUI: {{Pkg|gameconqueror}}}}<br />
* {{App|Sysprof|Profiling tool that helps in finding the functions in which a program uses most of its time.|https://wiki.gnome.org/Apps/Sysprof|{{Pkg|sysprof}}}}<br />
<br />
==== Lexing and parsing ====<br />
<br />
[[Wikipedia:Lex (software)|Lex]] and [[Wikipedia:Yacc|Yacc]] are part of POSIX.<br />
<br />
* {{App|[[Wikipedia:Flex (lexical analyser generator)|flex]]|A tool for generating text-scanning programs, alternative to Lex.|https://github.com/westes/flex|{{Pkg|flex}}}}<br />
* {{App|[[Wikipedia:Berkeley Yacc|Berkeley Yacc]]|Berkeley reimplementation of the Unix parser generator Yacc.|https://invisible-island.net/byacc/|{{Pkg|byacc}}}}<br />
* {{App|[[Wikipedia:GNU bison|GNU Bison]]|The GNU general-purpose parser generator, alternative to ''byacc''.|https://www.gnu.org/software/bison/|{{Pkg|bison}}}}<br />
<br />
And then there are also:<br />
<br />
* {{App|[[Wikipedia:ANTLR|ANTLR]]|Parser generator, written in Java, for parsing structured text or binary files.|http://www.antlr.org/|{{Pkg|antlr4}}}}<br />
* {{App|LPeg|Pattern-matching library, based on PEGs, for Lua.|http://www.inf.puc-rio.br/~roberto/lpeg/|{{Pkg|lua-lpeg}}, {{Pkg|lua52-lpeg}}, {{Pkg|lua51-lpeg}}}}<br />
* {{App|peg/leg|Recursive-descent parser generators for C.|http://piumarta.com/software/peg/|{{Pkg|peg}}}}<br />
* {{App|Ragel|Compiles finite state machines from regular languages into executable C, C++, Objective-C, or D code.|http://www.colm.net/open-source/ragel/|{{Pkg|ragel}}}}<br />
<br />
==== GUI builders ====<br />
<br />
* {{App|[[Wikipedia:FLUID|FLUID]]|FLTK GUI designer.|http://www.fltk.org/|{{Pkg|fltk}}}}<br />
* {{App|[[Wikipedia:Glade Interface Designer|Glade]]|Create or open user interface designs for GTK+ applications.|https://glade.gnome.org/|{{Pkg|glade}}}}<br />
* {{App|KUIViewer|Quick viewer for Qt Designer UI File.|https://userbase.kde.org/KUIViewer|{{Pkg|kde-dev-utils}}}}<br />
* {{App|Qt Designer|Tool for designing and building graphical user interfaces (GUIs) with Qt Widgets.|http://doc.qt.io/qt-5/qtdesigner-manual.html|{{Pkg|qt5-tools}}}}<br />
<br />
==== Hex editors ====<br />
<br />
See also [[Wikipedia:Comparison of hex editors]].<br />
<br />
* {{App|Bless|High quality, full featured hex editor.|https://web.archive.org/web/20170503150524/http://home.gna.org/bless/|{{Pkg|bless}}}}<br />
* {{App|GHex|Hex editor for GNOME, which allows the user to load data from any file, view and edit it in either hex or ascii.|https://wiki.gnome.org/Apps/Ghex|{{Pkg|ghex}}}}<br />
* {{App|hyx|Minimalistic but powerful console hex editor.|https://yx7.cc/code/|{{AUR|hyx}}}}<br />
* {{App|Okteta|KDE hex editor for viewing and editing the raw data of files.|https://www.kde.org/applications/utilities/okteta/|{{Pkg|okteta}}}}<br />
<br />
==== JSON tools ====<br />
<br />
* {{App|gron|gron transforms JSON into discrete assignments to make it easier to grep.|https://github.com/tomnomnom/gron|{{AUR|gron-bin}}}}<br />
* {{App|jid|JSON incremental digger|https://github.com/simeji/jid|{{AUR|jid}}}}<br />
* {{App|jo|A command to create JSON.|https://github.com/jpmens/jo|{{AUR|jo-git}}}}<br />
* {{App|jq|Command-line JSON processor|https://stedolan.github.io/jq/|{{Pkg|jq}}}}<br />
* {{App|jsawk|Like awk, but for JSON.|https://github.com/micha/jsawk|{{AUR|jsawk-git}}}}<br />
* {{App|jshon|A JSON parser for the shell.|http://kmkeen.com/jshon/|{{Pkg|jshon}}}}<br />
* the [[Elvish]] shell has built-in support for JSON<br />
<br />
==== Literate programming ====<br />
<br />
See also [[Wikipedia:Literate programming]].<br />
<br />
* {{App|Noweb|A Simple, Extensible Tool for Literate Programming build against ICON libs and texlive|http://www.cs.tufts.edu/~nr/noweb/|{{AUR|noweb}}}}<br />
* {{App|nuweb|A Simple Literate Programming Tool|http://nuweb.sourceforge.net/|{{AUR|nuweb}}}}<br />
<br />
==== UML modelers ====<br />
<br />
See also [[Wikipedia:List of Unified Modeling Language tools]].<br />
<br />
* {{App|[[Wikipedia:ArgoUML|ArgoUML]]|UML modeling tool with support for all standard UML 1.4 diagrams.|http://argouml.tigris.org/|{{AUR|argouml}}}}<br />
* {{App|[[Eclipse]] Modeling Tools|Tools and runtimes for building model-based applications.|https://www.eclipse.org/|{{AUR|eclipse-modeling-tools}}}}<br />
* {{App|[[Wikipedia:Modelio|Modelio]]|Modeling environment supporting the main standards: UML, BPMN, MDA, SysML.|https://www.modelio.org/|{{AUR|modelio-bin}}}}<br />
* {{App|[[Wikipedia:Papyrus (software)|Papyrus]]|Model-based engineering tool based on Eclipse.|https://www.eclipse.org/papyrus/|{{AUR|papyrus}}}}<br />
* {{App|[[Wikipedia:PlantUML|PlantUML]]|Tool to create UML diagrams from a plain text language.|http://plantuml.com/|{{AUR|plantuml}}}}<br />
* {{App|PlantUML QEditor|PlantUML editor written in Qt.|https://github.com/borco/plantumlqeditor|{{AUR|plantumlqeditor-git}}}}<br />
* {{App|[[Wikipedia:Umbrello UML Modeller|Umbrello]]|Unified Modelling Language (UML) diagram program based on KDE Technology.|https://umbrello.kde.org/|{{Pkg|umbrello}}}}<br />
* {{App|[[Wikipedia:UML Designer|UML Designer]]|Graphical tool based on Eclipse to edit and visualize UML models.|http://www.umldesigner.org/|{{AUR|umldesigner}}}}<br />
* {{App|[[Wikipedia:UMLet|UMLet]]|UML tool with a simple user interface: draw UML diagrams fast, build sequence and activity diagrams from plain text, export diagrams to eps, pdf, jpg, svg, and clipboard, share diagrams using Eclipse, and create new, custom UML elements.|http://umlet.com/|{{AUR|umlet}}}}<br />
* {{App|UML/INTERLIS-editor|Facilitate the application of the model driven approach to a greater number of users.|http://www.umleditor.org/|{{AUR|umleditor}}}}<br />
* {{App|Violet|Very easy to learn and use UML editor that draws nice-looking diagrams.|https://sourceforge.net/projects/violet/|{{AUR|violetumleditor}}}}<br />
<br />
==== API documentation browsers ====<br />
<br />
* {{App|[[Wikipedia:GNOME Devhelp|Devhelp]]|Developer tool for browsing and searching API documentation.|https://wiki.gnome.org/Apps/Devhelp|{{Pkg|devhelp}}}}<br />
* {{App|Doc Browser|API documentation browser with support for DevDocs and Hoogle.|https://github.com/qwfy/doc-browser|{{AUR|doc-browser-git}}}}<br />
* {{App|Qt Assistant|Tool for viewing on-line documentation in Qt help file format.|http://doc.qt.io/qt-5/qtassistant-index.html|{{Pkg|qt5-tools}}}}<br />
* {{App|quickDocs|Fast developer docs reader for reading Valadoc and DevDocs.|https://github.com/mdh34/quickDocs|{{AUR|quickdocs}}}}<br />
* {{App|Zeal|Offline API documentation browser for software developers.|https://zealdocs.org/|{{Pkg|zeal}}}}<br />
<br />
==== Issue tracking systems ====<br />
<br />
* {{App|[[Bugzilla]]|Bug tracker from Mozilla.|https://www.bugzilla.org|{{Pkg|bugzilla}}}}<br />
* {{App|[[Flyspray]]|Lightweight, web-based bug tracking system written in PHP|https://www.flyspray.org/|{{Pkg|flyspray}}}}<br />
* {{App|[[MantisBT]]|Web-based issue tracking system|https://www.mantisbt.org/|{{AUR|mantisbt}}}}<br />
* {{App|[[Redmine]]|A flexible project management web application. Written using the Ruby on Rails, it is cross-platform and cross-database.|https://www.redmine.org|{{Pkg|redmine}}}}<br />
* {{App|[[Request Tracker]] (RT)|The leading open-source issue tracking system.|https://bestpractical.com/rt/|{{AUR|rt}}}}<br />
* {{App|[[Trac]]|Trac Integrated SCM & Project Management using Apache & Subversion.|https://trac.edgewall.org/|{{AUR|trac}}}}<br />
<br />
See also [[Git server#Advanced web applications]].<br />
<br />
==== Code review ====<br />
<br />
* {{App|Gerrit|A web-based code review tool built on top of the Git version control system|https://www.gerritcodereview.com/|{{AUR|gerrit}}}}<br />
* [[GitLab]] also supports code reviews.<br />
<br />
See also [[Wikipedia:List of tools for code review]].<br />
<br />
==== Game development ====<br />
<br />
See also [[Wikipedia:List of game engines]].<br />
<br />
* {{App|GDevelop|Game creator designed to be used by everyone - no programming skills required.|https://gdevelop-app.com/|{{AUR|gdevelop}}}}<br />
* {{App|[[Godot Engine|Godot]]|Advanced, feature-packed, multi-platform 2D and 3D game engine. Create games with ease, using Godot's unique approach to game development.|https://godotengine.org/|{{AUR|godot}}}}<br />
* {{App|LibreSprite|Animated sprite editor and pixel art tool lets you create 2D animations for videogames.|https://github.com/LibreSprite/LibreSprite|{{AUR|libresprite}}}}<br />
* {{App|Tiled|General purpose 2D level editor with powerful tile map editing features. It’s built to be easy to use and is suitable for many type of games.|https://www.mapeditor.org/|{{Pkg|tiled}}}}<br />
<br />
=== Text input ===<br />
<br />
==== Character selectors ====<br />
<br />
* {{App|GNOME Characters|Character map application for GNOME.|https://gitlab.gnome.org/GNOME/gnome-characters|{{Pkg|gnome-characters}}}}<br />
* {{App|[[Wikipedia:GNOME Character Map|gucharmap]]|GTK+ 3 character selector for GNOME.|https://wiki.gnome.org/Apps/Gucharmap|{{pkg|gucharmap}}}}<br />
* {{App|KCharSelect|Tool to select special characters from all installed fonts and copy them into the clipboard. Part of {{Grp|kdeutils}}.|https://utils.kde.org/projects/kcharselect/|{{Pkg|kcharselect}}}}<br />
<br />
==== On-screen keyboards ====<br />
<br />
* {{App|CellWriter|Grid-entry handwriting recognition input panel.|https://github.com/risujin/cellwriter|{{Pkg|cellwriter}}}}<br />
* {{App|eekboard|Easy to use virtual keyboard toolkit.|https://github.com/ueno/eekboard|{{AUR|eekboard}}}}<br />
* {{App|Florence|Extensible scalable on-screen virtual keyboard for GNOME that stays out of your way when not needed.|https://sourceforge.net/projects/florence/|{{AUR|florence}}}}<br />
* {{App|Onboard|Onscreen keyboard useful for tablet PC users and for mobility impaired users.|https://launchpad.net/onboard|{{Pkg|onboard}}}}<br />
* {{App|qtvkbd|Virtual keyboard written in Qt, a fork of kvkbd.|https://github.com/Alexander-r/qtvkbd|{{AUR|qtvkbd}}}}<br />
* {{App|QVKbd|Virtual keyboard written in Qt.|https://github.com/KivApple/qvkbd|{{Pkg|qvkbd}}}}<br />
* {{App|theShell On Screen Keyboard|Touchscreen keyboard for theShell.|https://github.com/vicr123/ts-kbd|{{AUR|ts-kbd}}}}<br />
* {{App|xvkbd|Virtual keyboard for X window system.|http://t-sato.in.coocan.jp/xvkbd/|{{AUR|xvkbd}}}}<br />
<br />
==== Keyboard layout switchers ====<br />
<br />
* {{App|fbxkb|A NETWM compliant keyboard indicator and switcher. It shows a flag of current keyboard in a systray area and allows you to switch to another one.|http://fbxkb.sourceforge.net/|{{AUR|fbxkb}}}}<br />
* {{App|xxkb|A lightweight keyboard layout indicator and switcher.|https://sourceforge.net/projects/xxkb/|{{Pkg|xxkb}}}}<br />
* {{App|qxkb|A keyboard switcher written in Qt.|https://github.com/disels/qxkb|{{AUR|qxkb}}}}<br />
* {{App|[[Wikipedia:X Neural Switcher|X Neural Switcher]]|A text analyser, it detects the language of the input and corrects the keyboard layout if needed.|http://www.xneur.ru/|{{AUR|xneur}}, {{AUR|gxneur}} (GUI)}}<br />
<br />
==== Input methods ====<br />
<br />
See the main article: [[Internationalization#Input methods]].<br />
<br />
=== Disks ===<br />
<br />
==== Partitioning tools ====<br />
<br />
See [[Partitioning#Partitioning tools]].<br />
<br />
==== Formatting tools ====<br />
<br />
See [[File systems#Types of file systems]].<br />
<br />
==== Cloning tools ====<br />
<br />
See [[Disk cloning#Disk cloning software]].<br />
<br />
==== Mount tools ====<br />
<br />
See also [[udisks#Mount helpers]].<br />
<br />
* {{App|9mount|Mount 9p filesystems.|http://sqweek.net/code/9mount/|{{AUR|9mount}}}}<br />
* {{App|cryptmount|Mount an encrypted file system as a regular user.|https://sourceforge.net/projects/cryptmount/|{{AUR|cryptmount}}}}<br />
* {{App|KDiskFree|Displays information about hard disks and other storage devices. It also allows to mount and unmount drives and view them in a file manager.|https://www.kde.org/applications/system/kdiskfree/|{{Pkg|kdf}}}}<br />
* {{App|ldm|A lightweight daemon that mounts drives automagically using ''udev''|https://github.com/LemonBoy/ldm|{{AUR|ldm}}}}<br />
* {{App|pmount|Mount ''source'' as a regular user to an automatically created destination {{ic|/media/''source_name''}}.|https://pmount.alioth.debian.org/|{{AUR|pmount}}}}<br />
* {{App|pmount-safe-removal|Mount removable devices as regular user with safe removal|https://mywaytoarch.tumblr.com/post/13111098534/pmount-safe-removal-of-usb-device|{{AUR|pmount-safe-removal}}}}<br />
* {{App|udevil|Mounts removable devices as a regular user, show device info, and monitor device changes. Only depends on ''udev'' and glib.|https://ignorantguru.github.io/udevil|{{Pkg|udevil}}}}<br />
* {{App|ws|Mount Windows network shares ([[Wikipedia:Server Message Block|CIFS]] and [[Wikipedia:Virtual file system|VFS]]).|https://sourceforge.net/projects/winshares/|{{AUR|ws}}}}<br />
* {{App|zulucrypt|A GUI frontend for cryptsetup to create, manage and mount encrypted volumes; supports encfs as well|https://mhogomchungu.github.io/zuluCrypt/|{{AUR|zulucrypt}}}}<br />
<br />
==== Disk usage display ====<br />
<br />
* {{App|duc|A library and suite of tools for inspecting disk usage.|http://duc.zevv.nl/|{{AUR|duc}}}}<br />
* {{App|[[Wikipedia:Filelight|Filelight]]|Disk usage analyzer that creates an interactive map of concentric, segmented rings that help visualise disk usage on your computer.|https://www.kde.org/applications/utilities/filelight|{{Pkg|filelight}}}}<br />
* {{App|[[Wikipedia:Disk Usage Analyzer|GNOME Disk Usage Analyzer]]|Disk usage analyzer for the [[GNOME]] desktop to check folder sizes and available disk space.|https://wiki.gnome.org/Apps/DiskUsageAnalyzer|{{Pkg|baobab}}}}<br />
* {{App|Graphical Disk Map|Disk usage analyzer that draws a map of rectangles sized according to file or dir sizes.|http://gdmap.sourceforge.net/|{{Pkg|gdmap}}}}<br />
* {{App|gt5|Diff-capable "du-browser".|http://gt5.sourceforge.net|{{AUR|gt5}}}}<br />
* {{App|MATE Disk Usage Analyzer|Disk usage analyzing tool for MATE Desktop.|https://github.com/mate-desktop/mate-utils|{{Pkg|mate-utils}}}}<br />
* {{App|ncdu|Simple ncurses disk usage analyzer.|http://dev.yorhel.nl/ncdu|{{Pkg|ncdu}}}}<br />
* {{App|qdirstat|Qt-based directory statistics (KDirStat/K4DirStat without any KDE - from the original KDirStat author).|https://github.com/shundhammer/qdirstat|{{AUR|qdirstat}}}}<br />
<br />
==== Disk health status ====<br />
<br />
See [[S.M.A.R.T.#GUI Applications]].<br />
<br />
==== File recovery tools ====<br />
<br />
See [[File recovery#List of utilities]].<br />
<br />
==== Disk cleaning ====<br />
<br />
* {{App|[[Wikipedia:BleachBit|BleachBit]]|Frees disk space and guards your privacy; frees cache, deletes cookies, clears Internet history, shreds temporary files, deletes logs, and discards junk you didn't know was there.|https://www.bleachbit.org/|{{Pkg|bleachbit}}}}<br />
* {{App|[[Wikipedia:fdupes|fdupes]]|Program for identifying or deleting duplicate files residing within specified directories.|https://github.com/adrianlopezroche/fdupes|{{Pkg|fdupes}}}}<br />
* {{App|fslint|A utility to find and clean various forms of lint on a filesystem.|https://www.pixelbeat.org/fslint/|{{AUR|fslint}}}}<br />
* {{App|gconf-cleaner|cleans up the unknown/invalid GConf keys that still sitting down on your GConf database.|https://code.google.com/archive/p/gconf-cleaner/|{{AUR|gconf-cleaner}}}}<br />
* {{App|rmlint|Tool to quickly find (and optionally remove) duplicate files and other lint.|https://github.com/sahib/rmlint|CLI: {{Pkg|rmlint}}, GUI: {{Pkg|rmlint-shredder}}}}<br />
* {{App|Sweeper|System cleaning utility for KDE.|https://utils.kde.org/projects/sweeper/|{{Pkg|sweeper}}}}<br />
<br />
==== Disk image writing ====<br />
<br />
See also [[Wikipedia:List of tools to create Live USB systems]].<br />
<br />
* {{App|Deepin Boot Maker|Tool to make boot disk for Deepin OS.|https://www.deepin.org/en/original/deepin-boot-maker/|{{Pkg|deepin-boot-maker}}}}<br />
* {{App|Etcher|Flash OS images to SD cards & USB drives, safely and easily. Based on the [https://electronjs.org/ Electron] platform.|https://etcher.io/|{{AUR|etcher}}}}<br />
* {{App|[[Wikipedia:Fedora Media Writer|Fedora Media Writer]]|Tool that helps users put Fedora images on their portable drives such as flash disks.|https://github.com/FedoraQt/MediaWriter|{{AUR|mediawriter}}}}<br />
* {{App|GNOME MultiWriter|Write an ISO file to multiple USB devices at once.|https://wiki.gnome.org/Apps/MultiWriter|{{Pkg|gnome-multi-writer}}}}<br />
* {{App|ISOImageWriter|Tool to write a .iso file to a USB disk.|https://community.kde.org/ISOImageWriter|{{AUR|isoimagewriter}}}}<br />
* {{App|LiveUSB Install|Install various Linux distributions and operating systems on removable flash drive or external disk drive.|http://live.learnfree.eu/|{{AUR|live-usb-install}}}}<br />
* {{App|MultiBootUSB|Install multiple live Linux on a USB disk non destructively and option to uninstall distros.|http://multibootusb.org/|{{AUR|multibootusb}}}}<br />
* {{App|MultiSystem|GUI tool to create a USB system that can boot multiple distro's.|http://liveusb.info/|{{AUR|multisystem}}}}<br />
* {{App|[[Wikipedia:SUSE Studio ImageWriter|SUSE Studio ImageWriter]]|Utility for writing raw disk images & hybrid isos to USB keys.|https://github.com/openSUSE/imagewriter|{{AUR|imagewriter}}}}<br />
* {{App|[[Wikipedia:UNetbootin|UNetbootin]]|Installs Linux/BSD distributions to a partition or USB drive.|https://unetbootin.github.io/|{{AUR|unetbootin}}}}<br />
* {{App|WoeUSB|Simple tool to create USB stick windows installer from an ISO image or a real DVD. (Fork of WinUSB).|https://github.com/slacka/WoeUSB|{{AUR|woeusb}}}}<br />
* {{App|windows2usb|Windows 7/8/8.1/10 ISO to Flash Drive burning utility for Linux with MBR/GPT, BIOS/UEFI, FAT32/NTFS support|https://github.com/ValdikSS/windows2usb|{{AUR|windows2usb-git}}}}<br />
<br />
=== System ===<br />
<br />
==== Task managers ====<br />
<br />
* {{App|Deepin System Monitor|Monitor system process status for Deepin desktop.|https://www.deepin.org/en/original/deepin-system-monitor/|{{Pkg|deepin-system-monitor}}}}<br />
* {{App|GNOME System Monitor|System monitor for [[GNOME]] to view and manage system resources.|https://wiki.gnome.org/Apps/SystemMonitor|{{Pkg|gnome-system-monitor}}}}<br />
* {{App|GNOME Usage|View information about use of system resources, like memory and disk space.|https://wiki.gnome.org/Apps/Usage|{{Pkg|gnome-usage}}}}<br />
* {{App|[[Wikipedia:Htop|htop]]|Simple, ncurses interactive process viewer.|http://htop.sourceforge.net/|{{Pkg|htop}}}}<br />
* {{App|[[Wikipedia:KDE System Guard|KSysGuard]]|System monitor for [[KDE]] to monitor running processes and system performance.|https://userbase.kde.org/KSysGuard|{{Pkg|ksysguard}}}}<br />
* {{App|Linux Process Explorer|Graphical process explorer for Linux.|https://sourceforge.net/projects/procexp/|{{AUR|procexp}}}}<br />
* {{App|LXTask|Lightweight task manager for [[LXDE]].|https://wiki.lxde.org/en/LXTask|{{Pkg|lxtask}}}}<br />
* {{App|MATE System Monitor|System monitor for [[MATE]].|https://github.com/mate-desktop/mate-system-monitor|{{Pkg|mate-system-monitor}}}}<br />
* {{App|Task Manager|GTK2 process management application for [[Xfce]].|http://goodies.xfce.org/projects/applications/xfce4-taskmanager|{{Pkg|xfce4-taskmanager}}}}<br />
<br />
==== System monitors ====<br />
<br />
See also [[:Category:Status monitoring and notification]]<br />
<br />
* {{App|[[Conky]]|Lightweight, scriptable system monitor.|https://github.com/brndnmtthws/conky|{{Pkg|conky}}}}<br />
* {{App|Collectd|Simple, extensible system monitoring daemon based on [http://oss.oetiker.ch/rrdtool/ rrdtool]. It has a small footprint and can be set up either stand-alone or as a server/client application.|https://collectd.org/|{{Pkg|collectd}}}}<br />
* {{App|collectl|Collectl is a light-weight performance monitoring tool capable of reporting interactively as well as logging to disk. It reports statistics on cpu, disk, infiniband, lustre, memory, network, nfs, process, quadrics, slabs and more in easy to read format.|http://collectl.sourceforge.net/|{{AUR|collectl}}}}<br />
* {{App|dstat|Versatile resource statistics tool.|http://dag.wieers.com/home-made/dstat/|{{Pkg|dstat}}}}<br />
* {{App|Fsniper|Daemon to run scripts based on changes in files monitored by inotify.|http://projects.l3ib.org/fsniper/|{{AUR|fsniper}}}}<br />
* {{App|[[Wikipedia:GKrellM|GKrellM]]|Simple, flexible system monitor package for [[GTK+]] with many plug-ins.|http://billw2.github.io/gkrellm/gkrellm.html|{{Pkg|gkrellm}}}}<br />
* {{App|glances|CLI curses-based monitoring tool in Python.|http://nicolargo.github.io/glances|{{Pkg|glances}}}}<br />
* {{App|netdata|Web-based real-time performance monitor.|https://github.com/firehol/netdata/wiki|{{Pkg|netdata}}}}<br />
* {{App|[[Telegraf]]|Agent written in Go for collecting, processing, aggregating, and writing metrics.|https://docs.influxdata.com/telegraf/latest/|{{AUR|telegraf}}}}<br />
* {{App|[[Paramano]]|Light battery monitor and a CPU frequency scaler. Forked from [http://trayfreq.sourceforge.net/ trayfreq]|https://github.com/phillid/paramano|{{AUR|paramano}}}}<br />
* {{app|Sysstat|Collection of resource monitoring tools: iostat, isag, mpstat, pidstat, sadf, sar.|http://pagesperso-orange.fr/sebastien.godard/|{{Pkg|sysstat}}}}<br />
* {{App|xosview|System monitor that resembles gr_osview from SGI IRIX.|http://www.pogo.org.uk/~mark/xosview/|{{AUR|xosview}}}}<br />
<br />
==== Hardware sensor monitoring ====<br />
<br />
See [[lm_sensors#Graphical front-ends]].<br />
<br />
==== System information viewers ====<br />
<br />
===== Console =====<br />
<br />
* {{App|alsi|A system information tool for Arch Linux. It can be configured for every other system without even touching the source code of the script.|http://trizenx.blogspot.ro/2012/08/alsi.html|{{AUR|alsi}}}}<br />
* {{App|archey2|Simple python script that displays the arch logo and some basic information. Python 2.x version.|https://github.com/djmelik/archey|{{AUR|archey2}}}}<br />
* {{App|[[archey3]]|Python script to display system infomation alongside the Arch Linux logo.|https://lclarkmichalek.github.io/archey3|{{pkg|archey3}}}}<br />
* {{App|dmidecode|It reports information about your system's hardware as described in your system BIOS according to the SMBIOS/DMI standard.|http://www.nongnu.org/dmidecode/|{{Pkg|dmidecode}}}}<br />
* {{App|hwdetect|Simple script to list modules that are exported in {{ic|/sys/}}.|https://projects.archlinux.org/|{{pkg|hwdetect}}}}<br />
* {{App|hwinfo|Powerful hardware detection tool come from openSUSE.|https://github.com/openSUSE/hwinfo|{{pkg|hwinfo}}}}<br />
* {{App|inxi|A script to get system information.|https://github.com/smxi/inxi|{{AUR|inxi}}}}<br />
* {{App|neofetch|A fast, highly customizable system info script that supports displaying images with w3m.|https://github.com/dylanaraps/neofetch|{{Pkg|neofetch}}}}<br />
* {{App|screenfetch|Similar to archey but has an option to take a screenshot. Written in bash.|https://github.com/KittyKatt/screenFetch|{{Pkg|screenfetch}}}}<br />
* {{App|nmon|Console based application for monitoring various system components.|http://nmon.sourceforge.net/|{{Pkg|nmon}}}}<br />
<br />
===== Graphical =====<br />
<br />
* {{App|hardinfo|A small application that displays information about your hardware and operating system, it looks like the Device Manager in Windows.|http://hardinfo.berlios.de/HomePage|{{Pkg|hardinfo}}}}<br />
* {{App|i-Nex|An application that gathers information for hardware components available on your system and displays it using an user interface similar to the popular Windows tool CPU-Z.|http://i-nex.linux.pl/|{{AUR|i-nex-git}}}}<br />
* {{App|lshw|A small tool to provide detailed information on the hardware configuration of the machine with CLI and GTK interfaces.|http://ezix.org/project/wiki/HardwareLiSter|{{Pkg|lshw}}}}<br />
* {{App|KDE Info Center|Centralized and convenient overview of system information for KDE.|https://www.kde.org/applications/system/kinfocenter/|{{Pkg|kinfocenter}}}}<br />
* {{App|USBView|Display the topology of devices on the USB bus.|http://www.kroah.com/linux/usb/|{{Pkg|usbview}}}}<br />
<br />
==== System log viewers ====<br />
<br />
* {{App|GNOME Logs|Viewer for the systemd journal. Part of {{Grp|gnome}}.|https://wiki.gnome.org/Apps/Logs|{{Pkg|gnome-logs}}}}<br />
* {{App|GNOME System Log|System log viewer for GNOME.|https://gitlab.gnome.org/GNOME/gnome-system-log|{{Pkg|gnome-system-log}}}}<br />
* {{App|KSystemLog|System log viewer tool for KDE.|https://www.kde.org/applications/system/ksystemlog/|{{Pkg|ksystemlog}}}}<br />
* {{App|MATE System Log|System log viewer for MATE.|https://github.com/mate-desktop/mate-utils|{{Pkg|mate-utils}}}}<br />
* {{App|Pacman Log Viewer|Tool used to inspect pacman log file, in particular it lists installed, removed and upgraded packages letting you to filter by package's name and/or date.|https://www.opendesktop.org/content/show.php?content&#61;150484|{{Pkg|pacmanlogviewer}}}}<br />
<br />
==== Font viewers ====<br />
<br />
See also [[Wikipedia:Font management software]].<br />
* {{App|Font Manager|Simple font management for GTK+ desktop environments.|https://fontmanager.github.io/|{{AUR|font-manager}}}}<br />
* {{App|Fonty Python|Manage, view and find your fonts.|https://savannah.nongnu.org/projects/fontypython|{{AUR|fontypython}}}}<br />
* {{App|GNOME Fonts|Font viewer for GNOME.|https://gitlab.gnome.org/GNOME/gnome-font-viewer|{{Pkg|gnome-font-viewer}}}}<br />
* {{App|KFontview|KDE application to view and install different types of fonts.|https://docs.kde.org/trunk5/en/kde-workspace/kfontview/index.html|{{Pkg|plasma-desktop}}}}<br />
* {{App|MATE Font Viewer|Font viewer for MATE.|https://github.com/mate-desktop/mate-control-center|{{Pkg|mate-utils}}}}<br />
* {{App|Waterfall|GTK+ application to view all characters of font in all sizes.|https://keithp.com/cgit/gwaterfall.git|{{Pkg|gwaterfall}}}}<br />
<br />
==== Help viewers ====<br />
<br />
See [[man page#Viewer applications]].<br />
<br />
==== Command schedulers ====<br />
<br />
See also [[Cron]].<br />
<br />
* {{App|FcronQ|Fcron GUI, an advanced periodic command scheduler.|http://fcronq.xavion.name/|{{AUR|fcronq}}}}<br />
* {{App|GNOME Schedule|Graphical interface to crontab and at for GNOME.|http://gnome-schedule.sourceforge.net/|{{Pkg|gnome-schedule}}}}<br />
* {{App|KCron|Tool for KDE to run applications in the background at regular intervals. It's a graphical interface to the Cron command.|https://userbase.kde.org/KCron|{{Pkg|kcron}}}}<br />
* {{App|KTimer|Little tool for KDE to execute programs after some time. It allows you to enter several tasks and to set a timer for each of them. The timers for each task can be started, stopped, changed, or looped.|https://www.kde.org/applications/utilities/ktimer/|{{Pkg|ktimer}}}}<br />
<br />
==== Shutdown timers ====<br />
<br />
* {{App|GShutdown|Advanced shutdown utility which allows you to schedule the shutdown or the restart of your computer, or logout your actual session.|https://gshutdown.tuxfamily.org/|{{AUR|gshutdown}}}}<br />
* {{App|Hsiu-Ming's Timer|Graphical shutdown timer, which enables you to shutdown, turn off monitor, reboot or play sound after a period of time.|https://cges30901.github.io/hmtimer-website/|{{AUR|hmtimer}}}}<br />
* {{App|KShutdown|Graphical shutdown utility, which allows you to turn off or suspend a computer at a specified time. It features various time and delay options, command-line support, and notifications.|https://kshutdown.sourceforge.io/|{{Pkg|kshutdown}}}}<br />
<br />
==== Clock synchronization ====<br />
<br />
See [[Time synchronization]].<br />
<br />
==== Screen management ====<br />
<br />
See [[Xrandr#Graphical front-ends]].<br />
<br />
==== Backlight management ====<br />
<br />
See [[Backlight#Backlight utilities]].<br />
<br />
==== Color management ====<br />
<br />
See [[ICC profiles#Utilities]] and [[Backlight#Color correction]].<br />
<br />
==== Printer management ====<br />
<br />
See [[CUPS#GUI applications]].<br />
<br />
==== Bluetooth management ====<br />
<br />
See [[Bluetooth#Front-ends]].<br />
<br />
==== Power management ====<br />
<br />
See [[Power management#Userspace tools]].<br />
<br />
==== Package management ====<br />
<br />
See [[pacman tips#Utilities]].</div>Pdchttps://wiki.archlinux.org/index.php?title=Dtach&diff=569973Dtach2019-03-28T13:19:35Z<p>Pdc: /* Installation */ Package moved to AUR</p>
<hr />
<div>{{lowercase title}}<br />
[[Category:Terminal multiplexers]]<br />
[[ja:Dtach]]<br />
<br />
dtach "is a tiny program that emulates the detach feature of screen, allowing you to run a program in an environment that is protected from the controlling terminal and attach to it later." [http://dtach.sourceforge.net/]<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{AUR|dtach}} package.<br />
<br />
== Usage ==<br />
<br />
=== Create a new session ===<br />
<br />
To create a new session running ''command'' and attach to it:<br />
<br />
$ dtach -c ''socket'' ''command''<br />
<br />
For example, to create a new session running ''bash'' with the socket located at {{ic|/tmp/bashsession}}:<br />
<br />
$ dtach -c /tmp/bashsession bash<br />
<br />
To create a new session running ''command'' without attaching to it:<br />
<br />
$ dtach -n ''socket'' ''command''<br />
<br />
=== Attach to a session ===<br />
<br />
To attach to an existing session:<br />
<br />
$ dtach -a ''socket''<br />
<br />
To attach to an existing session, and if not already existing, create it:<br />
<br />
$ dtach -A ''socket''<br />
<br />
=== Detach from a session ===<br />
<br />
In an attached session, type {{ic|Ctrl+\}}. This key combination can be modified with the {{ic|-e}} flag.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Share a session ===<br />
<br />
To share a session with another user, simply [[#Create a new session]] and change the permissions on the socket file such that the other user can read and write to it. Then the other user should be able to [[#Attach to a session|attach]] to the session.</div>Pdchttps://wiki.archlinux.org/index.php?title=Firefox&diff=569972Firefox2019-03-28T12:57:37Z<p>Pdc: /* arch-firefox-search */ Package moved to AUR</p>
<hr />
<div>[[Category:Web browser]]<br />
[[Category:Mozilla]]<br />
[[ar:Firefox]]<br />
[[cs:Firefox]]<br />
[[de:Firefox]]<br />
[[es:Firefox]]<br />
[[fr:Firefox]]<br />
[[it:Firefox]]<br />
[[ja:Firefox]]<br />
[[ko:Firefox]]<br />
[[ru:Firefox]]<br />
[[zh-hans:Firefox]]<br />
{{Related articles start}}<br />
{{Related|Browser plugins}}<br />
{{Related|Firefox/Tweaks}}<br />
{{Related|Firefox/Profile on RAM}}<br />
{{Related|Firefox/Privacy}}<br />
{{Related|Chromium}}<br />
{{Related|Opera}}<br />
{{Related articles end}}<br />
[https://www.mozilla.org/firefox Firefox] is a popular open source graphical web browser from [https://www.mozilla.org Mozilla].<br />
<br />
== Installing ==<br />
<br />
Firefox can be [[install]]ed with the {{Pkg|firefox}} package.<br />
<br />
Other alternatives include:<br />
<br />
* {{App|Firefox Developer Edition|for developers|https://www.mozilla.org/firefox/developer/|{{Pkg|firefox-developer-edition}}}}<br />
* {{App|Firefox Extended Support Release|long-term supported version|https://www.mozilla.org/firefox/organizations/|{{AUR|firefox-esr}} or {{AUR|firefox-esr-bin}}}}<br />
* {{App|Firefox Beta|cutting-edge version|https://www.mozilla.org/firefox/channel/desktop/#beta|{{AUR|firefox-beta}} or {{AUR|firefox-beta-bin}}}}<br />
* {{App|Firefox Nightly|nightly builds for testing ([https://developer.mozilla.org/Firefox/Experimental_features experimental features])|https://www.mozilla.org/firefox/channel/desktop/#nightly|{{AUR|firefox-nightly}}}} <br />
* {{App|Firefox KDE|Version of Firefox that incorporates an OpenSUSE patch for better [[#KDE/GNOME integration|KDE integration]] than is possible through simple Firefox plugins.|https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox|{{AUR|firefox-kde-opensuse}}}}<br />
* On top of the different Mozilla build channels, a number of forks exist with more or less special features; see [[List of applications#Gecko-based]].<br />
<br />
A number of language packs are available for Firefox, other than the standard English. Language packs are usually named as {{ic|firefox-i18n-''languagecode''}} (where {{ic|''languagecode''}} can be any language code, such as '''de''', '''ja''', '''fr''', etc.). For a list of available language packs see [https://www.archlinux.org/packages/extra/any/firefox-i18n/ firefox-i18n] for {{Pkg|firefox}} and [https://www.archlinux.org/packages/community/any/firefox-developer-edition-i18n/ firefox-developer-edition-i18n] for {{Pkg|firefox-developer-edition}}.<br />
<br />
== Add-ons ==<br />
<br />
Firefox is well known for its large library of add-ons which can be used to add new features or modify the behavior of existing features. Firefox's "Add-ons Manager" is used to manage installed add-ons or find new ones. <br />
<br />
For instructions on how to install add-ons and a list of add-ons, see [[Browser extensions]].<br />
<br />
=== Adding search engines ===<br />
<br />
Search engines can be added to Firefox through normal add-ons, see [https://addons.mozilla.org/firefox/search-tools/ this page] for a list of available search engines.<br />
<br />
A very extensive list of search engines can be found at the [https://mycroftproject.com/ Mycroft Project].<br />
<br />
Also, you can use the [https://firefox.maltekraus.de/extensions/add-to-search-bar add-to-searchbar] extension to add a search to your search bar from any web site, by simply right clicking on the site's search field and selecting ''Add to Search Bar...''<br />
<br />
==== arch-firefox-search ====<br />
<br />
[[Install]] the {{AUR|arch-firefox-search}} package to add Arch-specific searches (AUR, wiki, forum, etc, as specified by user) to the Firefox search toolbar.<br />
<br />
== Plugins ==<br />
<br />
{{Note|Firefox [https://support.mozilla.org/en-US/kb/npapi-plugins has removed support] for [[w:NPAPI|NPAPI]] plugins, except for Flash.}}<br />
<br />
See the main article: [[Browser plugins]]<br />
<br />
To find out what plugins are installed/enabled, enter:<br />
<br />
about:plugins<br />
<br />
in the Firefox address bar or go to the ''Add-ons'' entry in the Firefox Menu and select the ''Plugins'' tab.<br />
<br />
== Configuration ==<br />
<br />
Firefox exposes a number of configuration options. To examine them, enter in the Firefox address bar:<br />
<br />
about:config<br />
<br />
Once set, these affect the user's current profile, and may be synchronized across all devices via [https://www.mozilla.org/firefox/sync/ Firefox Sync]. Please note that only a subset of the {{ic|about:config}} entries are synchronized by this method, and the exact subset may be found by searching for {{ic|services.sync.prefs}} in {{ic|about:config}}. Additional preferences and third party preferences may be synchronized by creating new boolean entries prepending the config value with {{ic|services.sync.prefs.sync}} ([https://developer.mozilla.org/en-US/docs/Archive/Mozilla/Firefox_Sync/Syncing_custom_preferences documentation] is still applicable.) To synchronize the whitelist for the extension [https://addons.mozilla.org/firefox/addon/noscript/ NoScript]:<br />
<br />
services.sync.prefs.sync.capability.policy.maonoscript.sites<br />
<br />
The boolean {{ic|noscript.sync.enabled}} must be set to {{ic|true}} to synchronize the remainder of NoScript's preferences via Firefox Sync.<br />
<br />
Firefox also allows configuration for a profile via a {{ic|user.js}} file: [http://kb.mozillazine.org/User.js_file user.js] kept in the profile folder, usually {{ic|~/.mozilla/firefox/''xxxxxxxx''.default/}}. For a useful starting point, see e.g [https://github.com/pyllyukko/user.js custom user.js] which is targeted at privacy/security conscious users.<br />
<br />
One drawback of the above approach is that it is not applied system-wide. Furthermore, this is not useful as a "pre-configuration", since the profile directory is created after first launch of the browser. You can, however, let ''firefox'' create a new profile and, after closing it again, [https://support.mozilla.org/en-US/kb/back-and-restore-information-firefox-profiles#w_restoring-a-profile-backup copy the contents] of an already created profile folder into it. <br />
<br />
Sometimes it may be desired to lock certain settings, a feature useful in widespread deployments of customized Firefox. In order to create a system-wide configuration, follow the steps outlined in [http://kb.mozillazine.org/Locking_preferences Locking preferences]:<br />
<br />
1. Create {{ic|/usr/lib/firefox/defaults/pref/local-settings.js}}:<br />
<br />
pref("general.config.obscure_value", 0);<br />
pref("general.config.filename", "mozilla.cfg");<br />
<br />
2. Create {{ic|/usr/lib/firefox/mozilla.cfg}} (this stores the actual configuration):<br />
<br />
//<br />
//...your settings...<br />
// e.g to disable Pocket, uncomment the following line<br />
// lockPref("browser.pocket.enabled", false);<br />
<br />
Please note that the first line must contain exactly {{ic|//}}. The syntax of the file is similar to that of {{ic|user.js}}.<br />
<br />
=== Multimedia playback ===<br />
<br />
Firefox uses [[FFmpeg]] for playing multimedia inside HTML5 {{ic|<audio>}} and {{ic|<video>}} elements. Go to [https://www.youtube.com/html5 YouTube's HTML5 page], [https://www.quirksmode.org/html5/tests/video.html video-test page] or [https://hpr.dogphilosophy.net/test/ audio-test page] to check which formats are actually supported.<br />
<br />
HTML5 DRM playback is supported by the Google Widevine CDM, it is however not enabled by default. See ''Preferences > General > Digital Rights Management (DRM) Content'' if you want to learn more.<br />
<br />
See [[Firefox/Tweaks#Enable additional media codecs]] for advanced configuration and enabling support for Widevine (Netflix, Amazon Video, etc.).<br />
<br />
Firefox uses [[PulseAudio]] for audio playback and capture. For sound to work, you need to install the {{Pkg|pulseaudio}} package.<br />
<br />
In case, for whatever reason, [[PulseAudio]] is not an option for you, you can use [[Advanced Linux Sound Architecture#PulseAudio compatibility|apulse]] instead. To make this work, it is necessary to exclude {{ic|/dev/snd/}} from Firefox' sandboxing by adding it to the comma-separated list in {{ic|about:config}}:<br />
<br />
security.sandbox.content.write_path_whitelist<br />
<br />
{{Note|The trailing slash on {{ic|/dev/snd/}} is important, otherwise ''apulse'' will report "Permission denied" errors.}}<br />
<br />
If you have no audio even when using ''apulse'', try adding {{ic|16}} to {{ic|security.sandbox.content.syscall_whitelist}} in {{ic|about:config}}.<br />
<br />
==== Open With extension ====<br />
<br />
# Install [https://addons.mozilla.org/firefox/addon/open-with/ Open With] add-on.<br />
# Go to ''Add-ons > Open With > Preferences''.<br />
# Proceed with instructions to install a file in your system and test the installation. <br />
# Click ''Add browser''.<br />
# In the dialog write a name for this menu entry and command to start a video streaming capable player (e.g. [[mpv|/usr/bin/mpv]]).<br />
# (Optional step) Add needed arguments to the player (e.g. you may want {{ic|--force-window --ytdl}} for ''mpv'')<br />
# Right click on links or visit pages containing videos. Select newly created entry from Open With's menu and if the site is supported, the player will open as expected.<br />
<br />
The same procedure can be used to associate video downloaders such as ''youtube-dl''.<br />
<br />
=== Spell checking ===<br />
<br />
Install the {{Pkg|hunspell}} package. You also need to install dictionaries for your language, such as {{Pkg|hunspell-fr}} (for the French language) or {{Pkg|hunspell-he}} (for Hebrew).<br />
<br />
To enable spell checking for a specific language right click on any text field and check the ''Check Spelling'' box. To select a language for spell checking to you have right click again and select your language from the ''Languages'' sub-menu.<br />
<br />
To get more languages just click ''Add Dictionaries...'' and select the dictionary you want to install from the list. For Russian there is {{Pkg|firefox-spell-ru}}.<br />
<br />
When your default language choice does not stick, see [[#Firefox does not remember default spell check language]].<br />
<br />
=== KDE/GNOME integration ===<br />
<br />
* To bring the [[KDE]] look to GTK apps (including Firefox), install {{Pkg|breeze-gtk}} and {{Pkg|kde-gtk-config}}. Afterwards, go to ''System Settings > Application Style > GNOME/GTK Application Style''. Be sure to choose 'Breeze' in 'Select a GTK2/GTK3 Theme' and check 'Show icons in GTK buttons' and 'Show icons in GTK menus'.<br />
* To make the left mouse button warp the scrollbar instead of the middle one on KDE, go to ''System Settings > Application Style > GNOME/GTK Application Style'' and choose 'Jump to the mouse cursor position' in the 'On left-clicking the scroll bar' option.<br />
* To use the KDE file selection and print dialogs in Firefox 64 or newer:<br />
*# Install {{Pkg|xdg-desktop-portal}} and {{Pkg|xdg-desktop-portal-kde}},<br />
*# Copy the Firefox [[desktop entry]] {{ic|/usr/share/applications/firefox.desktop}} to {{ic|~/.local/share/applications/firefox.desktop}},<br />
*# Edit {{ic|~/.local/share/applications/firefox.desktop}} and add {{ic|1=GTK_USE_PORTAL=1}} to all {{ic|Exec}} lines before the actual command. E.g.: {{ic|1=Exec=GTK_USE_PORTAL=1 /usr/lib/firefox/firefox %u}}.<br />
* For integration with [[KDE]] mime type system and file dialog, one can use {{AUR|firefox-kde-opensuse}} variant from AUR with OpenSUSE’s patches applied.<br />
* Extensions/add-ons may provide additional integration, such as:<br />
** Browser integration in [[Plasma]]: requires {{Pkg|plasma-browser-integration}} and the [https://addons.mozilla.org/firefox/addon/plasma-integration/ Plasma Integration add-on].<br />
** {{AUR|mozilla-extension-gnome-keyring-git}} (all-JavaScript implementation) to integrate Firefox with [[GNOME Keyring]]. To make firefox-gnome-keyring use your login keychain, set {{ic|extensions.gnome-keyring.keyringName}} to {{ic|login}} in {{ic|about:config}}. Note the lowercase 'l' despite the the keychain name having an uppercase 'L' in Seahorse.<br />
<br />
=== Smooth Scrolling ===<br />
<br />
{{Merge|Firefox/Tweaks#Mouse and keyboard|Keep similar things in one place.}}<br />
<br />
In order to get smooth physics-based scrolling in Firefox, the {{ic|general.smoothScroll.msdPhysics}} configurations can be changed to emulate a snappier behaviour like in other web browsers. For a quicker configuration, append the following to {{ic|~/.mozilla/firefox/'''your-profile'''/user.js}} (requires restart):<br />
<br />
user_pref("general.smoothScroll.lines.durationMaxMS", 125);<br />
user_pref("general.smoothScroll.lines.durationMinMS", 125);<br />
user_pref("general.smoothScroll.mouseWheel.durationMaxMS", 200);<br />
user_pref("general.smoothScroll.mouseWheel.durationMinMS", 100);<br />
user_pref("general.smoothScroll.msdPhysics.enabled", true);<br />
user_pref("general.smoothScroll.other.durationMaxMS", 125);<br />
user_pref("general.smoothScroll.other.durationMinMS", 125);<br />
user_pref("general.smoothScroll.pages.durationMaxMS", 125);<br />
user_pref("general.smoothScroll.pages.durationMinMS", 125);<br />
<br />
Additionally the mouse wheel scroll settings have to be changed to react in a smooth way as well:<br />
<br />
user_pref("mousewheel.min_line_scroll_amount", 30);<br />
user_pref("mousewheel.system_scroll_override_on_root_content.enabled", true);<br />
user_pref("mousewheel.system_scroll_override_on_root_content.horizontal.factor", 175);<br />
user_pref("mousewheel.system_scroll_override_on_root_content.vertical.factor", 175);<br />
user_pref("toolkit.scrollbox.horizontalScrollDistance", 6);<br />
user_pref("toolkit.scrollbox.verticalScrollDistance", 2);<br />
<br />
If you have troubles on machines with varying performance, try modifying the {{ic|mousewheel.min_line_scroll_amount}} until it feels snappy enough.<br />
<br />
== Tips and tricks ==<br />
<br />
For general enhancements see [[Firefox/Tweaks]], for privacy related enhancements see [[Firefox/Privacy]].<br />
<br />
=== Dark themes ===<br />
<br />
If a dark [[GTK]] theme is in use (e.g. Arc Dark), it is recommended to start Firefox with a brighter one (e.g. Adwaita). See [[GTK#Themes]] and [[Firefox/Tweaks#Unreadable input fields with dark GTK+ themes]] for more information.<br />
<br />
=== Screenshot of webpage ===<br />
<br />
You can ''Take a Screenshot'' by either clicking the ''Page actions'' button (the three horizontal dots) in the address bar or by right-clicking on the webpage. See [https://support.mozilla.org/en-US/kb/firefox-screenshots] for more information.<br />
<br />
{{Note|<br />
* The ''Save'' button misleadingly uploads your screenshot to a firefox.com subdomain. Set {{ic|extensions.screenshots.upload-disabled}} to {{ic|true}} to disable this behaviour. [https://github.com/mozilla-services/screenshots/issues/3503]<br />
* If [[Firefox/Privacy#Anti-fingerprinting|privacy.resistFingerprinting]] is enabled, to take a screenshot of a website using the above method, you need to grant it ''Extract Canvas Data'' permission.<br />
}}<br />
<br />
As an alternative you can use the full-page screenshot button in the ''Developer Tools'', which you can open with {{ic|F12}} or {{ic|Ctrl+Shift+i}} (you might need to enable the button first in the ''Developer Tools Settings > Available Toolbox Buttons > Take a screenshot of the entire page'').<br />
<br />
=== Window manager rules ===<br />
<br />
To apply different configurations to Firefox windows, change the WM_CLASS string by using Firefox's {{ic|--class}} option, to a custom one.<br />
<br />
==== Profiles ====<br />
<br />
To start new Firefox instances, multiple profiles are required. To create a new profile:<br />
<br />
$ firefox [--new-instance] -P<br />
<br />
Class can be specified when launching Firefox with a not-in-use profile:<br />
<br />
$ firefox [--new-instance] -P ''profile_name'' --class=''class_name''<br />
<br />
=== Touchscreen gestures and pixel-perfect trackpad scrolling ===<br />
<br />
{{Merge|Firefox/Tweaks#Enable touchscreen gestures|Same solution.}}<br />
<br />
To enable touch gestures (like scrolling and pinch-to-zoom) and one-to-one trackpad scrolling (as can be witnessed with GTK3 applications like Nautilus), set the {{ic|1=MOZ_USE_XINPUT2=1}} [[environment variable]] before starting Firefox.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Firefox startup takes very long ===<br />
<br />
If Firefox takes much longer to start up than other browsers, it may be due to lacking configuration of the localhost in {{ic|/etc/hosts}}. See [[Network configuration#Local network hostname resolution]] on how to set it up. <br />
<br />
=== Font troubleshooting ===<br />
<br />
See [[Font configuration]].<br />
<br />
Firefox has a setting which determines how many replacements it will allow from fontconfig. To allow it to use all your replacement-rules, change {{ic|gfx.font_rendering.fontconfig.max_generic_substitutions}} to {{ic|127}} (the highest possible value).<br />
<br />
=== Setting an email client ===<br />
<br />
Inside the browser, {{ic|mailto}} links by default are opened by a web application such as Gmail or Yahoo Mail. To set an external email program, go to ''Preferences > Applications'' and modify the ''action'' corresponding to the {{ic|mailto}} content type; the file path will need to be designated (e.g. {{ic|/usr/bin/kmail}} for Kmail).<br />
<br />
Outside the browser, {{ic|mailto}} links are handled by the {{ic|x-scheme-handler/mailto}} mime type, which can be easily configured with [[xdg-mime]]. See [[Default applications]] for details and alternatives.<br />
<br />
=== File association ===<br />
<br />
See [[Default applications]].<br />
<br />
=== Firefox keeps creating ~/Desktop even when this is not desired ===<br />
<br />
Firefox uses {{ic|~/Desktop}} as the default place for download and upload files. To change it to another folder, set the {{ic|XDG_DESKTOP_DIR}} option as explained in [[XDG user directories]].<br />
<br />
=== Make plugins respect blocked pop-ups ===<br />
<br />
Some plugins can misbehave and bypass the default settings, such as the Flash plugin. You can prevent this by doing the following:<br />
<br />
# Type {{ic|about:config}} into the address bar.<br />
# Right-click on the page and select ''New > Integer''.<br />
# Name it {{ic|privacy.popups.disable_from_plugins}}.<br />
# Set the value to {{ic|2}}.<br />
<br />
The possible values are:<br />
<br />
* {{ic|'''0'''}}: Allow all popups from plugins.<br />
* {{ic|'''1'''}}: Allow popups, but limit them to {{ic|dom.popup_maximum}}.<br />
* {{ic|'''2'''}}: Block popups from plugins.<br />
* {{ic|'''3'''}}: Block popups from plugins, even on whitelisted sites.<br />
<br />
=== Middle-click behavior ===<br />
<br />
To use the middle mouse button to paste whatever text has been highlighted/added to the clipboard, as is common in UNIX-like operating systems, set either {{ic|middlemouse.contentLoadURL}} or {{ic|middlemouse.paste}} to {{ic|true}} in {{ic|about:config}}. Having {{ic|middlemouse.contentLoadURL}} enabled was the default behaviour prior to Firefox 57.<br />
<br />
To scroll on middle-click (default for Windows browsers) set {{ic|general.autoScroll}} to {{ic|true}}.<br />
<br />
=== Backspace does not work as the 'Back' button ===<br />
<br />
According to [http://kb.mozillazine.org/Browser.backspace_action MozillaZine], the {{ic|Backspace}} key was mapped based on which platform the browser was running on. As a compromise, this preference was created to allow the {{ic|Backspace}} key to either go back/forward, scroll up/down a page, or do nothing.<br />
<br />
To make {{ic|Backspace}} go back one page in the tab's history and {{ic|Shift+Backspace}} go forward, set {{ic|browser.backspace_action}} to {{ic|0}} in {{ic|about:config}}.<br />
<br />
To have the {{ic|Backspace}} key scroll up one page and {{ic|Shift+Backspace}} scroll down one page, set {{ic|browser.backspace_action}} to {{ic|1}}. Setting this property to any other value will leave the key unmapped (Arch Linux defaults to {{ic|2}}, in other words, it is unmapped by default).<br />
<br />
=== Firefox does not remember login information ===<br />
<br />
It may be due to a corrupted {{ic|cookies.sqlite}} file in [https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data Firefox's profile] folder. In order to fix this, just rename or remove {{ic|cookie.sqlite}} while Firefox is not running.<br />
<br />
Open a terminal of choice and type the following:<br />
<br />
$ rm -f ~/.mozilla/firefox/<profile id>.default/cookies.sqlite<br />
<br />
The profile id is a random 8 character string.<br />
<br />
Restart Firefox and see if it solved the problem.<br />
<br />
=== "Do you want Firefox to save your tabs for the next time it starts?" dialog does not appear ===<br />
<br />
From the [https://support.mozilla.com/en-US/questions/767751 Mozilla support] site:<br />
<br />
# Type {{ic|about:config}} in the address bar.<br />
# Set {{ic|browser.warnOnQuit}} to {{ic|true}}.<br />
# Set {{ic|browser.showQuitWarning}} to {{ic|true}}.<br />
<br />
=== Firefox detects the wrong version of my plugin ===<br />
<br />
When you close Firefox, the latter saves the current timestamp and version of your plugins inside {{ic|pluginreg.dat}} located in your profile folder, typically in {{ic|~/.mozilla/firefox/''xxxxxxxx''.default/}}.<br />
<br />
If you upgraded your plugin when Firefox was still running, you will thus have the wrong information inside that file. The next time you will restart Firefox you will get that message {{ic|Firefox has prevented the outdated plugin "XXXX" from running on ...}} when you will be trying to open content dedicated to that plugin on the web. This problem often appears with the official [[Browser plugins#Adobe Flash Player|Adobe Flash Player plugin]] which has been upgraded while Firefox was still running.<br />
<br />
The solution is to remove the file {{ic|pluginreg.dat}} from your profile and that is it. Firefox will not complain about the missing file as it will be recreated the next time Firefox will be closed. [https://bugzilla.mozilla.org/show_bug.cgi?id=1109795#c16]<br />
<br />
=== JavaScript context menu does not appear on some sites ===<br />
<br />
You can try setting {{ic|dom.w3c_touch_events.enabled}} to {{ic|0}} in {{ic|about:config}}.<br />
<br />
=== Firefox does not remember default spell check language ===<br />
<br />
The default spell checking language can be set as follows:<br />
<br />
# Type {{ic|about:config}} in the address bar.<br />
# Set {{ic|spellchecker.dictionary}} to your language of choice, for instance {{ic|en_GB}}.<br />
# Notice that the for dictionaries installed as a Firefox plugin the notation is {{ic|en-GB}}, and for {{Pkg|hunspell}} dictionaries the notation is {{ic|en_GB}}.<br />
<br />
When you only have system wide dictionaries installed with {{Pkg|hunspell}}, Firefox might not remember your default dictionary language settings. This can be fixed by having at least one [https://addons.mozilla.org/firefox/language-tools/ dictionary] installed as a Firefox plugin. Notice that now you will also have a tab '''Dictionaries''' in '''add-ons'''.<br />
<br />
Related questions on the '''StackExchange''' platform: [https://stackoverflow.com/questions/26936792/change-firefox-spell-check-default-language/29446115], [https://stackoverflow.com/questions/21542515/change-default-language-on-firefox/29446353], [https://askubuntu.com/questions/184300/how-can-i-change-firefoxs-default-dictionary/576877]<br />
<br />
Related bug reports: [https://bugzilla.mozilla.org/show_bug.cgi?id=776028 Bugzilla 776028], [https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1026869 Ubuntu bug 1026869]<br />
<br />
=== Some MathML symbols are missing ===<br />
<br />
You need some Math fonts, namely Latin Modern Math and STIX (see this MDN page: [https://developer.mozilla.org/en-US/docs/Mozilla/MathML_Project/Fonts#Linux]), to display MathML correctly.<br />
<br />
In Arch Linux, these fonts are provided by {{Pkg|texlive-core}} '''and''' {{Pkg|texlive-fontsextra}}, but they are not available to fontconfig by default. See [[TeX Live#Making fonts available to Fontconfig]] for details. You can also try other [[Fonts#Math|Math fonts]].<br />
<br />
=== Tearing video in fullscreen mode ===<br />
<br />
If you are using the Xorg Intel or Nouveau drivers and experience tearing video in fullscreen mode, try [[Firefox tweaks#Enable OpenGL Off-Main-Thread Compositing (OMTC)]].<br />
<br />
=== Firefox WebRTC module cannot detect a microphone ===<br />
<br />
WebRTC applications for instance [https://mozilla.github.io/webrtc-landing/gum_test.html Firefox WebRTC getUserMedia test page] say that microphone cannot be found. Issue is reproducible for both ALSA or PulseAudio setup. Firefox debug logs show the following error:<br />
<br />
{{hc|1=$ NSPR_LOG_MODULES=MediaManager:5,GetUserMedia:5 firefox|2=<br />
...<br />
[Unnamed thread 0x7fd7c0654340]: D/GetUserMedia VoEHardware:GetRecordingDeviceName: Failed 1<br />
}}<br />
<br />
You can try setting {{ic|media.navigator.audio.full_duplex}} property to {{ic|false}} at {{ic|about:config}} Firefox page and restart Firefox.<br />
<br />
This can also help if you are using the PulseAudio [[PulseAudio/Troubleshooting#Enable Echo/Noise-Cancellation|module-echo-cancel]] and Firefox does not recognise the virtual echo canceling source.<br />
<br />
== See also ==<br />
<br />
* [https://www.mozilla.org/firefox/ Official website]<br />
* [https://www.mozilla.org/ Mozilla Foundation]<br />
* [[MozillaWiki:Firefox]]<br />
* [https://addons.mozilla.org/ Firefox Add-ons]<br />
* [https://addons.mozilla.org/firefox/themes/ Firefox themes]<br />
* [[Wikipedia:Mozilla Firefox]]<br />
* [http://forums.mozillazine.org/ mozillaZine] unofficial forums</div>Pdchttps://wiki.archlinux.org/index.php?title=Talk:Domain_name_resolution&diff=567819Talk:Domain name resolution2019-03-03T12:40:48Z<p>Pdc: /* Some DNS servers flush the cache when the configuration changes */ new section</p>
<hr />
<div>== Covering DNS servers in general ==<br />
<br />
[[Domain name resolution#Resolvers]] currently focuses on running a local name server as a resolver. I think it can be expanded to cover DNS servers in general, including authoritative-only servers. See my draft below.<br />
<br />
I also added ''Package'' and ''Authoritative'' columns and merged the legend into the table header.<br />
<br />
--[[User:Larivact|Larivact]] ([[User talk:Larivact|talk]]) 19:18, 2 January 2019 (UTC)<br />
<br />
=== Resolver performance ===<br />
<br />
The Glibc resolver does not cache queries. If you want local caching use [[systemd-resolved]] or set up a local caching [[#DNS servers|DNS server]] and use {{ic|127.0.0.1}} as your name server.<br />
<br />
{{Tip|<br />
* The ''drill'' or ''dig'' [[#Lookup utilities|lookup utilities]] report the query time.<br />
* A router usually sets its own caching resolver as the network's DNS server thus providing DNS cache for the whole network. <br />
* If it takes too long to switch to the next DNS server you can try [[#Limit lookup time|decreasing the timeout]].}}<br />
<br />
=== DNS servers ===<br />
<br />
[[DNS]] servers can be [[Wikipedia:Authoritative name server|authoritative]] and [[Wikipedia:Name server#Recursive query|recursive]]. If they are neither, they are called '''stub resolvers''' and simply forward all queries to another recursive name server. Stub resolvers are typically used to introduce DNS caching on the local host or network. Note that the same can also be achieved with a fully-fledged name server. This section compares the available DNS servers, for a more detailed comparison, refer to [[Wikipedia:Comparison of DNS server software|Wikipedia]].<br />
<br />
{{Expansion|Fill in the unknowns. Add {{AUR|deadwood}}.}}<br />
<br />
{| class="wikitable sortable" style="text-align:center"<br />
! Name !! Package !! [[Wikipedia:Authoritative name server|Authoritative]]<br>/ [[Wikipedia:Name server#Recursive query|Recursive]] !! [[Wikipedia:Name server#Caching name server|Cache]] !! [[resolvconf]] !! [[Wikipedia:Domain Name System Security Extensions#The lookup procedure|Validates]]<br>[[DNSSEC]] !! [[Wikipedia:DNS over TLS|DNS<br>over TLS]] !! [[Wikipedia:DNS over HTTPS|DNS<br>over HTTPS]]<br />
|-<br />
! [[dnscrypt-proxy]]<sup>1</sup><br />
| {{Pkg|dnscrypt-proxy}} || {{No}} || {{Yes}} || {{No}} || {{No}} || {{No}} || {{Yes}}<br />
|-<br />
! [[Rescached]]<br />
| {{AUR|rescached-git}} || {{No}} || {{Yes}} || {{Yes|https://github.com/shuLhan/rescached-go#integration-with-openresolv}} || {{No}} || {{No}} || {{Y|Limited}}<sup>2</sup><br />
|-<br />
! [[Stubby]]<br />
| {{Pkg|stubby}} || {{No}} || {{No}} || {{No}} || {{Yes}} || {{Yes}} || {{No}}<br />
|-<br />
!style="white-space: nowrap;"| [[systemd-resolved]]<br />
| {{Pkg|systemd}} || {{No}} || {{Yes}} || {{G|[[systemd-resolvconf|Yes]]}} || {{Yes}} || {{Y|Insecure}}<sup>3</sup> || {{No|https://github.com/systemd/systemd/issues/8639}}<br />
|-<br />
! [[dnsmasq]]<br />
| {{Pkg|dnsmasq}} || {{Y|Partial}}<sup>4</sup> || {{Yes}} || {{G|[[openresolv#Subscribers|Yes]]}} || {{Yes}} || {{No|http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2018q2/012131.html}} || {{No}}<br />
|-<br />
! [[BIND]]<br />
| {{Pkg|bind}} || {{Yes}} || {{Yes}} || {{G|[[openresolv#Subscribers|Yes]]}} || {{Yes}} || ? || ?<br />
|-<br />
! [[Knot Resolver]]<br />
| {{AUR|knot-resolver}} || {{Yes}} || {{Yes}} || {{No}} || {{Yes}} || {{Yes}} || {{No|https://gitlab.labs.nic.cz/knot/knot-resolver/issues/243}}<br />
|-<br />
! [[Wikipedia:MaraDNS|MaraDNS]]<br />
| {{AUR|maradns}} || {{Yes}} || {{Yes}} || {{No}} || {{No}} || {{No}} || {{No}}<br />
|-<br />
! [[pdnsd]]<br />
| {{Pkg|pdnsd}} || {{Yes}} || {{G|Permanent}} || {{G|[[openresolv#Subscribers|Yes]]}} || {{No}} || {{No}} || {{No}}<br />
|-<br />
! [https://www.powerdns.com/recursor.html PowerDNS Recursor]<br />
| {{Pkg|powerdns-recursor}} || {{Yes}} || {{Yes}} || {{No|https://roy.marples.name/projects/openresolv/config#pdns_recursor}} || {{Yes}} || ? || ?<br />
|-<br />
! [[Unbound]]<br />
| {{Pkg|unbound}} || {{Yes}} || {{Yes}} || {{G|[[openresolv#Subscribers|Yes]]}} || {{Yes}} || {{Yes}} || {{No|1=https://nlnetlabs.nl/bugs-script/show_bug.cgi?id=1200}}<br />
|}<br />
<br />
# Implements a [[Wikipedia:DNSCrypt|DNSCrypt]] protocol client.<br />
# Only forwards using DNS over HTTPS when Rescached itself is queried using DNS over HTTPS.[https://github.com/shuLhan/rescached-go#integration-with-dns-over-https]<br />
# From {{man|5|resolved.conf}}: ''Note as the resolver is not capable of authenticating the server, it is vulnerable for "man-in-the-middle" attacks.''[https://github.com/systemd/systemd/issues/9397] Also, the only supported mode is "opportunistic", which ''makes DNS-over-TLS vulnerable to "downgrade" attacks''.[https://github.com/systemd/systemd/issues/10755]<br />
# From [[Wikipedia:Comparison_of_DNS_server_software#cite_note-masqauth-26|Wikipedia]]: dnsmasq has limited authoritative support, intended for internal network use rather than public Internet use.<br />
<br />
==== Authoritative-only servers ====<br />
<br />
{| class="wikitable sortable" style="text-align:center"<br />
! Name !! Package !! [[DNSSEC]] !! Geographic<br>balancing<br />
|-<br />
! [https://gdnsd.org/ gdnsd]<br />
| {{Pkg|gdnsd}} || {{No}} || {{Yes}}<br />
|-<br />
! [https://www.knot-dns.cz/ Knot DNS]<br />
| {{Pkg|knot}} || {{Yes}} || {{No}}<br />
|-<br />
! [[NSD]]<br />
| {{Pkg|nsd}} || {{No}} || {{No}}<br />
|-<br />
! [https://www.powerdns.com/auth.html PowerDNS]<br />
| {{Pkg|powerdns}} || {{Yes}} || {{Yes}}<br />
|}<br />
<br />
=== Draft comments ===<br />
<br />
Good work with the tables. I'm just not so sure it's a good idea to cover DNS-servers in general in the same subsection. The whole article is written from a client system perspective and that's appropriate, as a server is out of bounds for most and the info may distract from the KISS solutions for a typical client system.<br />
I would move the new info down into the new [[#Authoritative-only servers]], rename that & move it to the end of the article - so it does not mix with desktop usage. Also note some columns may have different meanings for a client or server feature. Further, "authoritative" does not add much to "recursive" in this short context. Hence, I'm wondering if it makes more sense to move the packages which are "authoritative/recursive DNS servers/resolvers" into the new section table in total. --[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 22:10, 2 January 2019 (UTC)<br />
<br />
:The fully-fledged servers can just as well be used for a local caching server and there are also scenarios where it makes sense (for example if both caching and DNS over TLS are desired), so I think they should be in the same table as the stub resolvers. And I also think it makes sense to keep authoritative servers next to each other. If the comparison does not fit into the article, perhaps it should be outsourced to a new [[Comparison of DNS servers]] article. --[[User:Larivact|Larivact]] ([[User talk:Larivact|talk]]) 22:45, 2 January 2019 (UTC)<br />
<br />
::Well, some even run [[Unbound#Adding_an_authoritative_DNS_server|two dns servers]]; for example since authoritative name servers are frequently abused for DDoS attacks. That is another reason subsumed in my suggestion it is "out of bounds for most". But anyway, I [https://wiki.archlinux.org/index.php?title=Domain_name_resolution&type=revision&diff=561625&oldid=561542 moved] sections so that the referred client sections are not in the way. Perhaps wait a bit more (in case of other suggestions) before going ahead as you planned. --[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 15:53, 3 January 2019 (UTC)<br />
<br />
:::I think that any open DNS server can be abused for DNS amplification attacks and I don't see how running two servers helps in that regard. --[[User:Larivact|Larivact]] ([[User talk:Larivact|talk]]) 19:04, 3 January 2019 (UTC)<br />
<br />
:::: There are different reasons using two may be helpful - I now write "may" just as I wrote "some" above. Feature reduction is a widely taught common IT sec design strategy. There are a few names for it, e.g. [https://www.owasp.org/index.php/Security_by_Design_Principles#Minimize_attack_surface_area]. --[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 18:18, 9 January 2019 (UTC)<br />
<br />
:::Merged, closing this. --[[User:Larivact|Larivact]] ([[User talk:Larivact|talk]]) 17:17, 9 January 2019 (UTC)<br />
<br />
::::I reopen. I don't have time now to look at the merge, which is rather complex - unfortunately starting from [[Special:Diff/562538]] instead of above draft. I hope we don't have to roll back. --[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 18:18, 9 January 2019 (UTC)<br />
<br />
:::::I just copied the draft. --[[User:Larivact|Larivact]] ([[User talk:Larivact|talk]]) 18:38, 9 January 2019 (UTC)<br />
<br />
::::::Ok, good to know & easier. I will close this when finished. --[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 19:12, 9 January 2019 (UTC)<br />
<br />
:::::::I just filled in gaps in the "auth" server table. Can I remove the "Fill in the unknowns" note? --[[User:Pspacek|Pspacek]] ([[User talk:Pspacek|talk]])<br />
<br />
::::::::Yes, you can remove the "Fill in the unknowns" sentence. If you'll also add Deadwood to the table, then you could remove the whole expansion template. -- 10:12, 28 February 2019 (UTC)<br />
<br />
== Some DNS servers flush the cache when the configuration changes ==<br />
<br />
{{ic|unbound}} and {{ic|systemd-resolved}} flush the cache when the network configuration changes. However {{ic|dnsmasq}} with the default setup keeps its cache when the configuration changes. Is this information worth adding to the comparison table? -- [[User:Pdc|Pdc]] ([[User talk:Pdc|talk]]) 12:40, 3 March 2019 (UTC)</div>Pdchttps://wiki.archlinux.org/index.php?title=Arch_is_the_best&diff=566612Arch is the best2019-02-14T16:16:08Z<p>Pdc: /* The code */ BASIC:fix typo</p>
<hr />
<div>[[Category:About Arch]]<br />
[[ja:Arch は最高]]<br />
[[ru:Arch is the best]]<br />
The '''Arch is the best''' project is a very sophisticated and exquisite, ego-boosting and mind-blowing (albeit perhaps a bit over-engineered) project which gives proof of Arch's superiority.<br />
<br />
== History ==<br />
<br />
The visionary project was originally devised in April 2008 by long time Arch community member [https://bbs.archlinux.org/profile.php?id=2529 lucke] as a simple shell script which provided irrefutable proof that "Arch is the best". It was announced to the world with a [https://bbs.archlinux.org/viewtopic.php?id=47306 forum post], thus illuminating other people's minds, who immediately started porting it to multiple different languages, both programming and verbal, so that every human being on the planet could fully appreciate and benefit from this revolutionary discovery.<br />
<br />
== The code ==<br />
<br />
The "Arch is the best" project is ported to many programming languages.<br />
<br />
;1C&#58;Enterprise 7.7/8/8.1/8.2:A procedural domain-specific compiled dynamically-typed programming language mostly similar to VisualBasic which is used in "1C:Enterprise" products widespread in Russia and other CIS countries.<br />
<br />
Предупреждение("Arch is the best!");<br />
<br />
;ABAP: Advanced Business Application Programming language.<br />
<br />
REPORT zwhat_is_the_best.<br />
WRITE 'Arch is the best'.<br />
<br />
;Ada: A systems critical programming language.<br />
<br />
with Ada.Text_IO;<br />
use Ada.Text_IO;<br />
procedure ArchIsTheBest is<br />
begin<br />
Put_Line("Arch is the best!");<br />
end ArchIsTheBest;<br />
<br />
;APL: A Programming Language.<br />
<br />
'Arch is the best!'<br />
<br />
;AppleScript: A scripting language created by Apple Inc. and built into the Classic Mac OS since System 7 and into all versions of macOS.<br />
<br />
display alert "Arch is the best!"<br />
say "Indeed, Arch is the best."<br />
<br />
;ArnoldC: Programming language based on the one-liners of Arnold Schwarzenegger.<br />
<br />
IT'S SHOWTIME<br />
TALK TO THE HAND "Arch is the best!"<br />
YOU HAVE BEEN TERMINATED<br />
<br />
;ATS: A functional programming language that uses dependent types to improve programs' reliability.<br />
<br />
implement main () = println! "Arch is the best!"<br />
<br />
;Awk: A data-driven programming language designed for processing text-based data.<br />
<br />
BEGIN {<br />
print "Arch is the best!"<br />
}<br />
<br />
;BASIC: A scripting language that one of the most commonly used computer programming languages in the 1960's, considered an easy step for students to learn before more powerful languages such as FORTRAN.<br />
<br />
10 PRINT "Arch is the best!"<br />
<br />
;Batch: A scripting language for Windows that can be used to automate tasks or just have some fun.<br />
<br />
@echo off<br />
echo Arch is the best!<br />
pause<br />
<br />
;Befunge: Believed to be the first two-dimensional, ASCII-based, general-purpose (in the sense of "you could plausibly write Hunt the Wumpus in it") programming language.<br />
<br />
<v"Arch is the best!"0<br />
<,_@#:<br />
<br />
;Boo:A stablished object oriented statically typed programming language for .NET and Mono with a python inspired syntax and a special focus on metaprogramming through language and compiler extensibility features such as macros and custom compilation pipelines.<br />
<br />
print "Arch is the best!"<br />
<br />
;Bourne shell: The original program, should be compatible with any shell.<br />
<br />
#!/bin/sh<br />
echo "Arch is the best!"<br />
<br />
;Bourne shell (Alternate):Handy for piping the output to your favourite IRC/email/IM client. Should work with any shell.<br />
<br />
#!/bin/sh<br />
yes Arch is the best!<br />
<br />
;Bourne shell (Dynamically updated)<br />
<br />
#!/bin/sh<br />
<nowiki>w3m -dump "https://wiki.archlinux.org/index.php/Arch_is_the_best" | sed -n '/^Translations/,/^Encodings/p'</nowiki><br />
<br />
;or<br />
<br />
<pre style='overflow:auto'><br />
#!/bin/bash<br />
curl -s "https://wiki.archlinux.org/index.php?title=Arch_is_the_best&action=raw" | sed -n '/==Translations==/,$p' | sed "s/^\(.*\)$/* \1:/;t;s/^[^=]/ &/"<br />
</pre><br />
<br />
;brainfuck: Doesn't the language name explain it?<br />
<br />
++>++++++>+++++<+[>[->+<]<->++++++++++<]>>.<[-]>[-<++>]<br />
<----------------.---------------.+++++.<+++[-<++++++++++>]<.<br />
>>+.++++++++++.<<.>>+.------------.---.<<.>>---.<br />
+++.++++++++++++++.+.<<+.[-]++++++++++.<br />
<br />
;C: Note the three space indenting used in this project, much like that used by other superior beings.<br />
<br />
#include <stdio.h><br />
#include <stdlib.h><br />
int main(void)<br />
{<br />
puts("Arch is the best!");<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
;C#: Intended to be a simple, modern, general-purpose, object-oriented programming language.<br />
<br />
using System;<br />
public class ArchIsTheBest<br />
{<br />
static public void Main ()<br />
{<br />
Console.WriteLine ("Arch is the best!");<br />
}<br />
}<br />
<br />
;C++:Arch == Linux++<br />
<br />
#include <iostream><br />
#include <cstdlib><br />
int main ()<br />
{<br />
std::cout << "Arch is the best!" << std::endl;<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
;COBOL:A simple, lightweight programming language.<br />
<br />
IDENTIFICATION DIVISION.<br />
PROGRAM-ID. TheBest.<br />
<br />
PROCEDURE DIVISION.<br />
DISPLAY "Arch is the best!".<br />
STOP RUN.<br />
<br />
;CoffeeScript: A programming language that transcompiles to JavaScript.<br />
<br />
alert 'Arch is the best!'<br />
<br />
;Clojure: A Lisp dialect that runs on the JVM.<br />
<br />
(def translations {"english" "Arch is the best!",<br />
"german" "Arch ist das Beste!",<br />
"australian" "Arch is fair dinkum, mate!",<br />
"h4x0r" "arhc 51 7he be57!",<br />
"spanish" "¡Arch es el mejor!"})<br />
<br />
(defn read-choice []<br />
(println "\nAvailable languages: ")<br />
(doall (map #(println (key %)) translations))<br />
(print "Enter language or Ctrl-c: ") (flush)<br />
(translations (read-line) :badinput))<br />
<br />
(defn arch-is-the-best []<br />
(loop [choice (read-choice)]<br />
(case choice<br />
:badinput (do (print "\nBad input!\n")<br />
(recur (read-choice)))<br />
(do (print "\n" choice "\n")<br />
(recur (read-choice))))))<br />
<br />
;or<br />
<br />
(def translations {"english" "Arch is the best!",<br />
"german" "Arch ist das Beste!",<br />
"australian" "Arch is fair dinkum, mate!",<br />
"h4x0r" "arhc 51 7he be57!",<br />
"spanish" "¡Arch es el mejor!"<br />
"street" "Arch iz da shizzle ma nizzle"})<br />
(while 1<br />
(println "\nPick a language:\n" (map #(key %) translations) "\n language: ")<br />
(println (translations (read-line) "Not a valid language")))<br />
<br />
;or<br />
<br />
(prn "Arch is the best!")<br />
<br />
;Common Lisp: Tested on SBCL, feel free to add more of the translations.<br />
<br />
#!/usr/bin/sbcl --script<br />
(defparameter *best-list* '((English "Arch is the best!")<br />
(Chinese "Arch, 她出类拔萃!")<br />
(German "Arch ist das Beste!")<br />
(Greek "Το Arch είναι το καλύτερο!")<br />
(Latin "Arch est optimus!")<br />
(French "Arch est le meilleur!")))<br />
(defun aitb ()<br />
(format t "Available languages: ~{~{~@(~a~)~*~}~^, ~}.~%" *best-list*)<br />
(loop for input = (progn (format t "~&Input the desired language, (or 'quit'): ~%")<br />
(force-output)<br />
(read-line))<br />
if (string-equal input "quit")<br />
do (loop-finish)<br />
else<br />
do (let ((language-def<br />
(assoc input *best-list*<br />
:key (lambda (lang) (symbol-name lang))<br />
:test #'string-equal)))<br />
(if language-def<br />
(format t "~&~A~%" (second language-def))<br />
(format t "~&Invalid language.~%"))))<br />
(format t "~&May the Arch be with you!~%"))<br />
(aitb)<br />
<br />
;Common Lisp (Alternate): Should run on any implementation (Clisp, Allegro, SBCL...)<br />
<br />
(princ "Arch is the best!")<br />
<br />
;Crystal: An object-oriented, Ruby-like language.<br />
<br />
puts "Arch is the best!"<br />
<br />
;Crystal (through web server): For distributing the message to multiple friends at once.<br />
<br />
# For giving the message to your friends<br />
require "http/server"<br />
<br />
server = HTTP::Server.new(80) do |context|<br />
context.response.content_type = "text/plain"<br />
context.response.print "Arch is the best!"<br />
end<br />
<br />
puts "Listening."<br />
server.listen<br />
<br />
;csh: A C-like shell.<br />
<br />
#!/bin/csh<br />
echo "Arch is the best!"<br />
<br />
;CSS: A stylesheet language, heavily used for styling web pages.<br />
<br />
body * {<br />
display: none;<br />
}<br />
<br />
body::before {<br />
content: "Arch is the best!";<br />
font-family: monospace;<br />
font-size: 2.7rem;<br />
position: absolute;<br />
left: 50%;<br />
top: 50%;<br />
transform: translate(-50%, -50%);<br />
}<br />
<br />
;D: A C-style language. The benefits of hindsight, with modern conveniences.<br />
<br />
import std.stdio : writeln;<br />
void main()<br />
{<br />
writeln("Arch is the best");<br />
}<br />
<br />
;Dart: Google's javascript killer<br />
<br />
main(){<br />
print('Arch is the best');<br />
}<br />
<br />
;Dogescript: Doge-friendly JavaScript<br />
<br />
console.loge with ' So Arch'<br />
console.loge with ' Much Good'<br />
console.loge with ' Wow'<br />
<br />
;Ebuild: Gentoo's build script format.<br />
<br />
DESCRIPTION="Arch is the best!"<br />
SRC_URI="https://wiki.archlinux.org/index.php/Arch_is_the_best"<br />
<br />
LICENSE="GFDL_1.3"<br />
SLOT="0"<br />
KEYWORDS=""<br />
IUSE=""<br />
<br />
DEPEND=""<br />
RDEPEND=""<br />
<br />
src_compile() {<br />
einfo "Arch is the best!"<br />
}<br />
<br />
;Emacs Lisp: A dialect of the Lisp programming language used by the GNU Emacs and XEmacs text editors<br />
<br />
(message "Arch is the best!")<br />
<br />
;Emojicode: A delimiter-less, object oriented, imperative, high-level, hybrid language with emojis as fix points and methods.<br />
<br />
🏁 🍇<br />
😀 🔤Arch is the best!🔤❗️<br />
🍉<br />
<br />
;Elixir: A dynamic, functional language designed for building scalable and maintainable applications<br />
<br />
IO.puts "Arch is the best!"<br />
<br />
;Erlang: A concurrent, garbage-collected programming language and runtime system.<br />
<br />
-module(arch).<br />
-export([is_the_best/0]).<br />
is_the_best() -> io:fwrite("Arch is the best!\n").<br />
<br />
;Or using message passing between processes<br />
<br />
-module(arch).<br />
-export([ultimate_question/0,the_answer/0]).<br />
the_answer() -><br />
receive<br />
{Client,who_is_the_best} -><br />
Client ! {self(),"Arch is the best!"};<br />
{Client,_} -><br />
Client ! {self(),"Taco Taco Taco!"}<br />
end,<br />
the_answer().<br />
ultimate_question() -><br />
Pid = spawn(arch,the_answer,[]),<br />
Pid ! {self(),who_is_the_best},<br />
receive<br />
{Pid,Response} -> io:format("~s~n",[Response])<br />
end.<br />
<br />
;F#: A strongly-typed, functional-first programming language for writing simple code to solve complex problems.<br />
<br />
printfn "Arch is the best!"<br />
<br />
;Factor: High-level stack-based language.<br />
<br />
"Arch is the best" print<br />
<br />
;FIM++: A wordy, imperative, dynamically-typed, and interpreted language that can use Java classes.<br />
<br />
Dear Princess Celestia: Letter About Arch Linux.<br />
Today I learned:<br />
I wrote "Arch is the best!".<br />
Your faithful student, Twilight Sparkle<br />
<br />
;Forth:Stack-based language.<br />
<br />
." Arch is the best" cr -- kiss way<br />
<br />
;Fortran95<br />
<br />
program arch<br />
print *,"Arch is the best!"<br />
end program arch<br />
<br />
;Genie: A new programming language, that allows for a more modern programming style while being able to effortlessly create and use GObjects natively.<br />
<br />
init<br />
print "Arch is the best"<br />
<br />
;Gjs: A Javascript binding for GNOME. It's mainly based on Spidermonkey javascript engine and the GObject introspection framework.<br />
<br />
#!/usr/bin/env gjs<br />
print ('Arch is the best');<br />
<br />
;Go: A language created by Google that's a love child between C, C++ and Python.<br />
<br />
package main<br />
<br />
import "fmt"<br />
<br />
func main() {<br />
fmt.Println("Arch is the best!")<br />
}<br />
<br />
;Groovy: An agile and dynamic language for the Java Virtual Machine.<br />
<br />
println 'Arch is the best!' <br />
<br />
;Haskell: The language where IO is easy and unproblematic.<br />
<br />
main = putStrLn "Arch is the best!"<br />
<br />
;HTML: A markup language used to create and define web pages and their content.<br />
<br />
<pre><br />
<!DOCTYPE html><br />
<html lang='en'><br />
<head><br />
<title>Arch is the best!</title><br />
</head><br />
<body><br />
<p>Arch is the best!</p><br />
</body><br />
</html><br />
</pre><br />
<br />
;Idris: A general purpose pure functional programming language with dependent types. Haskell, but crazier.<br />
<br />
module Main<br />
<br />
main : IO ()<br />
main = putStrLn "Arch is the best!"<br />
<br />
;Io: A pure object-oriented programming language inspired by Smalltalk, Self, Lua, Lisp, Act1, and NewtonScript.<br />
<br />
"Arch is the best!" println<br />
<br />
;Java: An extremely portable language, this will run on pretty much anything, it might even run on your toaster!<br />
<br />
public class ArchIsTheBest {<br />
public static void main(String[] args) {<br />
System.out.println("Arch is the best!");<br />
}<br />
}<br />
<br />
;JavaScript: Also known as ECMAScript, a prototype-based object-oriented scripting language.<br />
<br />
console.log('Arch is the best!');<br />
<br />
;JavaScript (in a web browser)<br />
<br />
alert('Arch is the best!');<br />
<br />
;Julia: A fresh approach to numerical computing.<br />
<br />
println("Arch is the best!")<br />
<br />
;Kotlin: JetBrains' attempt to get world domination.<br />
<br />
fun main(args: Array<String>) {<br />
println("Arch is the best!")<br />
}<br />
<br />
;LilyPond: A powerful music engraving program with an intuitive LaTeX-like input language.<br />
<br />
\version "2.12.3"<br />
\include "english.ly"<br />
\header { title = "Arch is the best!" }<br />
\score<br />
{<br />
<<<br />
\relative c' { c4 e g c \bar "||" }<br />
\addlyrics { Arch is the best! }<br />
>><br />
}<br />
<br />
;LOLCODE: Why not?<br />
<br />
HAI<br />
CAN HAS STDIO?<br />
VISIBLE "ARCH IS TEH PWNZ LOL!"<br />
KTHXBYE<br />
<br />
;Lua: A lightweight, extensible programming language.<br />
<br />
print "Arch is the best!"<br />
<br />
;Malbolge: A language created to make programming as hard as possible.<br />
<br />
bCBA@?>=<;:9876543210/.-,+*)('&%$#"!~}|{zyxwvutsrqponmlkjihgfedcba`_^]<br />
\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9y16543210/.-,+*)('&}C#"!~}|{zyxwvu<br />
tsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLK-CgGFEDCBA@?>=<;:98x6543210/<br />
.-,+*)('&%$#"!~}|u;yxwpun4rqpRhmf,jihgIe^$ba`_^]\[ZYXQVUTMqQPONMFjJI+A<br />
eEDC%A:^>=<|:981U54t21*/.-&Jk)('&}C#"!aw={z\xwvun4lqpi/mlkjiKaf_%p<br />
<br />
;Matlab: A proprietary programming language developed by MathWorks.<br />
<br />
disp('Arch is the best!');<br />
<br />
;Morpho: Morpho is a multi-paradigm programming language that supports procedural, object-oriented and functional programming.<br />
<br />
writeln("Arch is the best!");<br />
<br />
;Myrddin: A system programming language which aims for control and simplicity, featuring strong type checking, generics, type inference, closures, and traits.<br />
<br />
/* mbld -b aitb aitb.myr */<br />
use std<br />
const main = {<br />
std.put("Arch is the best!\n")<br />
}<br />
<br />
;NASM / Yasm (i686): Notice that the string is in the .text section, which feels superior.<br />
<br />
;nasm -f elf32 arch.asm<br />
;ld -o arch arch.o<br />
;./arch<br />
<br />
section .text<br />
global _start<br />
_start:<br />
mov edx,len<br />
mov ecx,msg<br />
mov ebx,1<br />
mov eax,4<br />
int 0x80<br />
xor ebx,ebx<br />
mov eax,1<br />
int 0x80<br />
msg: db "Arch is the best!",10<br />
len equ $-msg<br />
<br />
<br />
;NASM / Yasm (x86_64) :Featuring AMD's sexy new instruction, ''syscall''.<br />
<br />
;nasm -f elf64 arch.asm<br />
;ld -o arch arch.o<br />
;./arch<br />
<br />
section .text<br />
global _start<br />
s:<br />
db 'Arch is the best!',0ah<br />
l equ $-s<br />
_start:<br />
mov rax,1<br />
mov rdi,1<br />
mov rsi,s<br />
mov rdx,l<br />
syscall<br />
mov rax,60<br />
xor rdi,rdi<br />
syscall<br />
<br />
;Nim:Portable lightweight programming language.<br />
<br />
echo "Arch is the best!"<br />
<br />
;node.js: a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications, using an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.<br />
<br />
console.log('Arch is the best!');<br />
<br />
;Objective-C: A reflective, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.<br />
<br />
NSLog(@"Arch is the best!");<br />
<br />
;OCaml: The main implementation of the Caml programming language.<br />
<br />
print_endline "Arch is the best!"<br />
<br />
;Octave: High-level interpreted language, primarily intended for numerical computations.<br />
<br />
printf("Arch is the best!\n")<br />
<br />
;Ook!: brainfuck, translated to Orangutan.<br />
<br />
Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook! Ook? Ook. Ook? Ook! Ook? Ook! Ook! Ook. Ook? Ook. Ook. Ook? Ook. Ook? Ook! Ook? Ook. Ook! Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook. Ook! Ook? Ook! Ook! Ook? Ook! Ook. Ook? Ook! Ook? Ook! Ook! Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook! Ook! Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook? Ook! Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook! Ook. Ook! Ook? Ook! Ook! Ook? Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook.<br />
<br />
;Pascal: An influential imperative and procedural programming language.<br />
<br />
program ArchIsTheBest;<br />
begin<br />
writeln('Arch is the best!');<br />
end.<br />
<br />
;Perl:A high-level, general-purpose, interpreted, dynamic programming language.<br />
<br />
#!/usr/bin/env perl<br />
print "Arch is the best!\n";<br />
<br />
;Perl 6: The latest member of the Perl family.<br />
<br />
#!/usr/bin/env perl6<br />
say 'Arch is the best!';<br />
<br />
;PHP: A general-purpose scripting language.<br />
<br />
<?php<br />
echo "Arch is the best!\n";<br />
<br />
;Pixilang: Make me pixels.<br />
<br />
print("Arch is the best!",0,0,#1897D1)<br />
frame<br />
<br />
;Pony:An object-oriented, actor-model, capabilities-secure, high performance programming language.<br />
<br />
actor Main<br />
new create(env: Env) =><br />
env.out.print("Arch is the best!")<br />
<br />
;Portable GNU assembler: {{ic|as -o arch.o arch.s && ld -o arch -O0 arch.o}}<br />
<br />
.section .data<br />
archIsBest:<br />
.ascii "Arch is the best!\n"<br />
archIsBest_len:<br />
.long . - archIsBest<br />
.section .text<br />
.globl _start<br />
_start:<br />
xorl %ebx, %ebx<br />
movl $4, %eax<br />
xorl %ebx, %ebx<br />
incl %ebx<br />
leal archIsBest, %ecx<br />
movl archIsBest_len, %edx<br />
int $0x80<br />
xorl %eax, %eax<br />
incl %eax<br />
xorl %ebx, %ebx<br />
int $0x80<br />
<br />
;Processing: An open source programming language and IDE built for the electronic arts and visual design.<br />
<br />
println("Arch is the best!");<br />
<br />
;Prolog: A general purpose logic programming language associated with artificial intelligence and computational linguistics.<br />
<br />
format('Arch is the best~n',[]).<br />
<br />
;Python: A general-purpose high-level programming language.<br />
<br />
print('Arch is the best!')<br />
<br />
;QBASIC: An interpreter for a variant of the BASIC programming language which is based on QuickBASIC.<br />
<br />
PRINT "Arch is the best!"<br />
<br />
;R: A language for statistical computing (and much more!).<br />
<br />
archIsBest <- function() { cat("Arch is the best!\n") }<br />
archIsBest()<br />
<br />
;Racket: A general purpose, multi-paradigm programming language in the Lisp-Scheme family.<br />
<br />
#lang racket<br />
<br />
(let ([str "Arch is the best!\n"])<br />
(write-string str)<br />
(values))<br />
<br />
;Ruby: A dynamic, reflective, general purpose object-oriented programming language.<br />
<br />
#!/usr/bin/ruby -w<br />
puts 'Arch is the best!'<br />
<br />
;Rust: Rust is a systems programming language that runs blazingly fast, prevents almost all crashes, and eliminates data races.<br />
<br />
fn main() {<br />
println!("Arch is the best!");<br />
}<br />
<br />
;Salt: Salt is an automation framework<br />
<br />
salt '*' event.fire '{"data":"Arch Is the best!"}' 'arch/best'<br />
<br />
;Scala: A multi paradigm language that runs on the JVM.<br />
<br />
object ArchIsBest extends App {<br />
println("Arch is the best!")<br />
}<br />
<br />
;Scheme: A dialect of Lisp.<br />
<br />
(display "Arch is the best!\n")<br />
<br />
;Seed: A library and interpreter, dynamically bridging the WebKit JavaScriptCore engine, with the GNOME platform.<br />
<br />
#!/usr/bin/env seed<br />
print ('Arch is the best');<br />
<br />
;Shakespeare Programming Language: Designed to "''make a language with beautiful source code'' [...]"<br />
<br />
Arch is the Best.<br />
<br />
Arthur, a young man who is the best.<br />
Isabella, a likewise young woman who be.<br />
The Ghost, an undead who is the article.<br />
Beatrice, a young woman who is an adjective.<br />
<br />
<br />
Act I: Setting of the Variables.<br />
<br />
Scene I: Setting of Isabella and Arthur.<br />
<br />
[Enter Arthur and Isabella]<br />
<br />
Arthur:<br />
You are as dirty as the square of the sum of a rotten smelly foul devil<br />
and a vile lie! You are as bold as the sum of yourself and an evil hog!<br />
<br />
Isabella:<br />
Thou art as big as the square of a cute fair sweet flower! You are as proud<br />
as the sum of thyself and a cow.<br />
<br />
[Exit Arthur]<br />
<br />
Scene II: Setting of The Ghost.<br />
<br />
[Enter The Ghost]<br />
<br />
Isabella:<br />
You art as loving as myself. Thou are as huge as the sum of yourself and twice<br />
a red old hair. You are as cowardly as the sum of yourself and a fat goat!<br />
<br />
[Exit Isabella]<br />
<br />
Scene III: Setting of Beatrice.<br />
<br />
[Enter Beatrice]<br />
<br />
The Ghost:<br />
Thou are as good as the sum of Isabella and a mighty fine rich noble King.<br />
<br />
[Exeunt The Ghost and Beatrice]<br />
<br />
Act II: Printing Arch is the Best.<br />
<br />
Scene I: Arch.<br />
<br />
[Enter Arthur and Beatrice]<br />
<br />
Beatrice:<br />
Speak thy mind! You art as peaceful as the quotient between thyself and the<br />
clearest Lord.<br />
<br />
Arthur:<br />
Speak your mind!<br />
<br />
[Exeunt Arthur and Beatrice]<br />
<br />
[Enter Isabella and The Ghost]<br />
<br />
The Ghost:<br />
Thou are as normal as the sum of thyself and a town. Speak thy mind!<br />
<br />
Isabella:<br />
Speak your mind!<br />
<br />
[Exit Isabella]<br />
<br />
[Enter Arthur]<br />
<br />
The Ghost:<br />
Speak thy mind!<br />
<br />
[Exit Arthur]<br />
<br />
Scene II: is.<br />
<br />
[Enter Beatrice]<br />
<br />
Beatrice:<br />
Thou are as old as the sum of yourself and a nose. Speak your mind!<br />
<br />
The Ghost:<br />
You art as pretty as the sum of thyself and a face. Speak your mind.<br />
<br />
[Exit The Ghost]<br />
<br />
[Enter Arthur]<br />
<br />
Beatrice:<br />
Speak thy mind.<br />
<br />
Scene III: the.<br />
<br />
Arthur:<br />
You are as blue as the sum of yourself and a hamster. Speak thy mind!<br />
<br />
[Exit Arthur]<br />
<br />
[Enter The Ghost]<br />
<br />
Beatrice:<br />
You are as prompt as the sum of thyself and a lie! Speak your mind.<br />
<br />
[Exit Beatrice]<br />
<br />
[Enter Isabella]<br />
<br />
The Ghost:<br />
You art as happy as the sum of thyself and a large moon. Speak thy mind!<br />
<br />
[Exit The Ghost]<br />
<br />
[Enter Arthur]<br />
<br />
Isabella:<br />
Speak thy mind.<br />
<br />
[Exit Arthur]<br />
<br />
Scene IV: Best.<br />
<br />
[Enter Beatrice]<br />
<br />
Beatrice:<br />
Thou are as blue as the sum of the sum of a curse and thyself and a bad<br />
codpiece. Speak your mind! You art as lovely as the sum of the sum of the<br />
happiness and yourself and a blossoming flower. Speak thy mind.<br />
<br />
Isabella:<br />
You are as healthy as the sum of yourself and a plague! Speak thy mind.<br />
Thou art as huge as the sum of thyself and a hero. Speak your mind!<br />
<br />
[Exit Beatrice]<br />
<br />
[Enter Arthur]<br />
<br />
Isabella:<br />
You art as green as the sum of thyself and a mother. Speak your mind.<br />
<br />
[Exeunt]<br />
<br />
<br />
;Shoes: A Ruby version using Shoes for a GUI.<br />
<br />
Shoes.app :width => 135, :height => 30 do<br />
para "Arch is the Best!"<br />
end<br />
<br />
;Smalltalk: Smalltalk is an object-oriented, dynamically typed, reflective programming language.<br />
<br />
Transcript show: 'Arch is the best!'.<br />
<br />
;SQL: Structured Query Language, the query language for relational databases<br />
<br />
SELECT 'Arch is the best!';<br />
SELECT 'Arch is the best!' from dual; -- for Oracle DB<br />
<br />
;Standard ML: A general-purpose, modular, functional programming language with compile-time type checking and type inference.<br />
<br />
print "Arch is the best!\n"<br />
<br />
;Swift: A general-purpose, multi-paradigm, compiled programming language developed by Apple Inc.<br />
<br />
print("Arch is the best!")<br />
<br />
;Tcl/Tk: A scripting language that is commonly used for rapid prototyping, scripted applications, GUIs and testing.<br />
<br />
#!/usr/bin/env tclsh<br />
puts "Arch is the best!"<br />
<br />
;TrumpScript: A scripting language based on President Trump's words.<br />
<br />
say it with me, "Arch is the best!";<br />
america is great.<br />
<br />
;UEFI: An extensible firmware framework<br />
<br />
#include <Uefi.h><br />
EFI_STATUS EFIAPI<br />
ArchIsTheBest (<br />
IN EFI_HANDLE ImageHandle,<br />
IN EFI_SYSTEM_TABLE *SystemTable<br />
)<br />
{<br />
SystemTable -> ConOut-> OutputString(SystemTable->ConOut, L"Arch is the best!\n"); <br />
return EFI_SUCCESS;<br />
}<br />
<br />
;Vala: Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C.<br />
<br />
void main(string[] args) {<br />
stdout.printf("\nArch is the best!\n\n");<br />
}<br />
<br />
; var'aq: [http://www.reocities.com/connorbd/varaq/index.html A warrior's programming language]<br />
"Arch is the best!" cha'<br />
<br />
; Verilog: A hardware description language, standardized as IEEE 1364<br />
module top;<br />
initial $display("Arch is the best!");<br />
endmodule<br />
<br />
; VHDL: VHSIC Hardware Description Language<br />
<br />
use std.textio.all;<br />
<br />
entity top is<br />
end top;<br />
<br />
architecture behaviour of top is begin<br />
process begin<br />
write (output, String'("Arch is the best!"));<br />
wait;<br />
end process;<br />
end behaviour;<br />
<br />
;VimScript: A scripting language for the Vim text editor.<br />
<br />
echo "Arch is the best!"<br />
<br />
; Wiring (Arduino):Built on Processing, the open source programming language developed at the Massachusetts Institute of Technology.<br />
<br />
void setup()<br />
{<br />
Serial.begin(9600);<br />
}<br />
void loop()<br />
{<br />
Serial.print("Arch is the best!");<br />
}<br />
<br />
;Visual Basic: A third-generation event-driven programming language and integrated development environment (IDE) from Microsoft for its Component Object Model (COM) programming model.<br />
<br />
Module Arch<br />
Sub Main()<br />
MsgBox("Arch is the best!")<br />
End Sub<br />
End Module<br />
<br />
; X11: X11 is an architecture independent system for display of graphical user interfaces.<br />
{{ic|cc -lX11 arch.c}}<br />
<br />
#include <stdio.h><br />
#include <stdlib.h><br />
#include <string.h><br />
<br />
#include <X11/Xlib.h><br />
<br />
int main()<br />
{<br />
Display *d;<br />
Window w;<br />
XEvent e;<br />
int s;<br />
<br />
if (!(d = XOpenDisplay(NULL))) {<br />
fprintf(stderr, "Couldn't open display, but Arch is the best!\n");<br />
exit(1);<br />
}<br />
<br />
s = DefaultScreen(d);<br />
w = XCreateSimpleWindow(d, RootWindow(d,s), 0, 0, 110, 20, 0, <br />
0, WhitePixel(d,s));<br />
XSelectInput(d, w, ExposureMask | KeyPressMask);<br />
XMapWindow(d,w);<br />
<br />
while (1) {<br />
XNextEvent(d, &e);<br />
if (e.type == Expose) {<br />
XDrawString(d, w, DefaultGC(d, s), 5, 15, "Arch is the best!", 17);<br />
}<br />
}<br />
<br />
XCloseDisplay(d);<br />
return 0;<br />
}<br />
<br />
;Zimbu: A fast, easy to learn, and JS-like programming language.<br />
<br />
FUNC Main() int<br />
IO.write("Arch is the best!")<br />
RETURN 0<br />
}<br />
<br />
;Zsh: A UNIX command interpreter (shell) closely resembling ksh, but includes many enhancements.<br />
<br />
#!/bin/zsh -f<br />
setopt extendedglob<br />
print -- $(tput setaf 2) ${$(<<<${${${(@j: :)${(@s:_:)${:-What_Linux_is_the_best?}}}/* (#b)([A-Z]i)/Arch $match[1]}} tr '?' '!')} $(tput sgr0)<br />
<br />
== Translations ==<br />
<br />
;Ancient Chinese<br />
阿祺,盡善矣。<br />
<br />
;Ancient Greek (Attic)<br />
Ἡ Ἁψίς ἀρίστη!<br />
<br />
;Arabic<br />
ارتش هو الأفضل<br />
<br />
;Australian<br />
Arch is fair dinkum, mate!<br />
<br />
;Bahasa Indonesia<br />
Arch terbaik!<br />
<br />
;Basque<br />
Arch onena da!<br />
<br />
;Belarusian<br />
Арч - самы лепшы!<br />
<br />
;Bengali<br />
আর্চ সবচেয়ে ভালো!<br />
<br />
;Brezhoneg<br />
Arch emañ ar gwellañ!<br />
;or<br />
Arch emañ ar matañ!<br />
<br />
;British<br />
Arch is simply spiffing.<br />
<br />
;Bulgarian<br />
Арч е най-добрият!<br />
<br />
;Catalan<br />
Arch és el millor!<br />
<br />
;Cantonese<br />
阿祺真係冇得頂!<br />
<br />
;Chinese (Mainland)<br />
Arch最棒了!<br />
<br />
;Chinese (Taiwan)<br />
Arch蠻贊的!<br />
<br />
;Czech<br />
Arch je nejlepší!<br />
<br />
;Croatian<br />
Arch je najbolji!<br />
<br />
;Danish<br />
Arch er bedst!<br />
<br />
;Doge<br />
So Arch, Much Good, Wow<br />
<br />
;Dutch<br />
Arch is het beste!<br />
;or<br />
Arch is de beste!<br />
(these have a slighty different meaning)<br />
<br />
;Esperanto<br />
Arch plejbonas!<br />
<br />
;Estonian<br />
Arch on parim!<br />
<br />
;Fikonspråket<br />
Firch Arkon fir äkon fist bäkon<br />
<br />
;Filipino<br />
Mabuhay ang Arch!<br />
<br />
;Finnish<br />
Arch on paras!<br />
<br />
;French<br />
Arch est le meilleur!<br />
<br />
;Fullwidth English<br />
Arch is the Best!<br />
<br />
;Galician<br />
Arch é o mellor!<br />
<br />
;German<br />
Arch ist das Beste!<br />
<br />
;German (Bernese-Swiss)<br />
Arch isch geil wine More!<br />
<br />
;Greek (Modern)<br />
Το Αρτς είναι το καλύτερο!<br />
<br />
;Haitian Creole<br />
Arch se meye bagay!<br />
<br />
;Hantec<br />
Arch je nejbetélnější!<br />
<br />
;Hebrew<br />
ארצ' זה הכי אחי!<br />
<br />
;Hindi<br />
आर्च सर्वोत्तम है ।<br />
<br />
;Hungarian<br />
Az Arch a legjobb!<br />
<br />
;Irish<br />
Arch é is fearr!<br />
<br />
;Italian<br />
Arch è il migliore!<br />
<br />
;Japanese<br />
Archが一番ですよ!<br />
<br />
;Kannada<br />
ಆರ್ಚ್ ಅತ್ಯುತ್ತಮವಾಗಿದೆ<br />
<br />
;Kazakh<br />
Арч - ең жақсы!<br />
<br />
;Klingon<br />
Arch'pu'ta"a'<br />
<br />
;Korean<br />
아치가 최고입니다!<br />
<br />
;Kurdish<br />
Arç herî baş e!<br />
<br />
;Latin<br />
Arch optimus est!<br />
<br />
;Latvian<br />
Arch ir labākais!<br />
<br />
;Leet<br />
4rch 15 7h3 b357!<br />
<br />
;Lithuanian<br />
Arch yra geriausias!<br />
<br />
;Lojban<br />
la .artc. xagrai<br />
;or for those who prefer an experimental grammar:<br />
la'oi Arch xagrai<br />
(to mi catlu do doi la bauspo fazykamni toi)<br />
<br />
;Lolcat<br />
ARCH IZ TEH BEST!<br />
<br />
;Malayalam<br />
ആർച് ആണ് ഏറ്റവും നല്ലത്<br />
<br />
;Mapudungun<br />
writting system: Unificado<br />
Doy kümei Arch<br />
writting system: Raguileo<br />
Zoy kvmey Arc<br />
writting system: Azümchefe (Used in Windows XP)<br />
Zoi kümei Arch<br />
writting system: Nhewenh<br />
Zoi kvmei Arch<br />
writting system: Wirizüŋun<br />
Zoy kümey Arch ''or'' Zoy kvmey Arch<br />
<br />
;Marathi<br />
आर्च सगळ्यात भारी आहे!<br />
<br />
;Nepali<br />
आर्च सबैभन्दा राम्रो हो!<br />
<br />
;Norwegian<br />
Arch er best!<br />
<br />
;Old English<br />
Arch biþ betst!<br />
<br />
;Occitan (lenga d'òc)<br />
Arch es lo melhor!<br />
<br />
;Persian<br />
آرچ بهترین است<br />
<br />
;Pig Latin<br />
Archway isway ethay estbay!<br />
<br />
;Polish<br />
Arch jest najlepszy!<br />
<br />
;Portuguese<br />
Arch é o melhor!<br />
<br />
;Québécois<br />
Arch c'est le plus meilleure du monde!<br />
<br />
;Romanian<br />
Аrch e cel mai bun!<br />
<br />
;Russian<br />
Арч — лучший!<br />
<br />
;Rövarspråket (English)<br />
Arorcochoh isos tothohe bobesostot.<br />
<br />
;Rövarspråket (Swedish)<br />
Arorcochoh äror bobäsostot!<br />
<br />
;Serbian<br />
Arch je najbolji!<br />
<br />
;Shona<br />
Arch iripamberi!<br />
<br />
;Singaporean<br />
Arch the best lah!<br />
<br />
;Slovak<br />
Arch je najlepší!<br />
<br />
;Slovenian<br />
Arch je najboljši!<br />
<br />
;Spanish (Standard)<br />
¡Arch es el mejor!<br />
<br />
;Spanish (Argentina)<br />
Arch es una mazza!!<br />
<br />
;Spanish (Perú)<br />
¡Arch es bravazo!<br />
<br />
;Spanish (Perú pituco)<br />
¡Oe ese Arch es bien paja brother!<br />
<br />
;Spanish (Perú piraña)<br />
03 k4vz4 3s3 4rch 3s l4 kg4d4 j3j3j3!!!!<br />
<br />
;Spanish (Chile)<br />
Arch es bacán<br />
<br />
;Spanish (Chile, alternative)<br />
Arch es la raja<br />
<br />
;Spanish (Chile, marginal)<br />
(written in IPA because standard Spanish doesn't have these sounds)<br />
ˈæɹʃ ɛːʰ tɜ.rˈiː.u.lɛ la rˈa.χa ʃʊ.ɹʊ<br />
<br />
;Spanish (Guatemala)<br />
¡Arch está bien chilero!<br />
<br />
;Spanish (Guatemala, alternative)<br />
¡Arch es la mera tos!<br />
<br />
;Spanish (Uruguay)<br />
¡Arch la rompe!<br />
<br />
;Spanish (Venezuela, standard)<br />
Marico, Arch es la vaina más arrecha.<br />
<br />
;Spanish (Venezuela, maracucho)<br />
Que molleja de bueno es Arch.<br />
<br />
;Swahili<br />
Arch ndiyo bora zaidi<br />
<br />
;Swedish<br />
Arch är bäst!<br />
<br />
;Turkish<br />
Arch en iyisidir!<br />
<br />
;Tamil<br />
ஆர்ச்சே சிறந்தது!<br />
<br />
;Telugu<br />
ఆర్చ్ ఉత్తమమైనది!<br />
<br />
<br />
;Thai<br />
อาค์ชเทพเมพขิงขิง<br />
<br />
;Toki Pona<br />
Arch li pona mute!<br />
<br />
;Ukrainian<br />
Arch — найкращий!<br />
<br />
;Urdu<br />
آرچ سب سے بہتر ہے!<br />
<br />
;Vietnamese<br />
Arch là tốt nhất!<br />
<br />
;Welsh (Cymraeg)<br />
<br />
Emphasis on Arch:<br />
Arch sydd yr orau un!<br />
Arch sydd y gorau un!<br />
<br />
Emphasis on being the best (one):<br />
Yr orau un yw Arch!<br />
Y gorau un yw Arch!<br />
<br />
== Encodings ==<br />
<br />
;ASCII Banner<br />
<br />
{{Text art|<nowiki><br />
_ _ _ _ _ _ _<br />
/\ | | (_) | | | | | | | | | |<br />
/ \ _ __ ___| |__ _ ___ | |_| |__ ___ | |__ ___ ___| |_| |<br />
/ /\ \ | '__/ __| '_ \ | / __| | __| '_ \ / _ \ | '_ \ / _ \/ __| __| |<br />
/ ____ \| | | (__| | | | | \__ \ | |_| | | | __/ | |_) | __/\__ \ |_|_|<br />
/_/ \_\_| \___|_| |_| |_|___/ \__|_| |_|\___| |_.__/ \___||___/\__(_)<br />
</nowiki>}}<br />
<br />
;Base64<br />
{{hc|$ echo 'Arch is the best!' {{!}} base64|<br />
QXJjaCBpcyB0aGUgYmVzdCEK<br />
}}<br />
<br />
;Binary ASCII<br />
{{hc|1=$ echo 'Arch is the best!' {{!}} perl -lpe '$_=unpack"B*"'|2=<br />
0100000101110010011000110110100000100000011010010111001100100000011101000110100001100101001000000110001001100101011100110111010000100001<br />
}}<br />
<br />
;Braille<br />
⠁⠗⠉⠓⠀⠊⠎⠀⠮⠀⠃⠑⠎⠞⠲<br />
<br />
;Desrever (Reversed)<br />
{{hc|$ echo 'Arch is the best!' {{!}} rev|<br />
!tseb eht si hcrA<br />
}}<br />
<br />
;h4x0r<br />
4rch 15 7h3 b357!<br />
<br />
;Hexadecimal ASCII<br />
{{hc|1=$ echo 'Arch is the best!' {{!}} perl -lpe '$_=unpack"H*"'|2=<br />
4172636820697320746865206265737421<br />
}}<br />
<br />
;Morse Code<br />
.- .-. -.-. ..../.. .../- .... ./-... . ... -<br />
<br />
;ROT13<br />
{{hc|$ echo 'Arch is the best!' {{!}} tr 'A-Za-z' 'N-ZA-Mn-za-m'|<br />
Nepu vf gur orfg!<br />
}}<br />
<br />
;Rotated 180°<br />
¡ʇsǝq ǝɥʇ s! ɥɔɹ∀<br />
<br />
;URL Encoded<br />
Arch%20is%20the%20best!<br />
<br />
== Hashes ==<br />
<br />
;md5sum<br />
2d9092e089d77a8e23f47ba3dfe77027<br />
<br />
;sha1sum<br />
7f6ed0bf29abbd7e796ca1311c84a7a21a68a656<br />
<br />
;sha224sum<br />
af15cd556676d37f916a35e2cf74f04cf7b1805b3244ec418c3927d8<br />
<br />
;sha256sum<br />
107139d6b9a15fd97acf743e5806823c8ff868fde8b7c28cfcc2c9184df644ae<br />
<br />
;sha384sum<br />
769ec295d876483aa6cec7ff7997296c8ff2236630b0e48b059576143b60ab30adefec9321d8acc2a133219dfb302bc5<br />
<br />
;sha512sum<br />
b0917f66d05278106808d25f51001b038856fa7171b935d450b4bcbf1e8b82ed6a5a2f49d99734e1efc7ad3d1b8a33519008635d4e1aa3e65a5e70c4de649aad<br />
<br />
;sha3-224sum<br />
D650C03EC4CBAD76DED2CDE5232128F46CA311B266EC09C36D349728<br />
<br />
;sha3-256sum<br />
9FEC011CC05F1430A3832019B72F280536F1E395F067C3E53193A70F082D193B<br />
<br />
;sha3-384sum<br />
3CBFAAAA2509DAFA6804F5CDF5271594F7D6F44038BB342C7BBC802047C05BE98C8AF6020EBB51291188AC99D6803F52<br />
<br />
;sha3-512sum<br />
E30381FFC93C3E727FCF080C2A46852C042517899D8E823435B99A94345C3F95A25FA11DFEE422ED7C7FD009893B5482BEBA87B7FF3B546D4655ADB6EAE410F8</div>Pdchttps://wiki.archlinux.org/index.php?title=Programming_languages&diff=560774Programming languages2018-12-29T12:51:52Z<p>Pdc: /* Functional languages */ Add more Scheme implementations</p>
<hr />
<div>[[Category:Programming languages]]<br />
[[Category:Lists of software]]<br />
[[es:Programming languages]]<br />
[[ru:Programming languages]]<br />
[[ja:プログラミング言語]]<br />
This page attempts to list all [[Wikipedia:Programming language|programming languages]] with a compiler / interpreter packaged for Arch Linux.<br />
<br />
* [[Wikipedia:Assembly language|Assembly]] – ''as'' of {{Pkg|binutils}}, {{Pkg|fasm}}, {{Pkg|nasm}}, {{Pkg|yasm}}<br />
* [[Wikipedia:Ada (programming language)|Ada]] – [[GCC]]<br />
* [[AWK]]<br />
* [[Wikipedia:BASIC|BASIC]] – {{Pkg|freebasic}}<br />
** [[Gambas]]<br />
* [[C]] – [[GCC]], [[Clang]]<br />
** [[C++]] – [[GCC]], [[Clang]]<br />
** [[Wikipedia:C Sharp (programming language)|C#]] – [[Mono]]<br />
** [[Wikipedia:Objective-C|Objective-C]] – [[GCC]], [[Clang]]<br />
** [[Wikipedia:Vala (programming language)|Vala]] – {{Pkg|vala}}<br />
** [https://ziglang.org/ Zig] – {{AUR|zig}}<br />
* [[Crystal]]<br />
* [[D]]<br />
* [[Wikipedia:Dart (programming language)|Dart]] – {{Pkg|dart}}<br />
* [[Wikipedia:Forth (programming language)|Forth]] – {{AUR|4th}}, {{AUR|gforth}}<br />
* [[Wikipedia:Fortran|Fortran]] – [[GCC]]<br />
* [[Go]] – {{Pkg|go}}, [[GCC]]<br />
* [[Java]]<br />
** [[Wikipedia:Apache Groovy|Groovy]] – {{Pkg|groovy}}<br />
** [[Scala]]<br />
* [[Wikipedia:JavaScript|JavaScript]] – {{Pkg|rhino}}, {{AUR|spidermonkey}}, {{AUR|v8}}<br />
** [[Node.js]]<br />
* [[Julia]]<br />
* [[Wikipedia:Kotlin (programming language)|Kotlin]] – {{Pkg|kotlin}}<br />
* [[Wikipedia:Lua (programming language)|Lua]] – {{Pkg|lua}}<br />
* [[Wikipedia:Nim (programming language)|Nim]] – {{Pkg|nim}}<br />
* [[Octave]]<br />
* [[Wikipedia:Pascal (programming language)|Pascal]] – {{Pkg|fpc}}<br />
* [[Perl]]<br />
* [[PHP]]<br />
* [[Python]]<br />
* [[R]]<br />
* [[Ruby]]<br />
* [[Rust]]<br />
* [[Wikipedia:Swift (programming language)|Swift]] – {{AUR|swift}}, {{AUR|swift-bin}}<br />
* [[Wikipedia:Tcl|Tcl]] – {{Pkg|tcl}}<br />
<br />
== Functional languages ==<br />
<br />
Note that some languages listed above also support some functional programming.<br />
<br />
* [[Wikipedia:Erlang (programming language)|Erlang]] – {{Pkg|erlang}}<br />
** [[Elixir]]<br />
* [[Haskell]]<br />
* [[Wikipedia:Lisp (programming language)|Lisp]] dialects<br />
** [[Clojure]]<br />
** [[Common Lisp]]<br />
** [[Emacs Lisp]]<br />
** [[Wikipedia:Scheme (programming language)|Scheme]] – {{Pkg|bigloo}}, {{Pkg|chicken}}, {{Pkg|gambit-c}}, {{Pkg|gauche}}, {{Pkg|guile}}, {{Pkg|mit-scheme}}, {{Pkg|racket}}<br />
* [[Wikipedia:ML (programming language)|ML]]<br />
** [[Wikipedia:Standard ML|Standard ML]] – {{Pkg|smlnj}}, {{Pkg|mlton}}, {{AUR|mosml}}, {{AUR|smlsharp}}<br />
** [[Wikipedia:OCaml|OCaml]] – {{Pkg|ocaml}}<br />
<br />
== Shell languages ==<br />
<br />
[[Bash]] is part of the [[base group]]. For others, see [[Command-line shell]].<br />
<br />
== See also ==<br />
<br />
* [[Wikipedia:Comparison of programming languages]]<br />
* [[Wikipedia:History of programming languages]]<br />
* [[Wikipedia:List of programming languages]]</div>Pdchttps://wiki.archlinux.org/index.php?title=Fdm&diff=546639Fdm2018-10-08T11:23:17Z<p>Pdc: /* Final setup */ use Template:man for reference to man page</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Mail server]]<br />
[[Category:Mail retrieval agents]]<br />
[[ja:Fdm]]<br />
{{Related articles start}}<br />
{{Related|Alpine}}<br />
{{Related|msmtp}}<br />
{{Related|Mutt}}<br />
{{Related|Postfix}}<br />
{{Related|SSMTP}}<br />
{{Related articles end}}<br />
'''fdm''' (''fetch and deliver mail''), is a simple program for delivering and filtering mail. Comparing it to other same-purposed applications shows that it has similarities with [[Mutt]]'s very focused design principles.<br />
<br />
== Installing ==<br />
<br />
[[Install]] the {{Pkg|fdm}} package.<br />
<br />
== Configuring ==<br />
<br />
''fdm'' supports the tried and tested mbox format along with the newer maildir specification.<br />
<br />
=== mbox ===<br />
<br />
Alpine uses the mbox format, so we need to set up some files that we will be editing.<br />
$ cd<br />
$ mkdir mail<br />
$ touch mail/INBOX .fdm.conf <br />
$ chmod 600 .fdm.conf mail/INBOX<br />
<br />
=== maildir ===<br />
<br />
Mutt prefers a capitized mail directory, and is able to use the maildir format. If you plan on using Mutt do the following setup.<br />
$ cd<br />
$ touch .fdm.conf; chmod 600 .fdm.conf<br />
$ mkdir -p Mail/INBOX/{new,cur,tmp}<br />
<br />
=== Final setup ===<br />
<br />
Edit {{ic|.fdm.conf}}, and add your email accounts and basic filter rules. Use mbox or maildir, but not both.<br />
## .fdm.conf<br />
## Accounts and rules for:<br />
#> foo@example.com<br />
#> bar@gmail.com<br />
## Last edit 21-Dec-09<br />
<br />
# Catch-all action (mbox):<br />
action "inbox" mbox "%h/mail/INBOX"<br />
# Catch-all action (maildir):<br />
# action "inbox" maildir "%h/Mail/INBOX"<br />
<br />
account "foo" imaps server "imap.example.com"<br />
user "foo@example.com" pass "supersecret"<br />
<br />
account "bar" imaps server "imap.gmail.com"<br />
user "bar@gmail.com" pass "evenmoresecret"<br />
<br />
# Match all mail and deliver using the 'inbox' action.<br />
match all action "inbox"<br />
<br />
This will collect the mail from the listed accounts and deliver it to the INBOX folder that we made. Refer to the {{man|1|fdm}} man page for specifics on how to connect to other types of mail servers (POP3 for example).<br />
<br />
{{Tip|You can also specify your login name and/or password in the {{ic|.netrc}} file.}}<br />
<br />
== Testing ==<br />
<br />
Once you have this setup to your satisfaction, attempt to collect your mail by manually running fdm.<br />
$ fdm -kv fetch<br />
<br />
This will keep your mail untouched on the server incase there are errors. Look over the output to make sure everything worked as planned. Open your favorite mail reader (MUA) and make sure that you can read the mail that was just delivered. <br />
<br />
== Extended usage ==<br />
<br />
''Non-essential features that add to ''fdm'''s usability''<br />
<br />
=== Additional filtering ===<br />
<br />
If you want to have mail from a certain account go to a specific mailbox, you could add the following lines to your fdm.conf file. From the config file above, if you wanted to filter the mail from {{ic|''bar@gmail.com''}} into it's own folder {{ic|''bar-mail''}}, you would add this below the existing "action" line:<br />
<br />
action ''bar-deliver'' mbox "%h/mail/''bar-mail''"<br />
<br />
Change the {{ic|mbox}} to {{ic|maildir}} if needed, also make sure the path is correct.<br />
<br />
To activate the new action, add this before the existing "match" line:<br />
<br />
match account ''bar'' action ''bar-deliver''<br />
<br />
Then all mail to {{ic|''bar@gmail.com''}} will be put into the {{ic|''bar-mail''}} mail folder.<br />
<br />
=== Automation with cron ===<br />
<br />
If all went well, set up a [[cron]] job to check your mail regularly.<br />
$ crontab -e<br />
*/15 * * * * fdm fetch >> $HOME/[Mm]ail/fdm.log<br />
<br />
== See also ==<br />
<br />
*[https://github.com/nicm/fdm fdm's official site (github)]<br />
*[https://lists.sourceforge.net/lists/listinfo/fdm-users fdm-users mailing list]</div>Pdchttps://wiki.archlinux.org/index.php?title=Domain_name_resolution&diff=530935Domain name resolution2018-07-25T10:54:42Z<p>Pdc: /* Resolvers */ pdnsd can do recursion but not DNSSEC</p>
<hr />
<div>[[Category:Domain Name System]]<br />
[[Category:Network configuration]]<br />
[[de:Resolv.conf]]<br />
[[es:Resolv.conf]]<br />
[[fr:Resolv.conf]]<br />
[[it:Resolv.conf]]<br />
[[ja:Resolv.conf]]<br />
[[pt:Domain name resolution]]<br />
[[zh-hans:Resolv.conf]]<br />
{{Related articles start}}<br />
{{Related|Alternative DNS services}}<br />
{{Related|Network configuration}}<br />
{{Related articles end}}<br />
In general, a [[Wikipedia:Domain name|domain name]] represents an IP address and is associated to it in the [[Wikipedia:Domain Name System|Domain Name System]] (DNS).<br />
This article explains how to configure domain name resolution and resolve domain names.<br />
<br />
== Name Service Switch ==<br />
:''"NSS" redirects here. For Mozilla cryptographic libraries, see [[Network Security Services]].''<br />
<br />
The [[Wikipedia:Name Service Switch|Name Service Switch]] (NSS) facility is part of the GNU C Library ({{Pkg|glibc}}) and backs the {{man|3|getaddrinfo}} API, used to resolve domain names. NSS allows system databases to be provided by separate services, whose search order can be configured by the administrator in {{man|5|nsswitch.conf}}. The database responsible for domain name resolution is the {{ic|hosts}} database, for which glibc offers the following services:<br />
<br />
* {{ic|file}}: reads the {{ic|/etc/hosts}} file, see {{man|5|hosts}}<br />
* {{ic|dns}}: the [[#Glibc resolver|glibc resolver]] which reads {{ic|/etc/resolv.conf}}, see {{man|5|resolv.conf}}<br />
<br />
[[Systemd]] provides three NSS services for hostname resolution:<br />
<br />
* {{man|8|nss-resolve}} - a caching DNS stub resolver, described in [[#Systemd-resolved]]<br />
* {{man|8|nss-myhostname}} - provides hostname resolution without having to edit {{ic|/etc/hosts}}, described in [[Network configuration#Local hostname resolution]]<br />
* {{man|8|nss-mymachines}} - provides hostname resolution for the names of local {{man|8|systemd-machined}} containers <br />
<br />
=== Check if you can resolve domain names ===<br />
<br />
NSS databases can be queried with {{man|1|getent}}. You can resolve a domain name through NSS using:<br />
<br />
$ getent hosts ''domain_name''<br />
<br />
{{Note|While most programs resolve domain names using NSS, some may read {{ic|resolv.conf}} and/or {{ic|/etc/hosts}} directly. See [[Network configuration#Local hostname resolution]].}}<br />
<br />
== Glibc resolver ==<br />
<br />
The glibc resolver reads {{ic|/etc/resolv.conf}} for every resolution to determine the nameservers and options to use. <br />
<br />
{{man|5|resolv.conf}} lists nameservers together with some configuration options.<br />
Nameservers listed first are tried first, up to three nameservers may be listed. Lines starting with a number sign are ignored.<br />
<br />
{{Note|The glibc resolver does not cache queries. See [[#Performance]] for more information.}}<br />
<br />
=== Overwriting of resolv.conf ===<br />
<br />
[[Network manager]]s tend to overwrite {{ic|resolv.conf}}, for specifics see the corresponding section:<br />
<br />
* [[dhcpcd#resolv.conf]]<br />
* [[netctl#resolv.conf]]<br />
* [[NetworkManager#resolv.conf]]<br />
<br />
To prevent programs from overwriting {{ic|resolv.conf}} you can also write-protect it by setting the immutable [[file attribute]].<br />
<br />
{{Tip|If you want multiple processes to write to {{ic|resolv.conf}}, you can use [[openresolv]].}}<br />
<br />
=== Limit lookup time ===<br />
<br />
If you are confronted with a very long hostname lookup (may it be in [[pacman]] or while browsing), it often helps to define a small timeout after which an alternative nameserver is used. To do so, put the following in {{ic|/etc/resolv.conf}}.<br />
<br />
options timeout:1<br />
<br />
=== Hostname lookup delayed with IPv6 ===<br />
<br />
If you experience a 5 second delay when resolving hostnames it might be due to a DNS-server/Firewall misbehaving and only giving one reply to a parallel A and AAAA request ([http://udrepper.livejournal.com/20948.html source]).<br />
You can fix that by setting the following option in {{ic|/etc/resolv.conf}}:<br />
<br />
options single-request<br />
<br />
=== Local domain names ===<br />
<br />
If you want to be able to use the hostname of local machine names without the fully qualified domain names, then add a line to {{ic|resolv.conf}} with the local domain such as:<br />
<br />
domain example.com<br />
<br />
That way you can refer to local hosts such as {{ic|mainmachine1.example.com}} as simply {{ic|mainmachine1}} when using the ''ssh'' command, but the ''drill'' command still requires the fully qualified domain names in order to perform lookups.<br />
<br />
== Systemd-resolved ==<br />
<br />
{{man|8|systemd-resolved}} is a [[systemd]] service that provides network name resolution to local applications via a [[D-Bus]] interface, the {{ic|resolve}} NSS service ({{man|8|nss-resolve}}), and a local DNS stub listener on {{ic|127.0.0.53}}. <br />
<br />
''systemd-resolved'' has four different modes for handling the [[#Glibc resolver|glibc resolver]]'s ''resolv.conf'' (described in {{man|8|systemd-resolved|/ETC/RESOLV.CONF}}). We will focus here on the two most relevant modes.<br />
<br />
# The mode in which ''systemd-resolved'' is a client of the {{ic|/etc/resolv.conf}}. This mode preserves {{ic|/etc/resolv.conf}} and is '''compatible''' with the procedures described in this page.<br />
# The ''systemd-resolved'''s '''recommended''' mode of operation: the DNS stub file {{ic|/run/systemd/resolve/stub-resolv.conf}} contains both the local stub {{ic|127.0.0.53}} as the only DNS servers and a list of search domains.<br />
<br />
The service users are advised to redirect the {{ic|/etc/resolv.conf}} file to the local stub DNS resolver file {{ic|/run/systemd/resolve/stub-resolv.conf}} managed by ''systemd-resolved''. This propagates the systemd managed configuration to all the clients. This can be done by replacing {{ic|/etc/resolv.conf}} with a symbolic link to the systemd stub:<br />
<br />
# ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf<br />
<br />
In this mode, the DNS servers are provided in the {{man|5|resolved.conf}} file:<br />
<br />
{{hc|/etc/systemd/resolved.conf.d/dns_servers.conf|2=<br />
[Resolve]<br />
'''DNS=91.239.100.100 89.233.43.71'''<br />
}}<br />
<br />
In order to check the DNS actually used by ''systemd-resolved'', the command to use is:<br />
<br />
$ resolvectl status<br />
<br />
{{Tip|<br />
* To understand the context around the DNS choices and switches, one can turn on detailed debug information for ''systemd-resolved'' as described in [[Systemd#Diagnosing a service]].<br />
* The mode of operation of ''systemd-resolved'' is detected automatically, depending on whether {{ic|/etc/resolv.conf}} is a symlink to the local stub DNS resolver file or contains server names.<br />
}}<br />
<br />
== Resolvers ==<br />
<br />
{{Expansion|Fill in the unknowns.}}<br />
<br />
The Glibc resolver provides only the most basic necessities, it does not cache queries or provide any security or privacy features. If you desire more functionality use another resolver.<br />
<br />
The columns have the following meaning: <br />
<br />
* ''Cache'': [[Wikipedia:Name server#Caching name server|caches]] the DNS queries to improve lookup times of subsequent identical requests.<br />
* ''Recursor'': can [[Wikipedia:Name server#Recursive query|recursively query]] the domain name starting from the [[Wikipedia:DNS root zone|DNS root zone]].<br />
* ''resolvconf compatibility'': can acquire name servers and search domains, to use for forwarding requests, from software that sets them using [[Wikipedia:resolvconf|resolvconf]].<br />
* ''Validates DNSSEC'': validates DNS query responses using [[DNSSEC]].<br />
* ''DNS over TLS'': supports the [[Wikipedia:DNS over TLS|DNS over TLS]] protocol for encrypted communicating with the DNS server.<br />
* ''DNS over HTTPS'': supports the [[Wikipedia:DNS over HTTPS|DNS over HTTPS]] protocol for encrypted communicating with the DNS server.<br />
<br />
{| class="wikitable sortable"<br />
! Resolver !! Cache !! Recursor !! ''resolvconf'' compatibility !! Validates DNSSEC !! DNS over TLS !! DNS over HTTPS !! Notes<br />
|-<br />
| [[#Glibc resolver|glibc]] || {{No}} || {{No}} || {{No}} || {{No}} || {{No}} || {{No}} ||<br />
|-<br />
| [[BIND]] || {{Yes}} || {{Yes}} || {{G|[[openresolv]] subscriber}} || {{Yes}} || ? || ? ||<br />
|-<br />
| [[dnscrypt-proxy]] || {{Yes}} || {{No}} || {{No}} || ? || {{No}} || {{Yes}} || Implements the [[Wikipedia:DNSCrypt|DNSCrypt]] protocol.<br />
|-<br />
| [[dnsmasq]] || {{Yes}} || {{No}} || {{G|[[openresolv]] subscriber}} || {{Yes}} || {{No}} || {{No}} ||<br />
|-<br />
| [[Knot Resolver]] || {{Yes}} || {{Yes}} || {{No}} || {{Yes}} || {{Yes}} || {{R|No [https://gitlab.labs.nic.cz/knot/knot-resolver/issues/243]}} ||<br />
|-<br />
| [[pdnsd]] || {{Yes}} || {{Yes}} || {{G|[[openresolv]] subscriber}} || {{No}} || {{No}} || {{No}} ||<br />
|-<br />
| [[Stubby]] || {{No}} || {{No}} || {{No}} || ? || {{Yes}} || ? ||<br />
|-<br />
|style="white-space: nowrap;"| [[#Systemd-resolved|systemd-resolved]] || {{Yes}} || {{No}} || {{G|{{Pkg|systemd-resolvconf}}}} || {{Yes}} || {{Y|Limited}} || {{R|No [https://github.com/systemd/systemd/issues/8639]}} ||<br />
|-<br />
| [[Unbound]] || {{Yes}} || {{Yes}} || {{G|[[openresolv]] subscriber}} || {{Yes}} || {{Yes}} || ? ||<br />
|}<br />
<br />
== Performance ==<br />
<br />
{{Merge|#Resolvers|Keep information on caching resolvers in one place.|section=Resolvers}}<br />
<br />
The [[#Glibc resolver]] does not cache queries. If you want local caching use [[#Systemd-resolved]] or set up a local caching [[DNS server]] and use {{ic|127.0.0.1}}.<br />
<br />
{{Tip|The ''drill'' or ''dig'' [[#Lookup utilities]] report the query time.}}<br />
<br />
Internet service providers usually provide working DNS servers. A router may also add an extra DNS server in case it has its own cache server. Switching between DNS servers is transparent for Windows users, because if a DNS server is slow or does not work it will immediately switch to a better one. However, Linux usually takes longer to timeout, which could cause delays.<br />
<br />
== Privacy ==<br />
<br />
Most DNS servers keep a log of IP addresses and sites visited on a more or less temporary basis. The data collected can be used to perform various statistical studies. Personally-identifying information have value and can also be rented or sold to third parties. [[Alternative DNS services]] provides a list of popular services, check their privacy policy for information about how user data is handled.<br />
<br />
== Lookup utilities ==<br />
<br />
To query specific DNS servers and DNS/[[DNSSEC]] records you can use dedicated DNS lookup utilities. These tools implement DNS themselves and do not use [[#Name Service Switch|NSS]].<br />
<br />
* {{Pkg|ldns}} provides {{man|1|drill}}, which is a tool designed to retrieve information out of the DNS.<br />
<br />
For example, to query a specific nameserver with ''drill'' for the TXT records of a domain:<br />
<br />
$ drill @''nameserver'' TXT ''domain''<br />
<br />
If you do not specify a DNS server ''drill'' uses the nameservers defined in {{ic|/etc/resolv.conf}}.<br />
<br />
* {{Pkg|bind-tools}} provides {{man|1|dig}}, {{man|1|host}}, {{man|1|nslookup}} and a bunch of {{ic|dnssec-}} tools.<br />
<br />
== See also ==<br />
<br />
* [https://www.tldp.org/LDP/nag2/x-087-2-resolv.html Linux Network Administrators Guide]<br />
* [https://www.debian.org/doc/manuals/debian-handbook/sect.hostname-name-service.en.html#sect.name-resolution Debian Handbook]</div>Pdchttps://wiki.archlinux.org/index.php?title=Systemd-networkd&diff=527599Systemd-networkd2018-06-24T15:36:24Z<p>Pdc: /* Interface and desktop integration */ Rmove reference to wpa_tui: it's available in Manjaro, not in Arch</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Network managers]]<br />
[[Category:Virtualization]]<br />
[[es:Systemd-networkd]]<br />
[[fr:systemd-networkd]]<br />
[[ja:systemd-networkd]]<br />
[[ru:Systemd-networkd]]<br />
{{Related articles start}}<br />
{{Related|systemd}}<br />
{{Related|systemd-nspawn}}<br />
{{Related|Network bridge}}<br />
{{Related|Network configuration}}<br />
{{Related|Wireless network configuration}}<br />
{{Related|:Category:Network configuration}}<br />
{{Related articles end}}<br />
<br />
''systemd-networkd'' is a system daemon that manages network configurations. It detects and configures network devices as they appear; it can also create virtual network devices. This service can be especially useful to set up complex network configurations for a container managed by [[systemd-nspawn]] or for virtual machines. It also works fine on simple connections.<br />
<br />
== Basic usage ==<br />
The {{Pkg|systemd}} package is part of the default Arch installation and contains all needed files to operate a wired network. Wireless adapters can be setup by other services, such as [[wpa_supplicant]], which are covered later in this article. Wireless adapters may also be setup using [[iwd]].<br />
<br />
=== Required services and setup ===<br />
<br />
To use ''systemd-networkd'', [[start/enable]] {{ic|systemd-networkd.service}}.<br />
<br />
It is optional to also [[start/enable]] {{ic|systemd-resolved.service}}, which is a network name resolution service to local applications, considering the following points:<br />
<br />
* The [[systemd-resolved]] service is required if DNS entries are specified in ''.network'' files,<br />
* It can be used to automatically obtain DNS addresses from the network DHCP client,<br />
* It is important to understand how [[resolv.conf]] and ''systemd-resolved'' interact to properly configure the DNS that will be used, some explanations are provided in [[systemd-resolved]].<br />
* Note that ''systemd-resolved'' can also be used without ''systemd-networkd''.<br />
<br />
=== Configuration examples ===<br />
All configurations in this section are stored as {{ic|foo.network}} in {{ic|/etc/systemd/network/}}. For a full listing of options and processing order, see [[#Configuration files]] and {{man|5|systemd.network}}.<br />
<br />
Systemd/udev automatically assigns predictable, stable network interface names for all local Ethernet, WLAN, and WWAN interfaces. Use {{ic|networkctl list}} to list the devices on the system.<br />
<br />
After making changes to a configuration file, [[restart]] {{ic|systemd-networkd.service}}.<br />
<br />
{{Note|<br />
* In the examples below, {{ic|enp1s0}} is the wired adapter and {{ic|wlp2s0}} is the wireless adapter. These names can be different on different systems. It is also possible to use a wildcard, e.g. {{ic|1=Name=en*}}.<br />
* If you want to disable IPv6, see [[IPv6#systemd-networkd_2|IPv6#systemd-networkd]].<br />
* Set {{ic|1=DHCP=yes}} to accept an IPv4 '''and''' IPv6 DHCP request to the {{ic|[Network]}} section.<br />
}}<br />
<br />
==== Wired adapter using DHCP ====<br />
{{hc|/etc/systemd/network/20-wired.network|2=<br />
[Match]<br />
Name=enp1s0<br />
<br />
[Network]<br />
DHCP=ipv4<br />
}}<br />
<br />
==== Wired adapter using a static IP ====<br />
{{hc|/etc/systemd/network/20-wired.network|2=<br />
[Match]<br />
Name=enp1s0<br />
<br />
[Network]<br />
Address=10.1.10.9/24<br />
Gateway=10.1.10.1<br />
DNS=10.1.10.1<br />
#DNS=8.8.8.8<br />
}}<br />
<br />
{{ic|1=Address=}} can be used more than once to configure multiple IPv4 or IPv6 addresses. See [[#network files]] or {{man|5|systemd.network}} for more options.<br />
<br />
==== Wireless adapter ====<br />
In order to connect to a wireless network with ''systemd-networkd'', a wireless adapter configured with another application such as [[WPA supplicant]] is required. In this example, the corresponding systemd service file that needs to be enabled is {{ic|wpa_supplicant@wlp2s0.service}}. This service will run ''wpa_supplicant'' with the mandatory configuration file {{ic|/etc/wpa_supplicant/wpa_supplicant-wlp2s0.conf}}; if it does not exist, the service will not start.<br />
<br />
{{hc|/etc/systemd/network/25-wireless.network|<nowiki><br />
[Match]<br />
Name=wlp2s0<br />
<br />
[Network]<br />
DHCP=ipv4<br />
</nowiki>}}<br />
<br />
If the wireless adapter has a static IP address, the configuration is the same (except for the interface name) as in a [[#Wired adapter using a static IP|wired adapter]].<br />
<br />
==== Wired and wireless adapters on the same machine ====<br />
<br />
This setup will enable a DHCP IP for both a wired and wireless connection making use of the metric directive to allow the kernel to decide on-the-fly which one to use. This way, no connection downtime is observed when the wired connection is unplugged.<br />
<br />
The kernel's route metric (same as configured with ''ip'') decides which route to use for outgoing packets, in cases when several match. This will be the case when both wireless and wired devices on the system have active connections. To break the tie, the kernel uses the metric. If one of the connections is terminated, the other automatically wins without there being a gap with nothing configured (ongoing transfers may still not deal with this nicely but that is at a different OSI layer).<br />
<br />
{{Note|The {{ic|Metric}} option is for static routes while the {{ic|RouteMetric}} option is for setups not using static routes.}}<br />
<br />
{{hc|/etc/systemd/network/20-wired.network|2=<br />
[Match]<br />
Name=enp1s0<br />
<br />
[Network]<br />
DHCP=ipv4<br />
<br />
[DHCP]<br />
RouteMetric=10}}<br />
<br />
{{hc|/etc/systemd/network/25-wireless.network|2=<br />
[Match]<br />
Name=wlp2s0<br />
<br />
[Network]<br />
DHCP=ipv4<br />
<br />
[DHCP]<br />
RouteMetric=20}}<br />
<br />
==== Renaming an interface ====<br />
<br />
Instead of [[Network configuration#Change interface name|editing udev rules]], a ''.link'' file can be used to rename an interface. A useful example is to set a predictable interface name for a USB-to-Ethernet adapter based on its MAC address, as those adapters are usually given different names depending on which USB port they are plugged into.<br />
<br />
{{hc|head=/etc/systemd/network/10-ethusb0.link|output=<br />
[Match]<br />
MACAddress=12:34:56:78:90:ab<br />
<br />
[Link]<br />
Description=USB to Ethernet Adapter<br />
Name=ethusb0<br />
}}<br />
<br />
{{Note|Any user-supplied ''.link'' '''must''' have a lexically earlier file name than the default config {{ic|99-default.link}} in order to be considered at all. For example, name the file {{ic|10-ethusb0.link}} and not {{ic|ethusb0.link}}.}}<br />
<br />
== Configuration files ==<br />
<br />
Configuration files are located in {{ic|/usr/lib/systemd/network}}, the volatile runtime network directory {{ic|/run/systemd/network}} and the local administration network directory {{ic|/etc/systemd/network}}. Files in {{ic|/etc/systemd/network}} have the highest priority.<br />
<br />
There are three types of configuration files. They all use a format similar to [[systemd#Writing unit files|systemd unit files]]. <br />
<br />
* '''''.network''''' files. They will apply a network configuration for a ''matching'' device<br />
* '''''.netdev''''' files. They will create a ''virtual network device'' for a ''matching'' environment<br />
* '''''.link''''' files. When a network device appears, [[udev]] will look for the first ''matching'' ''.link'' file<br />
<br />
They all follow the same rules: <br />
<br />
* If '''all''' conditions in the {{ic|[Match]}} section are matched, the profile will be activated<br />
* an empty {{ic|[Match]}} section means the profile will apply in any case (can be compared to the {{ic|*}} joker)<br />
* all configuration files are collectively sorted and processed in lexical order, regardless of the directory in which they live<br />
* files with identical name replace each other<br />
<br />
{{Tip|<br />
* to override a system-supplied file in {{ic|/usr/lib/systemd/network}} in a permanent manner (i.e even after upgrade), place a file with same name in {{ic|/etc/systemd/network}} and symlink it to {{ic|/dev/null}}<br />
* the {{ic|*}} joker can be used in {{ic|VALUE}} (e.g {{ic|en*}} will match any Ethernet device)<br />
* following this [https://mailman.archlinux.org/pipermail/arch-general/2014-March/035381.html Arch-general thread], the best practice is to setup specific container network settings ''inside the container'' with '''networkd''' configuration files.<br />
}}<br />
<br />
=== network files ===<br />
<br />
These files are aimed at setting network configuration variables, especially for servers and containers.<br />
<br />
''.network'' files have the following sections: {{ic|[Match]}}, {{ic|[Link]}}, {{ic|[Network]}}, {{ic|[Address]}}, {{ic|[Route]}}, and {{ic|[DHCP]}}. Below are commonly configured keys for each section. See {{man|5|systemd.network}} for more information and examples.<br />
<br />
==== [Match] ====<br />
<br />
* {{ic|1=Name=}} the device name<br />
* {{ic|1=Host=}} the machine hostname<br />
* {{ic|1=Virtualization=}} check whether the system is executed in a virtualized environment or not. A {{ic|1=Virtualization=no}} key will only apply on your host machine, while {{ic|1=Virtualization=yes}} apply to any container or VM.<br />
<br />
==== [Link] ====<br />
<br />
* {{ic|1=MACAddress=}} useful for [[MAC_address_spoofing#systemd-networkd|MAC address spoofing]]<br />
* {{ic|1=MTUBytes=}} setting a larger MTU value ([[jumbo frames]]) can significantly speed up your network transfers<br />
<br />
==== [Network] ====<br />
<br />
* {{ic|1=DHCP=}} enables the DHCP client<br />
* {{ic|1=DHCPServer=}} enables the DHCP server<br />
* {{ic|1=DNS=}} DNS server address<br />
* {{ic|1=Bridge=}} the bridge name<br />
* {{ic|1=IPForward=}} enables IP packet forwarding<br />
* {{ic|1=Domains=}} a list of domains to be resolved on this link<br />
<br />
==== [Address] ====<br />
<br />
* {{ic|1=Address=}} this option is '''mandatory''' unless DHCP is used<br />
<br />
==== [Route] ====<br />
<br />
* {{ic|1=Gateway=}} this option is '''mandatory''' unless DHCP is used<br />
* {{ic|1=Destination=}} the destination prefix of the route, possibly followed by a slash and the prefix length <br />
<br />
If {{ic|1=Destination}} is not present in {{ic|[Route]}} section this section is treated as a default route.<br />
{{Tip|You can put the {{ic|1=Address=}} and {{ic|1=Gateway=}} keys in the {{ic|[Network]}} section as a short-hand if {{ic|1=[Address]}} section contains only an Address key and {{ic|1=[Route]}} section contains only a Gateway key.}}<br />
<br />
==== [DHCP] ====<br />
<br />
* {{ic|1=UseDomains=true}} can sometimes fix local name resolving when using systemd-resolved<br />
<br />
=== netdev files ===<br />
<br />
These files will create virtual network devices. They have two sections: {{ic|[Match]}} and {{ic|[NetDev]}}. Below are commonly configured keys for each section. See {{man|5|systemd.netdev}} for more information and examples.<br />
<br />
==== [Match] section ====<br />
<br />
* {{ic|1=Host=}} the hostname<br />
* {{ic|1=Virtualization=}} check if running in a VM<br />
<br />
==== [NetDev] section ====<br />
<br />
Most common keys are:<br />
<br />
* {{ic|1=Name=}} the interface name. '''mandatory'''<br />
* {{ic|1=Kind=}} e.g. ''bridge'', ''bond'', ''vlan'', ''veth'', ''sit'', etc. '''mandatory'''<br />
<br />
=== link files ===<br />
<br />
These files are an alternative to custom udev rules and will be applied by [[udev]] as the device appears. They have two sections: {{ic|[Match]}} and {{ic|[Link]}}. Below are commonly configured keys for each section. See {{man|5|systemd.link}} for more information and examples.<br />
<br />
{{Tip|Use {{ic|udevadm test-builtin net_setup_link /sys/path/to/network/device}} to diagnose problems with ''.link'' files.}}<br />
<br />
==== [Match] section ====<br />
<br />
* {{ic|1=MACAddress=}} the MAC address<br />
* {{ic|1=Host=}} the host name<br />
* {{ic|1=Virtualization=}} <br />
* {{ic|1=Type=}} the device type e.g. vlan<br />
<br />
==== [Link] section ====<br />
<br />
* {{ic|1=MACAddressPolicy=}} persistent or random addresses, or<br />
* {{ic|1=MACAddress=}} a specific address<br />
<br />
{{Note|the system {{ic|/usr/lib/systemd/network/99-default.link}} is generally sufficient for most of the basic cases.}}<br />
<br />
== Usage with containers ==<br />
<br />
The service is available with {{Pkg|systemd}}. You will want to [[enable]] and [[start]] the {{ic|systemd-networkd.service}} unit on the host and container.<br />
<br />
For debugging purposes, it is strongly advised to [[install]] the {{Pkg|bridge-utils}}, {{Pkg|net-tools}}, and {{Pkg|iproute2}} packages.<br />
<br />
If you are using [[systemd-nspawn]], you may need to modify the {{ic|systemd-nspawn@.service}} and append boot options to the {{ic|ExecStart}} line. Please refer to {{man|1|systemd-nspawn}} for an exhaustive list of options.<br />
<br />
Note that if you want to take advantage of automatic DNS configuration from DHCP, you need to enable {{ic|systemd-resolved}} and symlink {{ic|/run/systemd/resolve/resolv.conf}} to {{ic|/etc/resolv.conf}}. See {{man|8|systemd-resolved.service}} for more details.<br />
<br />
Before you start to configure your container network, it is useful to:<br />
* disable all your [[netctl]] (host and container), [[dhcpcd]] (host and container), [[systemd-networkd]] (container only) and {{ic|systemd-nspawn@.service}} (host only) services to avoid potential conflicts and to ease debugging<br />
* make sure [[Internet sharing#Enable packet forwarding|packet forwarding]] is enabled if you want to let containers access the internet. Make sure that your ''.network'' file does not accidentally turn off forwarding because if you do not have a {{ic|1=IPForward=1}} setting in it, {{ic|systemd-networkd}} will turn off forwarding on this interface, even if you have it enabled globally.<br />
* make sure you do not have any [[iptables]] rules which can block traffic<br />
* when the daemon is started the systemd {{ic|networkctl}} command displays the status of network interfaces.<br />
<br />
For the set-up described below, <br />
* we will limit the output of the {{ic|ip a}} command to the concerned interfaces<br />
* we assume the ''host'' is your main OS you are booting to and the ''container'' is your guest virtual machine<br />
* all interface names and IP addresses are only examples<br />
<br />
=== Basic DHCP network ===<br />
<br />
This setup will enable a DHCP IP for host and container. In this case, both systems will share the same IP as they share the same interfaces.<br />
<br />
{{hc|/etc/systemd/network/''MyDhcp''.network|<nowiki><br />
[Match]<br />
Name=en*<br />
<br />
[Network]<br />
DHCP=ipv4<br />
</nowiki>}}<br />
<br />
Then, [[enable]] and start {{ic|systemd-networkd.service}} on your container.<br />
<br />
You can of course replace {{ic|en*}} by the full name of your ethernet device given by the output of the {{ic|ip link}} command.<br />
<br />
* on host and container:<br />
<br />
{{hc|$ ip a|<br />
2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000<br />
link/ether 14:da:e9:b5:7a:88 brd ff:ff:ff:ff:ff:ff<br />
inet 192.168.1.72/24 brd 192.168.1.255 scope global enp7s0<br />
valid_lft forever preferred_lft forever<br />
inet6 fe80::16da:e9ff:feb5:7a88/64 scope link <br />
valid_lft forever preferred_lft forever<br />
}}<br />
<br />
By default, hostname received from the DHCP server will be used as the transient hostname.<br />
<br />
To change it add {{ic|1=UseHostname=false}} in section {{ic|[DHCPv4]}}<br />
{{hc|/etc/systemd/network/''MyDhcp''.network|<nowiki><br />
[DHCPv4]<br />
UseHostname=false<br />
</nowiki>}}<br />
<br />
If you did not want to configure a DNS in {{ic|/etc/resolv.conf}} and want to rely on DHCP for setting it up, you need to [[enable]] {{ic|systemd-resolved.service}} and symlink {{ic|/run/systemd/resolve/resolv.conf}} to {{ic|/etc/resolv.conf}}<br />
<br />
# ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf<br />
<br />
See {{man|8|systemd-resolved.service}} for more details.<br />
<br />
{{Note|Users accessing a system partition via {{ic|/usr/bin/arch-chroot}} from {{pkg|arch-install-scripts}}, will need to create the symlink outside of the chroot, on the mounted partition. This is due to arch-chroot linking the file to the live environment.}}<br />
<br />
=== DHCP with two distinct IP ===<br />
<br />
==== Bridge interface ====<br />
<br />
Create a virtual bridge interface <br />
<br />
{{hc|/etc/systemd/network/''MyBridge''.netdev|<nowiki><br />
[NetDev]<br />
Name=br0<br />
Kind=bridge<br />
</nowiki>}}<br />
<br />
[[Restart]] {{ic|systemd-networkd.service}} to have systemd create the bridge.<br />
<br />
On host and container:<br />
<br />
{{hc|$ ip a|<br />
3: br0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default <br />
link/ether ae:bd:35:ea:0c:c9 brd ff:ff:ff:ff:ff:ff<br />
}}<br />
<br />
Note that the interface br0 is listed but is DOWN.<br />
<br />
==== Bind ethernet to bridge ====<br />
<br />
Modify the {{ic|/etc/systemd/network/''MyDhcp''.network}} to remove the DHCP, as the bridge requires an interface to bind to with no IP, and add a key to bind this device to br0. Let us change its name to a more relevant one.<br />
<br />
{{hc|/etc/systemd/network/''MyEth''.network|<nowiki><br />
[Match]<br />
Name=en*<br />
<br />
[Network]<br />
Bridge=br0<br />
</nowiki>}}<br />
<br />
==== Bridge network ====<br />
<br />
Create a network profile for the Bridge<br />
<br />
{{hc|/etc/systemd/network/''MyBridge''.network|<nowiki><br />
[Match]<br />
Name=br0<br />
<br />
[Network]<br />
DHCP=ipv4<br />
</nowiki>}}<br />
<br />
==== Add option to boot the container ====<br />
<br />
As we want to give a separate IP for host and container, we need to ''Disconnect'' networking of the container from the host. To do this, add this option {{ic|1=--network-bridge=br0}} to your container boot command.<br />
<br />
# systemd-nspawn --network-bridge&#61;br0 -bD /path_to/my_container<br />
<br />
==== Result ====<br />
<br />
* on host<br />
<br />
{{hc|$ ip a|<br />
3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default <br />
link/ether 14:da:e9:b5:7a:88 brd ff:ff:ff:ff:ff:ff<br />
inet 192.168.1.87/24 brd 192.168.1.255 scope global br0<br />
valid_lft forever preferred_lft forever<br />
inet6 fe80::16da:e9ff:feb5:7a88/64 scope link <br />
valid_lft forever preferred_lft forever<br />
6: vb-''MyContainer'': <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP group default qlen 1000<br />
link/ether d2:7c:97:97:37:25 brd ff:ff:ff:ff:ff:ff<br />
inet6 fe80::d07c:97ff:fe97:3725/64 scope link <br />
valid_lft forever preferred_lft forever<br />
}}<br />
<br />
* on container<br />
<br />
{{hc|$ ip a|<br />
2: host0: <BROADCAST,MULTICAST,ALLMULTI,AUTOMEDIA,NOTRAILERS,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000<br />
link/ether 5e:96:85:83:a8:5d brd ff:ff:ff:ff:ff:ff<br />
inet 192.168.1.73/24 brd 192.168.1.255 scope global host0<br />
valid_lft forever preferred_lft forever<br />
inet6 fe80::5c96:85ff:fe83:a85d/64 scope link <br />
valid_lft forever preferred_lft forever<br />
}}<br />
<br />
==== Notice ====<br />
<br />
* we have now one IP address for {{ic|br0}} on the host, and one for {{ic|host0}} in the container<br />
* two new interfaces have appeared: {{ic|vb-''MyContainer''}} in the host and {{ic|host0}} in the container. This comes as a result of the {{ic|1=--network-bridge=br0}} option. This option ''implies'' another option, {{ic|--network-veth}}. This means a ''virtual Ethernet link'' has been created between host and container.<br />
* the DHCP address on {{ic|host0}} comes from the system {{ic|/usr/lib/systemd/network/80-container-host0.network}} file.<br />
* on host<br />
<br />
{{hc|$ brctl show|<br />
bridge name bridge id STP enabled interfaces<br />
br0 8000.14dae9b57a88 no enp7s0<br />
vb-''MyContainer''<br />
}}<br />
<br />
the above command output confirms we have a bridge with two interfaces binded to.<br />
<br />
* on host<br />
<br />
{{hc|$ ip route|<br />
default via 192.168.1.254 dev br0 <br />
192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.87<br />
}}<br />
<br />
* on container<br />
<br />
{{hc|$ ip route|<br />
default via 192.168.1.254 dev host0 <br />
192.168.1.0/24 dev host0 proto kernel scope link src 192.168.1.73<br />
}}<br />
<br />
the above command outputs confirm we have activated {{ic|br0}} and {{ic|host0}} interfaces with an IP address and Gateway 192.168.1.254. The gateway address has been automatically grabbed by ''systemd-networkd''<br />
<br />
{{hc|$ cat /run/systemd/resolve/resolv.conf|<br />
nameserver 192.168.1.254<br />
}}<br />
<br />
=== Static IP network ===<br />
<br />
Setting a static IP for each device can be helpful in case of deployed web services (e.g FTP, http, SSH). Each device will keep the same MAC address across reboots if your system {{ic|/usr/lib/systemd/network/99-default.link}} file has the {{ic|1=MACAddressPolicy=persistent}} option (it has by default). Thus, you will easily route any service on your Gateway to the desired device.<br />
<br />
The following configuration needs to be done for this setup:<br />
* on host <br />
<br />
The configuration is very similar to that of [[#DHCP with two distinct IP]]. First, a virtual bridge interface needs to be created and the main physical interface needs to be bound to it. This task can be accomplished with the following two files, with contents equal to those available at the DHCP section.<br />
<br />
/etc/systemd/network/''MyBridge''.netdev<br />
/etc/systemd/network/''MyEth''.network<br />
<br />
Next, you need to configure the IP and DNS of the newly created virtual bridge interface. The following ''MyBridge''.network provides an example configuration:<br />
<br />
{{hc|/etc/systemd/network/''MyBridge''.network|<nowiki><br />
[Match]<br />
Name=br0<br />
<br />
[Network]<br />
DNS=192.168.1.254<br />
Address=192.168.1.87/24<br />
Gateway=192.168.1.254<br />
</nowiki>}}<br />
<br />
* on container<br />
<br />
First, we shall get rid of the system {{ic|/usr/lib/systemd/network/80-container-host0.network}} file, which provides a DHCP configuration for the default network interface of the container. To do it in a permanent way (e.g. even after {{pkg|systemd}} upgrades), do the following on the container. This will mask the file {{ic|/usr/lib/systemd/network/80-container-host0.network}} since files of the same name in {{ic|/etc/systemd/network}} take priority over {{ic|/usr/lib/systemd/network}}. Keep in mind that this file can be kept if you only want a static IP on the host, and want the IP address of your containers to be assigned via DHCP.<br />
<br />
# ln -sf /dev/null /etc/systemd/network/80-container-host0.network<br />
<br />
Then, configure an static IP for the default {{ic|host0}} network interface and [[systemd#Basic systemctl usage|enable and start]] {{ic|systemd-networkd.service}} on your container. An example configuration is provided below:<br />
<br />
{{hc|/etc/systemd/network/''MyVeth''.network|<nowiki><br />
[Match]<br />
Name=host0<br />
<br />
[Network]<br />
DNS=192.168.1.254<br />
Address=192.168.1.94/24<br />
Gateway=192.168.1.254<br />
</nowiki>}}<br />
<br />
== Interface and desktop integration ==<br />
<br />
''systemd-networkd'' does not have a proper interactive management interface neither via command-line nor graphical. <br />
Still, some tools are available to either display the current state of the network, receive notifications or interact with the wireless configuration:<br />
<br />
* ''networkctl'' (via CLI) offers a simple dump of the network interface states.<br />
<br />
* When ''networkd'' is configured with [[wpa_supplicant]], both ''wpa_cli'' and ''wpa_gui'' offer the ability to associate and configure WLAN interfaces dynamically.<br />
<br />
* {{AUR|networkd-notify-git}} can generate simple notifications in response to network interface state changes (such as connection/disconnection and re-association).<br />
<br />
* The {{AUR|networkd-dispatcher}} daemon allows executing scripts in response to network interface state changes, similar to ''NetworkManager-dispatcher''.<br />
<br />
* As for the DNS resolver ''systemd-resolved'', information about current DNS servers can be visualized with {{ic|systemd-resolve --status}}.<br />
<br />
== Troubleshooting ==<br />
=== Mount services at boot fail ===<br />
If running services like [[Samba]]/[[NFS]] which fail if they are started before the network is up, you may want to [[enable]] the {{ic|systemd-networkd-wait-online.service}}. This is, however, rarely necessary because most networked daemons start up okay, even if the network has not been configured yet.<br />
<br />
=== systemd-resolve not searching the local domain ===<br />
<br />
systemd-resolved may not search the local domain when given just the hostname, even when {{ic|1=UseDomains=yes}} or {{ic|1=Domains=[domain-list]}} is present in the appropriate ''.network'' file, and that file produces the expected {{ic|search [domain-list]}} in {{ic|resolv.conf}}. If you run into this problem:<br />
* Trim {{ic|/etc/nsswitch.conf}}'s {{ic|hosts}} database (e.g., by removing {{ic|1=[!UNAVAIL=return]}} option after {{ic|resolve}} service)<br />
* Switch to using fully-qualified domain names<br />
* Use {{ic|/etc/hosts}} to resolve hostnames<br />
* Fall back to using glibc's {{ic|dns}} instead of using systemd's {{ic|resolve}}<br />
<br />
== See also ==<br />
<br />
* [http://www.freedesktop.org/software/systemd/man/systemd-networkd.service.html systemd.networkd man page]<br />
* [https://plus.google.com/u/0/+TomGundersen/posts Tom Gundersen, main systemd-networkd developer, G+ home page]<br />
* [https://coreos.com/blog/intro-to-systemd-networkd/ Tom Gundersen posts on Core OS blog]<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=1393759#p1393759 How to set up systemd-networkd with wpa_supplicant] (WonderWoofy's walkthrough on Arch forums)</div>Pdchttps://wiki.archlinux.org/index.php?title=Pacman/Tips_and_tricks&diff=525622Pacman/Tips and tricks2018-06-11T16:52:37Z<p>Pdc: /* Utilities */ lostfiles is now in [community]</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Package management]]<br />
[[es:Pacman/Tips and tricks]]<br />
[[fa:Pacman tips]]<br />
[[fr:Astuces Pacman]]<br />
[[it:Pacman/Tips and tricks]]<br />
[[ja:Pacman ヒント]]<br />
[[pt:Pacman/Tips and tricks]]<br />
[[ru:Pacman/Tips and tricks]]<br />
[[zh-hans:Pacman/Tips and tricks]]<br />
{{Related articles start}}<br />
{{Related|Mirrors}}<br />
{{Related|Creating packages}}<br />
{{Related articles end}}<br />
For general methods to improve the flexibility of the provided tips or ''pacman'' itself, see [[Core utilities]] and [[Bash]].<br />
<br />
== Maintenance ==<br />
<br />
{{Expansion|{{ic|1=Usage=}} introduced with pacman 4.2, see [http://allanmcrae.com/2014/12/pacman-4-2-released/]}}<br />
<br />
{{Note|Instead of using ''comm'' (which requires sorted input with ''sort'') in the sections below, you may also use {{ic|grep -Fxf}} or {{ic|grep -Fxvf}}.}}<br />
<br />
See also [[System maintenance]].<br />
<br />
=== Listing packages ===<br />
<br />
You may want to get the list of installed packages with their version, which is useful when reporting bugs or discussing installed packages.<br />
<br />
* List all explicitly installed packages: {{ic|pacman -Qe}}.<br />
* List all explicitly installed native packages (i.e. present in the sync database) that are not direct or optional dependencies: {{ic|pacman -Qent}}.<br />
* List all foreign packages (typically manually downloaded and installed): {{ic|pacman -Qm}}.<br />
* List all native packages (installed from the sync database(s)): {{ic|pacman -Qn}}.<br />
* List packages by regex: {{ic|pacman -Qs ''regex''}}.<br />
* List packages by regex with custom output format: {{ic|expac -s "%-30n %v" ''regex''}} (needs {{Pkg|expac}}).<br />
<br />
==== With size ====<br />
<br />
To get a list of installed packages sorted by size, which may be useful when freeing space on your hard drive:<br />
<br />
* Install {{Pkg|expac}} and run {{ic|<nowiki>expac -H M '%m\t%n' | sort -h</nowiki>}}.<br />
* Run {{Pkg|pacgraph}} with the {{ic|-c}} option.<br />
<br />
To list the download size of several packages (leave {{ic|''packages''}} blank to list all packages):<br />
<br />
$ expac -S -H M '%k\t%n' ''packages''<br />
<br />
To list explicitly installed packages not in {{Grp|base}} nor {{Grp|base-devel}} with size and description:<br />
<br />
$ expac -H M "%011m\t%-20n\t%10d" $(comm -23 <(pacman -Qqen | sort) <(pacman -Qqg base base-devel | sort)) | sort -n<br />
<br />
==== By date ====<br />
<br />
To list the 20 last installed packages with {{Pkg|expac}}, run:<br />
<br />
$ expac --timefmt='%Y-%m-%d %T' '%l\t%n' | sort | tail -n 20<br />
<br />
or, with seconds since the epoch (1970-01-01 UTC):<br />
<br />
$ expac --timefmt=%s '%l\t%n' | sort -n | tail -n 20<br />
<br />
==== Not in a specified group or repository ====<br />
<br />
{{Note|To get a list of packages installed as dependencies but no longer required by any installed package, see [[#Removing unused packages (orphans)]].}}<br />
<br />
List explicitly installed packages not in the {{Grp|base}} or {{Grp|base-devel}} groups:<br />
<br />
$ comm -23 <(pacman -Qeq | sort) <(pacman -Qgq base base-devel | sort)<br />
<br />
List all installed packages unrequired by other packages, and which are not in the {{Grp|base}} or {{Grp|base-devel}} groups:<br />
<br />
$ comm -23 <(pacman -Qqt | sort) <(pacman -Sqg base base-devel | sort)<br />
<br />
As above, but with descriptions:<br />
<br />
$ expac -HM '%-20n\t%10d' $(comm -23 <(pacman -Qqt | sort) <(pacman -Qqg base base-devel | sort))<br />
<br />
List all installed packages that are ''not'' in the specified repository ''repo_name''<br />
<br />
$ comm -23 <(pacman -Qq | sort) <(pacman -Slq ''repo_name'' | sort)<br />
<br />
List all installed packages that are in the ''repo_name'' repository:<br />
<br />
$ comm -12 <(pacman -Qq | sort) <(pacman -Slq ''repo_name'' | sort)<br />
<br />
List all packages on the Arch Linux ISO that are not in the base group:<br />
<br />
<nowiki>$ comm -23 <(wget -q -O - https://git.archlinux.org/archiso.git/plain/configs/releng/packages.both) <(pacman -Qqg base | sort)</nowiki><br />
<br />
==== Development packages ====<br />
<br />
To list all development/unstable packages, run:<br />
<br />
$ pacman -Qq | awk '/^.+(-cvs|-svn|-git|-hg|-bzr|-darcs)$/'<br />
<br />
=== Listing files owned by a package with size ===<br />
<br />
This one might come in handy if you have found that a specific package uses a huge amount of space and you want to find out which files make up the most of that.<br />
<br />
$ pacman -Qlq ''package'' | grep -v '/$' | xargs du -h | sort -h<br />
<br />
=== Identify files not owned by any package ===<br />
<br />
If your system has stray files not owned by any package (a common case if you do not [[Enhance system stability#Use the package manager to install software|use the package manager to install software]]), you may want to find such files in order to clean them up. The general process for doing so is:<br />
<br />
# Create a sorted list of the files you want to check ownership of: {{bc|<nowiki>$ find /etc /opt /usr | sort > all_files.txt</nowiki>}}<br />
# Create a sorted list of the files tracked by ''pacman'' (and remove the trailing slashes from directories): {{bc|<nowiki>$ pacman -Qlq | sed 's|/$||' | sort > owned_files.txt</nowiki>}}<br />
# Find lines in the first list that are not in the second: {{bc|$ comm -23 all_files.txt owned_files.txt}}<br />
<br />
This process is tricky in practice because many important files are not part of any package (e.g. files generated at runtime, custom configs) and so will be included in the final output, making it difficult to pick out the files that can be safely deleted.<br />
<br />
{{Tip|The {{AUR|lostfiles}} script performs similar steps, but also includes an extensive blacklist to remove common false positives from the output. [https://github.com/CyberShadow/aconfmgr aconfmgr] ({{AUR|aconfmgr-git}}) also allows tracking orphaned files using a configuration script.}}<br />
<br />
=== Removing unused packages (orphans) ===<br />
<br />
For recursively removing orphans and their configuration files:<br />
<br />
# pacman -Rns $(pacman -Qtdq)<br />
<br />
If no orphans were found ''pacman'' outputs {{ic|error: no targets specified}}. This is expected as no arguments were passed to {{ic|pacman -Rns}}.<br />
<br />
{{Note|The arguments {{ic|-Qt}} list only true orphans. To include packages which are ''optionally'' required by another package, pass the {{ic|-t}} flag twice (''i.e.'', {{ic|-Qtt}}).}}<br />
<br />
=== Removing everything but base group ===<br />
<br />
If it is ever necessary to remove all packages except the base group, try this one-liner (requires {{Pkg|pacman-contrib}}):<br />
<br />
# pacman -R $(comm -23 <(pacman -Qq | sort) <((for i in $(pacman -Qqg base); do pactree -ul "$i"; done) | sort -u))<br />
<br />
The one-liner was originally devised in [https://bbs.archlinux.org/viewtopic.php?id=130176 this discussion], and later improved in this article.<br />
<br />
=== Getting the dependencies list of several packages ===<br />
<br />
Dependencies are alphabetically sorted and doubles are removed.<br />
<br />
{{Note|To only show the tree of local installed packages, use {{ic|pacman -Qi}}.}}<br />
<br />
$ pacman -Si ''packages'' | awk -F'[:<=>]' '/^Depends/ {print $2}' | xargs -n1 | sort -u<br />
<br />
Alternatively, with {{Pkg|expac}}: <br />
<br />
$ expac -l '\n' %E -S ''packages'' | sort -u<br />
<br />
=== Listing changed backup files ===<br />
<br />
If you want to backup your system configuration files you could copy all files in {{ic|/etc/}}, but usually you are only interested in the files that you have changed. Modified [[Pacnew_and_Pacsave_files#Package_backup_files|backup files]] can be viewed with the following command:<br />
<br />
# pacman -Qii | awk '/^MODIFIED/ {print $2}'<br />
<br />
Running this command with root permissions will ensure that files readable only by root (such as {{ic|/etc/sudoers}}) are included in the output.<br />
<br />
{{Tip|See [[#Listing all changed files from packages]] to list all changed files ''pacman'' knows, not only backup files.}}<br />
<br />
=== Back-up the pacman database ===<br />
<br />
The following command can be used to back up the local ''pacman'' database:<br />
<br />
$ tar -cjf pacman_database.tar.bz2 /var/lib/pacman/local<br />
<br />
Store the backup ''pacman'' database file on one or more offline media, such as a USB stick, external hard drive, or CD-R.<br />
<br />
The database can be restored by moving the {{ic|pacman_database.tar.bz2}} file into the {{ic|/}} directory and executing the following command:<br />
<br />
# tar -xjvf pacman_database.tar.bz2<br />
<br />
{{Note|If the ''pacman'' database files are corrupted, and there is no backup file available, there exists some hope of rebuilding the ''pacman'' database. Consult [[#Restore pacman's local database]].}}<br />
<br />
{{Tip|The {{AUR|pakbak-git}} package provides a script and a [[systemd]] service to automate the task. Configuration is possible in {{ic|/etc/pakbak.conf}}.}}<br />
<br />
=== Check changelogs easily ===<br />
<br />
When maintainers update packages, commits are often commented in a useful fashion. Users can quickly check these from the command line by installing {{AUR|pacolog}}. This utility lists recent commit messages for packages from the official repositories or the AUR, by using {{ic|pacolog <package>}}.<br />
<br />
== Installation and recovery ==<br />
<br />
Alternative ways of getting and restoring packages.<br />
<br />
=== Installing packages from a CD/DVD or USB stick ===<br />
<br />
{{Merge|#Custom local repository|Use as an example and avoid duplication}}<br />
<br />
To download packages, or groups of packages:<br />
<br />
# cd ~/Packages<br />
# pacman -Syw base base-devel grub-bios xorg gimp --cachedir .<br />
# repo-add ./custom.db.tar.gz ./*<br />
<br />
Then you can burn the "Packages" folder to a CD/DVD or transfer it to a USB stick, external HDD, etc.<br />
<br />
To install:<br />
<br />
'''1.''' Mount the media:<br />
<br />
# mkdir /mnt/repo<br />
# mount /dev/sr0 /mnt/repo #For a CD/DVD.<br />
# mount /dev/sdxY /mnt/repo #For a USB stick.<br />
<br />
'''2.''' Edit {{ic|pacman.conf}} and add this repository ''before'' the other ones (e.g. extra, core, etc.). This is important. Do not just uncomment the one on the bottom. This way it ensures that the files from the CD/DVD/USB take precedence over those in the standard repositories:<br />
<br />
{{hc|/etc/pacman.conf|2=<br />
[custom]<br />
SigLevel = PackageRequired<br />
Server = file:///mnt/repo/Packages}}<br />
<br />
'''3.''' Finally, synchronize the ''pacman'' database to be able to use the new repository:<br />
<br />
# pacman -Syu<br />
<br />
=== Custom local repository ===<br />
<br />
Use the ''repo-add'' script included with ''pacman'' to generate a database for a personal repository. Use {{ic|repo-add --help}} for more details on its usage. To add a new package to the database, or to replace the old version of an existing package in the database, run:<br />
<br />
$ repo-add ''/path/to/repo.db.tar.gz /path/to/package-1.0-1-x86_64.pkg.tar.xz''<br />
<br />
{{Note|A package database is a tar file, optionally compressed. Valid extensions are ''.db'' or ''.files'' followed by an archive extension of ''.tar'', ''.tar.gz'', ''.tar.bz2'', ''.tar.xz'', or ''.tar.Z''. The file does not need to exist, but all parent directories must exist.}}<br />
<br />
The database and the packages do not need to be in the same directory when using ''repo-add'', but keep in mind that when using ''pacman'' with that database, they should be together. Storing all the built packages to be included in the repository in one directory also allows to use shell glob expansion to add or update multiple packages at once:<br />
<br />
$ repo-add ''/path/to/repo.db.tar.gz /path/to/*.pkg.tar.xz''<br />
<br />
{{Warning|''repo-add'' adds the entries into the database in the same order as passed on the command line. If multiple versions of the same package are involved, care must be taken to ensure that the correct version is added last. In particular, note that lexical order used by the shell depends on the locale and differs from the [https://www.archlinux.org/pacman/vercmp.8.html vercmp] ordering used by ''pacman''.}}<br />
<br />
''repo-remove'' is used to remove packages from the package database, except that only package names are specified on the command line.<br />
<br />
$ repo-remove ''/path/to/repo.db.tar.gz pkgname''<br />
<br />
Once the local repository database has been created, add the repository to {{ic|pacman.conf}} for each system that is to use the repository. An example of a custom repository is in {{ic|pacman.conf}}. The repository's name is the database filename with the file extension omitted. In the case of the example above the repository's name would simply be ''repo''. Reference the repository's location using a {{ic|file://}} url, or via FTP using ftp://localhost/path/to/directory.<br />
<br />
If willing, add the custom repository to the [[Unofficial user repositories|list of unofficial user repositories]], so that the community can benefit from it.<br />
<br />
=== Network shared pacman cache ===<br />
<br />
If you happen to run several Arch boxes on your LAN, you can share packages so that you can greatly decrease your download times. Keep in mind you should not share between different architectures (i.e. i686 and x86_64) or you will run into problems.<br />
<br />
==== Read-only cache ====<br />
<br />
If you are looking for a quick solution, you can simply run a standalone webserver which other computers can use as a first mirror:<br />
# ln -s /var/lib/pacman/sync/*.db /var/cache/pacman/pkg<br />
$ sudo -u http darkhttpd /var/cache/pacman/pkg --no-server-id<br />
You could also run darkhttpd as a systemd service for convenience. Just add this server at the top of your {{ic|/etc/pacman.d/mirrorlist}} in client machines with {{ic|1=Server = http&#58;//mymirror:8080}}. Make sure to keep your mirror updated.<br />
<br />
==== Distributed read-only cache ====<br />
<br />
There are Arch-specific tools for automatically discovering other computers on your network offering a package cache. Try {{Pkg|pacredir}}, [[pacserve]], {{AUR|pkgdistcache}}, or {{AUR|paclan}}. pkgdistcache uses Avahi instead of plain UDP which may work better in certain home networks that route instead of bridge between WiFi and Ethernet.<br />
<br />
Historically, there was [https://bbs.archlinux.org/viewtopic.php?id=64391 PkgD] and [https://github.com/toofishes/multipkg multipkg], but they are no longer maintained.<br />
<br />
==== Read-write cache ====<br />
<br />
In order to share packages between multiple computers, simply share {{ic|/var/cache/pacman/}} using any network-based mount protocol. This section shows how to use [[shfs]] or [[SSHFS]] to share a package cache plus the related library-directories between multiple computers on the same local network. Keep in mind that a network shared cache can be slow depending on the file-system choice, among other factors.<br />
<br />
First, install any network-supporting filesystem packages: {{pkg|shfs-utils}}, {{pkg|sshfs}}, {{pkg|curlftpfs}}, {{pkg|samba}} or {{pkg|nfs-utils}}.<br />
<br />
{{Tip|<br />
* To use ''sshfs'' or ''shfs'', consider reading [[Using SSH Keys]].<br />
* By default, ''smbfs'' does not serve filenames that contain colons, which results in the client downloading the offending package afresh. To prevent this, use the {{ic|mapchars}} mount option on the client.<br />
}}<br />
<br />
Then, to share the actual packages, mount {{ic|/var/cache/pacman/pkg}} from the server to {{ic|/var/cache/pacman/pkg}} on every client machine.<br />
<br />
{{Note|Do not make {{ic|/var/cache/pacman/pkg}} or any of its ancestors (e.g., {{ic|/var}}) a symlink. ''Pacman'' expects these to be directories. When ''pacman'' re-installs or upgrades itself, it will remove the symlinks and create empty directories instead. However during the transaction ''pacman'' relies on some files residing there, hence breaking the update process. Refer to {{bug|50298}} for further details.}}<br />
<br />
==== two-way with rsync ====<br />
<br />
Another approach in a local environment is [[rsync]]. Choose a server for caching and enable the [[Rsync#rsync daemon]]. On clients synchronize two-way with this share via rsync protocol. Filenames that contain colons are no problem for the rsync protocol.<br />
<br />
Draft example for a client, using {{ic|uname -m}} within the share name ensures an architecture dependant sync:<br />
# rsync rsync://server/share_$(uname -m)/ /var/cache/pacman/pkg/ ...<br />
# pacman ...<br />
# paccache ...<br />
# rsync /var/cache/pacman/pkg/ rsync://server/share_$(uname -m)/ ...<br />
<br />
==== Dynamic reverse proxy cache using nginx ====<br />
<br />
[[nginx]] can be used to proxy requests to official upstream mirrors and cache the results to local disk. All subsequent requests for that file will be served directly from the local cache, minimizing the amount of internet traffic needed to update a large number of servers with minimal effort. <br />
<br />
{{Warning| This method has a limitation. You must use mirrors that use the same relative path to package files and you must configure your cache to use that same path. In this example, we are using mirrors that use the relative path {{ic|/archlinux/$repo/os/$arch}} and our cache's {{ic|Server}} setting in {{ic|mirrorlist}} is configured similarly.}}<br />
<br />
In this example, we will run the cache server on {{ic|<nowiki>http://cache.domain.local:8080/</nowiki>}} and storing the packages in {{ic|/srv/http/pacman-cache/}}. <br />
<br />
Create the directory for the cache and adjust the permissions so nginx can write files to it:<br />
<br />
# mkdir /srv/http/pacman-cache<br />
# chown http:http /srv/http/pacman-cache<br />
<br />
Next, configure nginx as the [https://gist.github.com/anonymous/97ec4148f643de925e433bed3dc7ee7d dynamic cache] (read the comments for an explanation of the commands).<br />
<br />
Finally, update your other Arch Linux servers to use this new cache by adding the following line to the {{ic|mirrorlist}} file:<br />
<br />
{{hc|/etc/pacman.d/mirrorlist|<nowiki><br />
Server = http://cache.domain.local:8080/archlinux/$repo/os/$arch<br />
...<br />
</nowiki>}}<br />
<br />
{{Note| You will need to create a method to clear old packages, as this directory will continue to grow over time. {{ic|paccache}} (which is provided by {{pkg|pacman-contrib}}) can be used to automate this using retention criteria of your choosing. For example, {{ic|find /srv/http/pacman-cache/ -type d -exec paccache -v -r -k 2 -c {} \;}} will keep the last 2 versions of packages in your cache directory.}}<br />
<br />
==== Synchronize pacman package cache using synchronization programs ====<br />
<br />
Use [[Resilio Sync]] or [[Syncthing]] to synchronize the ''pacman'' cache folders (i.e. {{ic|/var/cache/pacman/pkg}}).<br />
<br />
==== Preventing unwanted cache purges ====<br />
<br />
By default, {{Ic|pacman -Sc}} removes package tarballs from the cache that correspond to packages that are not installed on the machine the command was issued on. Because ''pacman'' cannot predict what packages are installed on all machines that share the cache, it will end up deleting files that should not be.<br />
<br />
To clean up the cache so that only ''outdated'' tarballs are deleted, add this entry in the {{ic|[options]}} section of {{ic|/etc/pacman.conf}}:<br />
<br />
CleanMethod = KeepCurrent<br />
<br />
=== Recreate a package from the file system ===<br />
<br />
To recreate a package from the file system, use ''bacman'' (included with ''pacman''). Files from the system are taken as they are, hence any modifications will be present in the assembled package. Distributing the recreated package is therefore discouraged; see [[ABS]] and [[Arch Linux Archive]] for alternatives.<br />
<br />
{{Tip|''bacman'' honours the {{ic|PACKAGER}}, {{ic|PKGDEST}} and {{ic|PKGEXT}} options from {{ic|makepkg.conf}}. Bacman does not currently honor the {{ic|COMPRESS}} options in {{ic|makepkg.conf}}.}}<br />
<br />
An alternative tool would be {{AUR|fakepkg}}. It supports parallelization and can handle multiple input packages in one command, which ''bacman'' both does not support.<br />
<br />
=== List of installed packages ===<br />
<br />
Keeping a list of explicitly installed packages can be useful to speed up installation on a new system:<br />
<br />
$ pacman -Qqe > pkglist.txt<br />
<br />
{{Note|If the option {{ic|-t}} was used, when reinstalling the list all the non-top-level packages would be set as dependencies. With option {{ic|-n}}, foreign packages (e.g. from AUR) would be omitted from the list.}}<br />
<br />
To install packages from the list backup, run:<br />
<br />
# pacman -S - < pkglist.txt<br />
<br />
{{Tip|<br />
* To skip already installed packages, use {{ic|--needed}}.<br />
* Use {{ic|<nowiki>comm -13 <(pacman -Qqdt | sort) <(pacman -Qqdtt | sort) > optdeplist.txt</nowiki>}} to also create a list of the installed optional dependencies which can be reinstalled with {{ic|--asdeps}}.<br />
}}<br />
<br />
In case the list includes foreign packages, such as [[AUR]] packages, remove them first:<br />
<br />
# pacman -S $(comm -12 <(pacman -Slq | sort) <(sort pkglist.txt))<br />
<br />
To remove all the packages on your system that are not mentioned in the list:<br />
<br />
# pacman -Rsu $(comm -23 <(pacman -Qq | sort) <(sort pkglist.txt))<br />
<br />
{{Tip|These tasks can be automated. See {{AUR|bacpac}}, {{AUR|packup}}, {{AUR|pacmanity}}, and {{AUR|pug}} for examples.}}<br />
<br />
If you would like to keep an up-to-date list of explicitly installed packages (e.g. in combination with a versioned {{ic|/etc/}}), you can set up a [[Pacman#Hooks|hook]]. Example:<br />
<br />
[Trigger]<br />
Operation = Install<br />
Operation = Remove<br />
Type = Package<br />
Target = *<br />
<br />
[Action]<br />
When = PostTransaction<br />
Exec = /bin/sh -c '/usr/bin/pacman -Qqe > /etc/packages.txt'<br />
<br />
=== Listing all changed files from packages ===<br />
<br />
If you are suspecting file corruption (e.g. by software/hardware failure), but are unsure if files were got corrupted, you might want to compare with the hash sums in the packages. This can be done with {{Pkg|pacutils}}:<br />
<br />
# paccheck --md5sum --quiet<br />
<br />
For recovery of the database see [[#Restore pacman's local database]]. The {{ic|mtree}} files can also be [[#Viewing a single file inside a .pkg file|extracted as {{ic|.MTREE}} from the respective package files]].<br />
<br />
{{Note|This should '''not''' be used as is when suspecting malicious changes! In this case security precautions such as using a live medium and an independent source for the hash sums are advised.}}<br />
<br />
=== Reinstalling all packages ===<br />
To reinstall all native packages, use:<br />
<br />
# pacman -Qnq | pacman -S -<br />
<br />
Foreign (AUR) packages must be reinstalled separately; you can list them with {{ic|pacman -Qmq}}.<br />
<br />
''Pacman'' preserves the [[installation reason]] by default.<br />
<br />
=== Restore pacman's local database ===<br />
<br />
See [[Pacman/Restore local database]].<br />
<br />
=== Recovering a USB key from existing install ===<br />
<br />
If you have Arch installed on a USB key and manage to mess it up (e.g. removing it while it is still being written to), then it is possible to re-install all the packages and hopefully get it back up and working again (assuming USB key is mounted in {{ic|/newarch}})<br />
<br />
# pacman -S $(pacman -Qq --dbpath /newarch/var/lib/pacman) --root /newarch --dbpath /newarch/var/lib/pacman<br />
<br />
=== Viewing a single file inside a .pkg file ===<br />
<br />
For example, if you want to see the contents of {{ic|/etc/systemd/logind.conf}} supplied within the {{Pkg|systemd}} package:<br />
<br />
$ tar -xOf /var/cache/pacman/pkg/systemd-204-3-x86_64.pkg.tar.xz etc/systemd/logind.conf<br />
<br />
Or you can use {{pkg|vim}} to browse the archive:<br />
<br />
$ vim /var/cache/pacman/pkg/systemd-204-3-x86_64.pkg.tar.xz<br />
<br />
=== Find applications that use libraries from older packages ===<br />
<br />
Even if you installed a package the existing long-running programs (like daemons and servers) still keep using code from old package libraries. And it is a bad idea to let these programs running if the old library contains a security bug.<br />
<br />
Here is a way how to find all the programs that use old packages code:<br />
<br />
# lsof +c 0 | grep -w DEL | awk '1 { print $1 ": " $NF }' | sort -u<br />
It will print running program name and old library that was removed or replaced with newer content.<br />
<br />
== Performance ==<br />
<br />
=== Download speeds ===<br />
<br />
{{Note|If your download speeds have been reduced to a crawl, ensure you are using one of the many [[mirrors]] and not ftp.archlinux.org, which is [https://www.archlinux.org/news/302/ throttled since March 2007].}}<br />
<br />
When downloading packages ''pacman'' uses the mirrors in the order they are in {{ic|/etc/pacman.d/mirrorlist}}. The mirror which is at the top of the list by default however may not be the fastest for you. To select a faster mirror, see [[Mirrors]].<br />
<br />
''Pacman''<nowiki>'</nowiki>s speed in downloading packages can also be improved by using a different application to download packages, instead of ''pacman''<nowiki>'</nowiki>s built-in file downloader.<br />
<br />
In all cases, make sure you have the latest ''pacman'' before doing any modifications.<br />
<br />
# pacman -Syu<br />
<br />
==== Powerpill ====<br />
<br />
[[Powerpill]] is a ''pacman'' wrapper that uses parallel and segmented downloading to try to speed up downloads for ''pacman''.<br />
<br />
==== wget ====<br />
<br />
This is also very handy if you need more powerful proxy settings than ''pacman''<nowiki>'</nowiki>s built-in capabilities. <br />
<br />
To use {{ic|wget}}, first [[install]] the {{Pkg|wget}} package then modify {{ic|/etc/pacman.conf}} by uncommenting the following line in the {{ic|[options]}} section:<br />
<br />
XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u<br />
<br />
Instead of uncommenting the {{ic|wget}} parameters in {{ic|/etc/pacman.conf}}, you can also modify the {{ic|wget}} configuration file directly (the system-wide file is {{ic|/etc/wgetrc}}, per user files are {{ic|$HOME/.wgetrc}}.<br />
<br />
==== aria2 ====<br />
<br />
[[aria2]] is a lightweight download utility with support for resumable and segmented HTTP/HTTPS and FTP downloads. aria2 allows for multiple and simultaneous HTTP/HTTPS and FTP connections to an Arch mirror, which should result in an increase in download speeds for both file and package retrieval.<br />
<br />
{{Note|Using aria2c in ''pacman''<nowiki>'</nowiki>s XferCommand will '''not''' result in parallel downloads of multiple packages. ''Pacman'' invokes the XferCommand with a single package at a time and waits for it to complete before invoking the next. To download multiple packages in parallel, see [[Powerpill]].}}<br />
<br />
Install {{Pkg|aria2}}, then edit {{ic|/etc/pacman.conf}} by adding the following line to the {{ic|[options]}} section:<br />
<br />
XferCommand = /usr/bin/aria2c --allow-overwrite=true --continue=true --file-allocation=none --log-level=error --max-tries=2 --max-connection-per-server=2 --max-file-not-found=5 --min-split-size=5M --no-conf --remote-time=true --summary-interval=60 --timeout=5 --dir=/ --out %o %u<br />
<br />
{{Tip|1=[https://bbs.archlinux.org/viewtopic.php?pid=1491879#p1491879 This alternative configuration for using ''pacman'' with aria2] tries to simplify configuration and adds more configuration options.}}<br />
<br />
See [http://aria2.sourceforge.net/manual/en/html/aria2c.html#options OPTIONS] in {{man|1|aria2c}} for used aria2c options.<br />
<br />
* {{ic|-d, --dir}}: The directory to store the downloaded file(s) as specified by ''pacman''.<br />
* {{ic|-o, --out}}: The output file name(s) of the downloaded file(s). <br />
* {{ic|%o}}: Variable which represents the local filename(s) as specified by ''pacman''.<br />
* {{ic|%u}}: Variable which represents the download URL as specified by ''pacman''.<br />
<br />
==== Other applications ====<br />
<br />
There are other downloading applications that you can use with ''pacman''. Here they are, and their associated XferCommand settings:<br />
<br />
* {{ic|snarf}}: {{ic|1=XferCommand = /usr/bin/snarf -N %u}}<br />
* {{ic|lftp}}: {{ic|1=XferCommand = /usr/bin/lftp -c pget %u}}<br />
* {{ic|axel}}: {{ic|1=XferCommand = /usr/bin/axel -n 2 -v -a -o %o %u}}<br />
* {{ic|hget}}: {{ic|1=XferCommand = /usr/bin/hget %u -n 2 -skip-tls false}} (please read the [https://github.com/huydx/hget documentation on the Github project page] for more info)<br />
<br />
== Utilities ==<br />
<br />
* {{App|Lostfiles|Script that identifies files not owned by any package.|https://github.com/graysky2/lostfiles|{{Pkg|lostfiles}}}}<br />
* {{App|Pacmatic|''Pacman'' wrapper to check Arch News before upgrading, avoid partial upgrades, and warn about configuration file changes.|http://kmkeen.com/pacmatic|{{Pkg|pacmatic}}}}<br />
* {{App|pacutils|Helper library for libalpm based programs.|https://github.com/andrewgregory/pacutils|{{Pkg|pacutils}}}}<br />
* {{App|[[pkgfile]]|Tool that finds what package owns a file.|http://github.com/falconindy/pkgfile|{{Pkg|pkgfile}}}}<br />
* {{App|pkgtools|Collection of scripts for Arch Linux packages.|https://github.com/Daenyth/pkgtools|{{AUR|pkgtools}}}}<br />
* {{App|repoctl|Tool to help manage local repositories.|https://github.com/cassava/repoctl|{{AUR|repoctl}}}}<br />
* {{App|repose|An Arch Linux repository building tool.|https://github.com/vodik/repose|{{Pkg|repose}}}}<br />
* {{App|[[Snapper#Wrapping_pacman_transactions_in_snapshots|snap-pac]]|Make ''pacman'' automatically use snapper to create pre/post snapshots like openSUSE's YaST.|https://github.com/wesbarnett/snap-pac|{{pkg|snap-pac}}}}<br />
<br />
=== Graphical front-ends ===<br />
<br />
{{Warning|1=Some front-ends such as {{AUR|octopi}} [https://github.com/aarnt/octopi/issues/134#issuecomment-142099266] perform [[partial upgrade]]s periodically.}}<br />
<br />
* {{App|1=Aarchup|2=Fork of archup. Has the same options as archup plus a few other features. For differences between both please check [https://bbs.archlinux.org/viewtopic.php?id=119129 changelog].|3=https://github.com/aericson/aarchup/|4={{AUR|aarchup}}}}<br />
* {{App|Arch-Update|Update indicator for Gnome-Shell.|https://github.com/RaphaelRochet/arch-update|{{AUR|gnome-shell-extension-arch-update}}}}<br />
* {{App|Arch-Update-Notifier| Update indicator for KDE.|https://github.com/I-Dream-in-Code/kde-arch-update-plasmoid|{{AUR|plasma5-applets-kde-arch-update-notifier-git}}}}<br />
* {{App|Discover|A collection of package management tools for KDE, using PackageKit.|https://projects.kde.org/projects/kde/workspace/discover|{{Pkg|discover}}}}<br />
* {{App|GNOME packagekit|GTK based package management tool|http://www.freedesktop.org/software/PackageKit/|{{Pkg|gnome-packagekit}}}}<br />
* {{App|GNOME Software|Gnome Software App. (Curated selection for GNOME)|https://wiki.gnome.org/Apps/Software|{{pkg|gnome-software}}}}<br />
* {{App|kalu|A small application that will add an icon to your systray and sit there, regularly checking if there's anything new for you to upgrade.|https://jjacky.com/kalu/|{{aur|kalu}}}}<br />
* {{App|pcurses|Package management in a curses frontend|https://github.com/schuay/pcurses|{{Pkg|pcurses}}}}<br />
* {{App|1=PkgBrowser|2=Application for searching and browsing Arch packages, showing details on selected packages.|3=https://bitbucket.org/kachelaqa/pkgbrowser/wiki/Home|4={{AUR|pkgbrowser}}}}<br />
* {{App|tkPacman|Depends only on Tcl/Tk and X11, and interacts with the package database via the CLI of ''pacman''.|http://sourceforge.net/projects/tkpacman|{{AUR|tkpacman}}}}</div>Pdc