https://wiki.archlinux.org/api.php?action=feedcontributions&user=Cirelli94&feedformat=atomArchWiki - User contributions [en]2024-03-29T08:54:24ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Btrfs_(Fran%C3%A7ais)&diff=701445Btrfs (Français)2021-11-10T08:43:55Z<p>Cirelli94: /* btrfs check */ Fix misspell Btrfs name</p>
<hr />
<div>[[Category:File systems (Français)]]<br />
[[de:Arch auf BtrFS]]<br />
[[en:Btrfs]]<br />
[[es:Btrfs]]<br />
[[it:Btrfs]]<br />
[[ja:Btrfs]]<br />
[[pt:Btrfs]]<br />
[[zh-hans:Btrfs]]<br />
{{Related articles start}}<br />
{{Related|File systems}}<br />
{{Related|Snapper}}<br />
{{Related|dm-crypt/Encrypting an entire system#Btrfs subvolumes with swap}}<br />
{{Related articles end}}<br />
{{Translateme (Français)|L'état de traduction de cet article est indéfini. Voir [[ArchWiki:Translation Team (Français)]].}}<br />
Btrfs (système de fichiers B-tree, prononcé comme "butter F S", "better F S", "b-tree F S", ou simplement en l'épelant) est un système de fichiers basé sur le principe copie en écriture (copy-on-write (COW)), initialement conçu chez Oracle Corporation pour être utilisé sous Linux. Le développement de Btrfs a commencé en 2007, et en août 2014, le format sur disque du système de fichiers a été marqué comme stable.<br />
<br />
De [https://btrfs.wiki.kernel.org/index.php/Main_Page Btrfs Wiki]:<br />
<br />
Btrfs est un nouveau système de fichiers Copie en écriture (CoW) pour Linux destiné à implémenter des fonctionnalités avancées tout en se concentrant sur la tolérance aux pannes, la réparation et l'administration facile. Développé conjointement chez Oracle, Red Hat, Fujitsu, Intel, SUSE, STRATO et bien d'autres, Btrfs est licencié sous licence GPL et ouvert à la contribution de n'importe qui.<br />
<br />
{{Warning (Français)|Btrfs a quelques fonctionnalités qui sont considérées comme expérimentales. Voir le [https://btrfs.wiki.kernel.org/index.php/Status Status] du Wiki de Btrfs, [https://btrfs.wiki.kernel.org/index.php/FAQ#Is_btrfs_stable.3F Est-ce que Btrfs est stable?] et [https://btrfs.wiki.kernel.org/index.php/Getting_started Mise en route] pour des informations plus détaillées. Voir la section [[#Problèmes connus]].}}<br />
<br />
== Préparation ==<br />
<br />
Les noyaux officiels {{Pkg|linux}} et {{pkg|linux-lts}} incluent le support de Btrfs. Si vous voulez démarrer à partir d'un système de fichiers Btrfs, vérifiez si votre chargeur de démarrage prend en charge Btrfs.<br />
<br />
Les utilitaires d'espace utilisateur sont disponibles en installant le paquet {{Pkg|btrfs-progs}}.<br />
<br />
== Création du système de fichiers ==<br />
<br />
Ce qui suit montre comment créer un nouveau système de fichiers Btrfs.<br />
<br />
Pour convertir une partition ext3/4 en Btrfs, reportez-vous à la section [[#Conversion Ext3/4 en Btrfs]]. Pour utiliser une configuration sans partition, voir [[#Disque Btrfs sans partition]].<br />
<br />
=== Système de fichiers sur un seul périphérique ===<br />
<br />
Pour formater une partition faites:<br />
# mkfs.btrfs -L mylabel /dev/partition<br />
<br />
Pour utiliser une taille de bloc plus grande pour les données/métadonnées, spécifiez une valeur pour le {{ic|nodesize}} via le commutateur {{ic|-n}} comme illustré dans cet exemple en utilisant des blocs de 16 Ko.<br />
# mkfs.btrfs -L mylabel -n 16k /dev/partition<br />
<br />
=== Système de fichiers multi-périphériques ===<br />
<br />
{{Attention|Le mode RAID 5, RAID 6 de Btrfs est considéré comme fatalement imparfait, et ne devrait pas être utilisé pour "autre chose que des tests avec des données jetables". Voir la page [https://btrfs.wiki.kernel.org/index.php/RAID56 Btrfs sur RAID5 et RAID6] pour les mises à jour des statuts.<br />
<br />
Certains chargeurs de démarrage tels que [[Syslinux (Français)|syslinux]] ne prennent pas en charge les systèmes de fichiers multi-périphériques.}}<br />
<br />
Plusieurs périphériques peuvent être saisis pour créer un RAID. Les niveaux RAID pris en charge comprennent RAID 0, RAID 1, RAID 10, RAID 5 et RAID 6. Les niveaux RAID peuvent être configurés séparément pour les données et les métadonnées à l'aide des options {{ic|-d}} et {{ic|-m}} respectivement. Par défaut, les données sont rayées ({{ic|raid0}}) et les métadonnées sont mises en miroir ({{ic|raid1}}). Voir [https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices Utilisation de Btrfs avec plusieurs périphériques] pour plus d'informations sur la création d'un volume RAID Btrfs ainsi que la page de manuel pour {{ic|mkfs.btrfs}}.<br />
# mkfs.btrfs -d raid0 -m raid1 /dev/part1 /dev/part2 ...<br />
<br />
Vous devez inclure le hook {{ic|udev}} ou le hook {{ic|btrfs}} dans {{ic|/etc/mkinitcpio.conf}} afin d'utiliser plusieurs périphériques btrfs dans un pool. Voir l'article [[Mkinitcpio (Français)#Hooks]] pour plus d'informations.<br />
<br />
{{Note|Si les disques de votre réseau multi-périphériques ont des tailles différentes, cela peut ne pas utiliser toute la capacité de tous les lecteurs. Afin d'utiliser la pleine capacité de tous les disques, utilisez {{ic|-d single}} au lieu de {{ic|-d raid0 -m raid1}} (métadonnées en miroir, données non réfléchies et non rayées).}}<br />
<br />
{{Note|Le montage d'un tel système de fichiers peut avoir pour conséquence que tous les périphériques, à l'exception d'un seul, soient bloqués et que le système ne finisse jamais de démarrer à cause d'un bug dans la gestion de ce type de système de fichiers.}}<br />
<br />
Voir [[#RAID]] pour des conseils sur la maintenance spécifique aux systèmes de fichiers multi-périphériques Btrfs.<br />
<br />
== Configuration du système de fichiers ==<br />
<br />
=== Copie en écriture (CoW) ===<br />
<br />
Par défaut, Btrfs utilise [[Wikipedia:fr:Copy-on-write|''copy on write'']] pour tous les fichiers en permanence. Voir la section [https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Copy_on_Write_.28CoW.29 Btrfs Sysadmin Guide] pour plus de détails sur l'implémentation, ainsi que les avantages et les inconvénients.<br />
<br />
==== Désactiver COW ====<br />
<br />
Pour désactiver la fonction de copie en écriture pour les fichiers nouvellement créés dans un sous-volume monté, utilisez l'option de montage {{ic|nodatacow}}. Cela n'affectera que les fichiers nouvellement créés. La copie en écriture se produira toujours pour les fichiers existants.<br />
<br />
{{Note|A partir des options [https://btrfs.wiki.kernel.org/index.php/Mount_options Btrfs Wiki Mount]: dans un même système de fichiers, il n'est pas possible de monter certains sous-volumes avec {{ic|nodatacow}} et d'autres avec {{ic|datacow}}. L'option de montage du premier sous-volume monté s'applique à tous les autres sous-volumes.}}<br />
<br />
Pour désactiver la fonction copie en écriture pour les fichiers/répertoires individuels, procédez comme suit:<br />
$ chattr +C /dir/file<br />
<br />
Ceci désactive la copie en écriture pour les opérations dans lesquelles il n' y a qu'une seule référence au fichier. S'il y a plus d'une référence (ex: via {{ic|1=cp --reflink=always}} ou à cause d'un snapshot du système de fichiers", la copie en écriture se produit toujours.<br />
<br />
{{Note|Depuis la page de manuel de chattr: "Pour btrfs, le drapeau 'C' doit être placé sur les nouveaux fichiers ou vides. S'il est défini sur un fichier qui a déjà des blocs de données, il n'est pas défini quand les blocs assignés au fichier seront entièrement stables. Si le drapeau 'C' est placé sur un répertoire, cela n'aura pas d'effet sur le répertoire, mais les nouveaux fichiers créés dans ce répertoire auront l'attribut No_COW."}}<br />
<br />
{{Astuce|Conformément à la remarque ci-dessus, vous pouvez utiliser l'astuce suivante pour désactiver la copie en écriture sur des fichiers existants dans un répertoire:<br />
$ mv /path/to/dir /path/to/dir_old<br />
$ mkdir /path/to/dir<br />
$ chattr +C /path/to/dir<br />
$ cp -a /path/to/dir_old/* /path/to/dir<br />
$ rm -rf /path/to/dir_old<br />
Veillez à ce que les données ne soient pas utilisées pendant ce processus. Notez également que {{ic|mv}} ou {{ic|cp --reflink}} comme décrit ci-dessous ne fonctionnera pas.}}<br />
<br />
==== Création de copies légères ====<br />
<br />
Par défaut, lorsque vous copiez des fichiers sur un système de fichiers Btrfs avec {{ic|cp}}, des copies réelles sont créées. Pour créer une copie légère faisant référence aux données originales, utilisez l'option ''reflink'':<br />
$ cp --reflink source dest<br />
<br />
Voir la page de manuel sur {{man|1|cp}} pour plus de détails sur le drapeau {{ic|--reflink}}.<br />
<br />
=== Compression ===<br />
<br />
Btrfs supporte la compression transparente, ce qui signifie que chaque fichier de la partition est automatiquement compressé. Cela permet non seulement de réduire la taille des fichiers, mais aussi [https://www.phoronix.com/scan.php?page=article&item=btrfs_compress_2635&num=1 d'améliorer les performances], en particulier si vous utilisez [https://www.phoronix.com/scan.php?page=article&item=btrfs_lzo_2638&num=1 l'algorithme lzo], dans certains cas d'utilisation spécifiques (ex: un seul thread avec des entrées/sorties de fichiers volumineux), tout en nuisant manifestement au rendement dans d'autres cas (ex: cpu et/ou multithreaded intensif avec de gros fichiers IO).<br />
<br />
La compression est activée à l'aide des options compress=zlib ou compress=lzo mount. Seuls les fichiers créés ou modifiés après l’ajout de l’option de montage seront compressés. Cependant, il peut être appliqué assez facilement aux fichiers existants (par exemple après une conversion de ext3/4) en utilisant la commande {{ic|btrfs filesystem defragment -calg}}, où {{ic|''alg''}} est {{ic|zlib}} ou {{ic|lzo}}. Pour re-compresser tout le système de fichiers avec {{pkg|lzo}}, exécutez la commande suivante:<br />
# btrfs filesystem defragment -r -v -clzo /<br />
<br />
{{Astuce|La compression peut également être activée par fichier sans utiliser l’option de montage {{ic|compress}}; il suffit d’appliquer {{ic|chattr +c}} au fichier. Lorsqu’il est appliqué aux répertoires, il provoque la compression automatique des nouveaux fichiers au fur et à mesure qu’ils arrivent.}}<br />
<br />
Lorsque vous installez Arch sur une partition Btrfs vide, utilisez l’option {{ic|compress}} lors du montage du système de fichiers: {{ic|1=mount -o compress=lzo /dev/sdxY /mnt/}}. Lors de la configuration, ajoutez {{ic|1=compress=lzo}} aux options de montage du système de fichiers racine dans fstab.<br />
<br />
=== Sous-volumes ===<br />
<br />
“Un sous-volume btrfs n’est pas un bloc (et ne peut pas être traité comme tel) mais un sous-volume btrfs peut être considéré comme un espace de noms de fichier POSIX. Cet espace de nommage est accessible via le sous-volume supérieur du système de fichiers, ou il peut être monté en tant que tel.” [https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Subvolumes].<br />
<br />
Chaque système de fichiers Btrfs possède un sous-volume de niveau supérieur avec ID 5. Il peut être monté comme {{ic|/}} (par défaut), ou un autre sous-volume peut être monté à la place. Les sous-volumes peuvent être déplacés dans le système de fichiers et sont plutôt identifiés par leur identifiant que par leur chemin d’accès.<br />
<br />
Voir les liens suivants pour plus de détails:<br />
<br />
*[https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Subvolumes Btrfs Wiki SysadminGuide#Subvolumes]<br />
*[https://btrfs.wiki.kernel.org/index.php/Getting_started#Basic_Filesystem_Commands Basic_Filesystem_Commands]<br />
*[https://btrfs.wiki.kernel.org/index.php/Trees Btrfs Wiki Trees]<br />
<br />
==== Création d’un sous-volume ====<br />
<br />
Pour créer un sous-volume:<br />
<br />
$ btrfs subvolume create /path/to/subvolume<br />
<br />
==== Lister des sous-volumes ====<br />
<br />
Pour voir la liste des sous-volumes actuels sous le chemin:<br />
<br />
$ btrfs subvolume list -p path<br />
<br />
==== Suppression d’un sous-volume ====<br />
<br />
Pour supprimer un sous-volume:<br />
<br />
$ btrfs subvolume delete /path/to/subvolume<br />
<br />
Tenter de supprimer le répertoire {{ic|/path/to/subvolume}} sans utiliser la commande ci-dessus ne supprimera pas le sous-volume.<br />
<br />
==== Montage des sous volumes ====<br />
<br />
Les sous-volumes peuvent être montés comme des partitions de système de fichiers en utilisant les drapeaux {{ic|1=subvol=''/path/to/subvolume''}}ou {{ic|1=subvolid=objectid mount}}. Par exemple, vous pourriez avoir un sous-volume nommé {{ic|subvol_root}} et le monter comme {{ic|/}}. On peut imiter les partitions de système de fichiers traditionnelles en créant divers sous-volumes sous le niveau supérieur du système de fichiers et ensuite les monter aux points de montage appropriés. Ainsi, on peut facilement restaurer un système de fichiers (ou une partie de celui-ci) dans un état précédent en utilisant [[#Snapshot]].<br />
<br />
{{Astuce|1= La modification de la disposition des sous-volume est simplifiée en n’utilisant pas le sous-volume de niveau supérieur (ID=5) comme {{ic|/}} (ce qui est fait par défaut). Au lieu de cela, envisagez de créer un sous-volume pour héberger vos données réelles et de les monter en tant que {{ic|/}}.}}<br />
<br />
{{Note|“La plupart des options de montage s’appliquent à '''l’ensemble du système de fichiers''', et seules les options pour le premier sous-volume à monter prendront effet. Cela est dû au manque de mise en œuvre et pourrait changer à l’avenir.” [https://btrfs.wiki.kernel.org/index.php/Mount_options] Voir [https://btrfs.wiki.kernel.org/index.php/FAQ#Can_I_mount_subvolumes_with_different_mount_options.3F la FAQ de Btrfs Wiki] pour quelles options de montage peuvent être utilisées par sous-volume.}}<br />
<br />
Voir [[Snapper#Suggested filesystem layout]], [https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Managing_Snapshots Btrfs SysadminGuide#Managing Snapshots], et [https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Layout Btrfs SysadminGuide#Layout] par exemple les structures de système de fichiers utilisant des sous-volumes.<br />
<br />
==== Modification du sous-volume par défaut ====<br />
<br />
Le sous-volume par défaut est monté si aucune option de montage {{ic|1=subvol=}} n’est fournie. Pour changer le sous-volume par défaut, faites:<br />
$ btrfs subvolume set-default subvolume-id /<br />
<br />
Le ''sous-volume-id'' peut être trouvé par [[#Lister des sous-volumes|lister]].<br />
<br />
{{Note|1=Après avoir modifié le sous-volume par défaut sur un système avec [[GRUB]], vous devez exécuter {{ic|grub-install}} à nouveau pour notifier le chargeur de démarrage des modifications. Voir ce [https://bbs.archlinux.org/viewtopic.php?pid=1615373 fil de discussion du forum].}}<br />
<br />
Changer le sous-volume par défaut avec {{ic|btrfs subvolume set-default}} rendra le niveau supérieur du système de fichiers inaccessible, sauf en utilisant les options de montage {{ic|1=subvol=/}} ou {{ic|1=subvolid=5}} <br />
[https://btrfs.wiki.kernel.org/index.php/SysadminGuide].<br />
<br />
=== Quota ===<br />
<br />
{{Attention|Qgroup n'est pas encore stable et la combinaison de quotas avec (de trop nombreux) snapshots de sous-volumes peut causer des problèmes de performance, par exemple lors de la suppression des snapshots. De plus, il y a plusieurs autres [https://btrfs.wiki.kernel.org/index.php/Quota_support#Known_issues problèmes connus].}}<br />
<br />
La prise en charge des quotas dans Btrfs est implémentée à un niveau de sous-volume par l’utilisation de groupes de quotas ou qgroup: Chaque sous-volume est affecté à un groupe de quotas sous la forme de ''0/<subvolume id>'' par défaut. Toutefois, il est possible de créer un groupe de quotas en utilisant n’importe quel nombre si vous le souhaitez.<br />
<br />
Pour utiliser les qgroupes, vous devez d’abord activer le quota en utilisant<br />
$ btrfs quota enable<br />
<br />
À partir de ce moment, les sous-volumes nouvellement créés seront contrôlés par ces groupes. Afin de les activer rétrospectivement pour des sous-volumes déjà existants, activez normalement le quota, puis créez un groupe q (groupe de quotas) pour chacun de ces sous-volumes en utilisant leur ''<subvolume id>'' et rescannez-les:<br />
# btrfs subvolume list <path> | cut -d' ' -f2 | xargs -I{} -n1 btrfs qgroup create 0/{} <path><br />
# btrfs quota rescan <path><br />
<br />
Les groupes de quotas dans Btrfs forment une arborescence hiérarchique, dans laquelle les qgroupes sont rattachés aux sous-volumes. Les limites de taille sont définies par qgroup et s’appliquent quand une limite est atteinte dans une arborescence contenant un sous-volume donné.<br />
<br />
Les limites des groupes de quotas peuvent être appliquées soit à l’utilisation totale des données, soit à l’utilisation de données non partagées, soit à l’utilisation de données compressées, soit aux deux. La copie de fichier et la suppression de fichier peuvent toutes deux affecter les limites puisque la limite non partagée d’un autre qgroup peut changer si les fichiers du volume original sont supprimés et qu’il ne reste qu’une seule copie.<br />
<br />
Par exemple, un nouveau Snapshot partage presque tous les blocs avec le sous-volume original, les nouvelles écritures dans l’un ou l’autre sous-volume augmenteront vers la limite exclusive, les suppressions de données communes dans un volume augmenteront vers la limite exclusive dans l’autre.<br />
<br />
Pour appliquer une limite à un qgroup, utilisez la commande {{ic|btrfs qgroup limit}}. Selon votre utilisation, utilisez une limite totale, une limite non partagée ({{ic|-e}}) ou une limite compressée ({{ic|-c}}).<br />
<br />
Pour afficher l’utilisation et les limites pour un chemin donné dans un système de fichiers, utilisez<br />
# btrfs qgroup show -reF <path><br />
<br />
=== Intervalle d'engagement (commit) ===<br />
<br />
La résolution à laquelle les données sont écrites dans le système de fichiers est dictée par Btrfs lui-même et par les paramètres du système. Btrfs passe par défaut à un intervalle de 30 secondes entre les points de contrôle dans lequel les nouvelles données sont engagées dans le système de fichiers. Ceci peut être modifié en ajoutant l'option {{ic|commit}} mount dans {{ic|/etc/fstab}} pour la partition btrfs.<br />
LABEL=arch64 / btrfs defaults,noatime,compress=lzo,commit=120 0 0<br />
<br />
Les paramétrages de l'ensemble du système affectent également les intervalles de validation. Ils incluent les fichiers sous {{ic|/proc/sys/vm/*}} et sont en dehors du cadre de cet article du wiki. La documentation du noyau pour eux réside dans {{ic|Documentation/sysctl/vm.txt}}.<br />
<br />
=== SSD TRIM ===<br />
<br />
Un système de fichiers Btrfs est capable de libérer les blocs inutilisés d'un lecteur SSD supportant la commande TRIM.<br />
<br />
Pour plus d'informations sur l'activation et l'utilisation de TRIM, voir [[Solid state drive (Français)#TRIM]].<br />
<br />
== Usage ==<br />
<br />
=== Affichage de l'espace utilisé/libre ===<br />
<br />
Les outils généraux d'espace utilisateur linux tels que {{ic|/usr/bin/df}} ne rapporteront pas correctement l'espace libre sur une partition Btrfs. Il est recommandé d'utiliser {{ic|/usr/bin/btrfs}} pour interroger une partition Btrfs. Voici une illustration de cet effet, d'abord en faisant une requête à l'aide de {{ic|df -h}}, puis en utilisant {{ic|btrfs filesystem df}}:<br />
{{hc|$ df -h /|<br />
Filesystem Size Used Avail Use% Mounted on<br />
/dev/sda3 119G 3.0G 116G 3% /<br />
}}<br />
<br />
{{hc|$ btrfs filesystem df /|2=<br />
Data: total=3.01GB, used=2.73GB<br />
System: total=4.00MB, used=16.00KB<br />
Metadata: total=1.01GB, used=181.83MB<br />
}}<br />
<br />
Remarquez que {{ic|df -h}} indique 3.0GB utilisé mais {{ic|btrfs filesystem df}} indique 2.73GB pour les données. Ceci est dû à la façon dont Btrfs alloue les espaces dans le pool.<br />
<br />
L'utilisation réelle du disque est la somme des trois valeurs 'utilisées' qui est inférieure à 3.0GB comme rapporté par {{ic|df -h}}.<br />
<br />
{{Note|1=Si vous voyez une entrée de type {{ic|unknown}} dans la sortie de {{ic|btrfs filesystem df}} au noyau >= 3.15, ceci est un bug d'affichage. A partir de ce [https://lore.kernel.org/linux-btrfs/1398172800-19548-1-git-send-email-dsterba@suse.cz/ patch], l'entrée signifie GlobalReserve, ce qui est une sorte de tampon pour les changements non encore purgés. Cette entrée est affichée comme {{ic|unknown, single}} dans les configurations RAID et ne peut pas être rééquilibrée.}}<br />
<br />
Une autre commande utile pour afficher une lecture moins verbeuse de l'espace utilisé est {{ic|btrfs filesystem show}}:<br />
# btrfs filesystem show /dev/sda3<br />
<br />
Une commande plus verbeuse combinant les informations de {{ic|df}} et {{ic|show}} qui relie directement l'espace libre et utilisé est {{ic|btrfs filesystem usage}}. Il est supposé remplacer la commande {{ic|df}} du système de fichiers btrfs à la longue:<br />
# btrfs filesystem usage /<br />
<br />
{{Note|La commande {{ic|btrfs filesystem usage}} ne fonctionne pas correctement avec les niveaux RAID {{ic|RAID5/RAID6}}.}}<br />
<br />
=== Defragmentation ===<br />
<br />
Btrfs supporte la défragmentation en ligne via [https://btrfs.wiki.kernel.org/index.php/Mount_options mount option]. Pour défragmenter manuellement votre {{ic|/}}, utilisez:<br />
# btrfs filesystem defragment -r /<br />
<br />
En utilisant la commande ci-dessus sans le commutateur {{ic|-r}}, seules les métadonnées du sous-volume contenant le répertoire seront défragmentées. Ceci permet la défragmentation d'un seul fichier en spécifiant simplement le chemin d'accès.<br />
<br />
Défragmenter un fichier qui a une copie en écriture COW (une copie instantanée (snapshot) ou une copie faite avec {{ic|cp --reflink}} ou {{ic|bcp}}) de plus l'utilisation du commutateur {{ic|-c}} avec un algorithme de compression peut avoir comme conséquence deux fichiers indépendants augmentant effectivement l'utilisation du disque.<br />
<br />
=== RAID ===<br />
<br />
Btrfs offre un "RAID" natif pour les [[#Système de fichiers multi-périphériques]].<br />
<br />
Les caractéristiques notables qui démarquent le RAID btrfs de [[mdadm]] sont les tableaux redondants autorégénérateurs et l’équilibrage en ligne.<br />
Voir [https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices la page wiki de Btrfs] pour plus d’informations. La page [https://btrfs.wiki.kernel.org/index.php/SysadminGuide#RAID_and_data_replication sysadmin de Btrfs] contient également une section avec un peu plus de détails techniques.<br />
<br />
{{Attention|Le code RAID de parité (RAID 5/6) contient plusieurs bugs sérieux de perte de données. Voir [https://btrfs.wiki.kernel.org/index.php/RAID56 la page RAID5/6] du Wiki de Btrfs et un rapport de bug sur [https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg55161.html la liste de diffusion de linux-btrfs] pour plus d’informations détaillées.}}<br />
<br />
==== Scrub ====<br />
<br />
Le [https://btrfs.wiki.kernel.org/index.php/Glossary Glossaire du Wiki de Btrfs] dit que le scrub Btrfs est "un outil de vérification de système de fichiers en ligne. Lit toutes les données et métadonnées sur le système de fichiers, et utilise les checksums et les copies en double depuis le stockage RAID pour identifier et réparer les données corrompues."<br />
<br />
{{Attention|Un processus de scrub en cours empêchera le système de s’arrêter, voir ce [https://lore.kernel.org/linux-btrfs/20140227190656.GA28338@merlins.org/ thread] pour plus de détails.}}<br />
<br />
===== Démarrage manuel =====<br />
<br />
Pour démarrer un scrub (en arrière-plan) sur le système de fichiers qui contient {{ic|/}}:<br />
# btrfs scrub start /<br />
<br />
Pour vérifier l’état d’un scrub en cours:<br />
# btrfs scrub status /<br />
<br />
===== Commencer avec un service ou un timer =====<br />
<br />
Le paquet {{pkg|btrfs-progs}} apporte l’unité {{ic|btrfs-scrub@.timer}} pour le nettoyage mensuel du point de montage spécifié. [[Systemd (Français)#Unit.C3.A9|Activez]] le timer avec un chemin de sortie, par ex: {{ic|btrfs-scrub@-.timer pour}} {{ic|/}} et {{ic|btrfs-scrub@home.timer}} pour {{ic|/home}}. Vous pouvez utiliser {{ic|systemd-escape -p /path/to/mountpoint}} pour échapper le chemin, voir [https://jlk.fjfi.cvut.cz/arch/manpages/man/systemd-escape.1 systemd-escape] pour plus de détails.<br />
<br />
Vous pouvez également exécuter le scrub en [[Systemd (Français)#Unit.C3.A9|démarrant]] {{ic|btrfs-scrub@.service}} (avec le même chemin d’accès encodé). L’avantage de cette méthode par rapport à la méthode {{ic|# btrfs}} est que les résultats de l’opération seront consignés dans le [[Systemd (Français)#Journalisation|journal systemd]].<br />
<br />
==== Balance ====<br />
<br />
"Un équilibrage transmet à nouveau toutes les données du système de fichiers via l’attributeur. Il est principalement destiné à rééquilibrer les données dans le système de fichiers à travers les périphériques lorsqu’un périphérique est ajouté ou supprimé. Un équilibrage régénère les copies manquantes pour les niveaux RAID redondants, si un périphérique a échoué." [https://btrfs.wiki.kernel.org/index.php/Glossary] Voir [https://btrfs.wiki.kernel.org/index.php/FAQ#What_does_.22balance.22_do.3F la page FAQ en amont].<br />
<br />
Sur un système de fichiers mono périphérique, une balance (équilibrage) peut également être utile pour réduire (temporairement) la quantité de blocs de méta-données alloués mais non utilisés.<br />
<br />
Parfois, cela est nécessaire pour résoudre les problèmes de [https://btrfs.wiki.kernel.org/index.php/FAQ#Help.21_Btrfs_claims_I.27m_out_of_space.2C_but_it_looks_like_I_should_have_lots_left.21 "système de fichiers complet"].<br />
# btrfs balance start /<br />
# btrfs balance status /<br />
<br />
=== Snapshot ===<br />
<br />
"Un Snapshot (instantané) est simplement un sous-volume qui partage ses données (et métadonnées) avec un autre sous-volume, en utilisant les capacités COW de btrfs". Voir [https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Snapshots Btrfs Wiki SysadminGuide#Snapshots] pour plus de détails.<br />
<br />
Pour créer un Snapshot: <br />
# btrfs subvolume snapshot source [dest/]name<br />
<br />
Pour créer un snapshot en lecture seule, ajoutez le drapeau {{ic|-r}}. Pour créer une version inscriptible d’un snapshot en lecture seule, il suffit de créer un snapshot.<br />
<br />
{{Note|Les snapshots ne sont pas récursifs. Chaque sous-volume imbriqué sera un répertoire vide à l’intérieur de ce snapshot.}}<br />
<br />
=== Envoyer/recevoir ===<br />
<br />
Un sous-volume peut être envoyé à stdout ou un fichier à l'aide de la commande {{ic|send}}. Ceci est généralement le plus utile lorsqu'il est acheminé vers la commande {{ic|receive}} d'un Btrfs.<br />
<br />
Par exemple, pour envoyer un snapshot nommé {{ic|/root_backup}} (peut-être d’un snapshot que vous avez fait plus tôt de {{ic|/}}) à {{ic|/root_backup}}, vous devriez faire ce qui suit:<br />
# btrfs send /root_backup | btrfs receive /backup<br />
<br />
Le snapshot envoyé doit être en lecture seule. La commande ci-dessus est utile pour copier un sous-volume sur un périphérique externe (par ex: un disque USB monté à {{ic|/backup}} voir ci-dessus).<br />
<br />
Vous pouvez également n’envoyer que la différence entre deux snapshots. Par exemple, si vous avez déjà envoyé une copie de {{ic|root_backup}} ci-dessus et que vous avez créé un nouveau snapshot en lecture seule sur votre système nommé {{ic|root_backup_new}}, alors pour envoyer uniquement la différence incrémentale à {{ic|/backup}} faire:<br />
# btrfs send -p /root_backup /root_backup_new | btrfs receive /backup<br />
<br />
Maintenant un nouveau sous-volume nommé {{ic|root_backup_new}} sera présent dans {{ic|/backup}}.<br />
<br />
Voir [https://btrfs.wiki.kernel.org/index.php/Incremental_Backup Btrfs Wiki's Incremental Backup page] sur la façon d’utiliser ceci pour les sauvegardes incrémentales et pour les outils qui automatisent le processus.<br />
<br />
=== Déduplication ===<br />
<br />
En utilisant la fonction de copie en écriture (COW), Btrfs est capable de copier des fichiers ou des sous-volumes entiers sans avoir à copier les données. Cependant, chaque fois qu’un fichier est modifié, une nouvelle copie correcte est créée. La déduplication va plus loin, en identifiant activement les blocs de données qui partagent des séquences communes et en les combinant dans une certaine mesure avec la même sémantique de copie en écriture.<br />
<br />
Les outils dédiés à la déduplication d’une partition formatée en Btrfs incluent {{Pkg|duperemove}}, {{aur|bedup}} et ''btrfs-dedup''. On peut aussi vouloir simplement dédupliquer des données sur un niveau de fichier au lieu d’utiliser par exemple {{pkg|rmlint}} ou {{AUR|jdupes}}. Pour un aperçu des fonctionnalités disponibles de ces programmes et des informations supplémentaires, jetez un coup d’oeil à [https://btrfs.wiki.kernel.org/index.php/Deduplication#Batch upstream Wiki entry].<br />
<br />
De plus, les développeurs Btrfs travaillent sur la déduplication inband (également connue sous le nom de déduplication synchrone ou en ligne), c’est-à-dire la déduplication effectuée lors de l’écriture de nouvelles données sur le système de fichiers. Actuellement, il s’agit encore d’une expérience développée en dehors de l’arborescence. Les utilisateurs désireux de tester la nouvelle fonctionnalité doivent lire la page [https://btrfs.wiki.kernel.org/index.php/User_notes_on_dedupe appropriée du wiki du noyau].<br />
<br />
== Problèmes connus ==<br />
<br />
Quelques limites devraient être connues avant d’essayer.<br />
<br />
=== Chiffrement ===<br />
<br />
Btrfs n’a pas de support de cryptage intégré, mais cela pourrait venir dans le [https://lwn.net/Articles/700487/ futur]. Les utilisateurs peuvent chiffrer la partition avant d’exécuter {{ic|mkfs.btrfs}}. Voir [[dm-crypt/Encrypting an entire system#Btrfs subvolumes with swap]].<br />
<br />
Les systèmes de fichiers Btrfs existants peuvent utiliser quelque chose comme [[EncFS]] ou [[TrueCrypt]], bien que peut-être sans certaines fonctionnalités de Btrfs.<br />
<br />
=== Swap ===<br />
<br />
Btrfs supporte les fichiers d'échange la version 5.0 cependant avec quelques limitations (cf.la note [[Swap (Français)#Fichier d'échange]]).<br />
<br />
=== TLP ===<br />
<br />
L’utilisation de TLP nécessite des précautions particulières afin d’éviter la corruption du système de fichiers. Reportez-vous à la section [[TLP]] correspondante pour plus d’informations.<br />
<br />
== Trucs et astuces ==<br />
<br />
=== Disque Btrfs sans partition ===<br />
<br />
{{Warning (Français)|La plupart des utilisateurs ne veulent pas ce type de configuration et devraient plutôt installer Btrfs sur une partition régulière. En outre GRUB déconseille fortement l’installation sur un disque sans partition.}}<br />
<br />
Btrfs peut occuper tout un périphérique de stockage de données, en remplaçant les schémas de partitionnement [[MBR]] ou [[GPT]], en utilisant des [[#Sous-volumes]] pour simuler les partitions.<br />
<br />
Cependant, l’utilisation d’une configuration sans partition n’est pas nécessaire [[#Création du système de fichiers]] sur une partition existante qui a été créée en utilisant une autre méthode. Il y a certaines limitations aux configurations de disques uniques sans partition:<br />
<br />
*Ne peut pas utiliser différents [[File systems|systèmes de fichiers]] pour différents [[Fstab (Français)|points de montage]].<br />
<br />
*Ne peut pas utiliser l'[[UEFI]] pour démarrer.<br />
<br />
Pour écraser la table de partition existante avec Btrfs, exécutez la commande suivante:<br />
# mkfs.btrfs /dev/sdX<br />
<br />
Par exemple, utilisez {{ic|/dev/sda}} plutôt que {{ic|/dev/sda1}}. Ce dernier formaterait une partition existante au lieu de remplacer l’ensemble du schéma de partitionnement.<br />
Installez le [[Arch boot process (Français)#Chargeur_de_démarrage|chargeur de démarrage]] comme vous le feriez pour un périphérique de stockage de données avec un [[Master Boot Record]]. Voir [[Syslinux#Manual_install|Syslinux installation manuelle]] ou [[GRUB (Français)/Tips and tricks (Français)#Installer sur une partition ou un disque sans partition]].<br />
<br />
=== Conversion Ext3/4 en Btrfs ===<br />
<br />
{{Warning (Français)|Il y a de nombreux rapports sur la liste de diffusion btrfs concernant les conversions incomplètes/corrompues/brisées. Assurez-vous d'avoir des sauvegardes efficaces de toutes les données que vous ne pouvez pas vous permettre de perdre. Voir [https://btrfs.wiki.kernel.org/index.php/Conversion_from_Ext3 Conversion d'Ext3] sur le wiki btrfs pour plus d'informations.}}<br />
<br />
Démarrez à partir d'un CD d'installation, puis convertissez en faisant:<br />
# btrfs-convert /dev/partition<br />
<br />
Montez la partition et testez la conversion en vérifiant les fichiers. Assurez-vous de changer le {{ic|/etc/fstab}} pour refléter le changement ('''type btrfs''' et '''fs_passno''' [le dernier champ] à 0 car Btrfs ne vérifie pas le système de fichiers au démarrage). <br />
<br />
Notez également que l'UUID de la partition aura changé, donc mettez à jour fstab en conséquence lors de l'utilisation des UUIDs. {{ic|chroot}} (chrooter) dans le système et reconstruire la liste de menus GRUB (voir [[Install Arch Linux from existing Linux (Français)|Installation par chroot]] et [[GRUB (Français)]]).<br />
<br />
Si vous convertissez un système de fichiers racine, tout en restant chrooté, exécutez {{ic|mkinitcpio -p linux}} pour régénérer les initramfs ou le système ne démarrera pas correctement. <br />
<br />
Si vous êtes coincé dans grub avec {{ic|'unknown filesystem'}} essayez de réinstaller grub avec {{ic|grub-install /dev/partition}} et régénérez la configuration ainsi que {{ic|grub-mkconfig -o /boot/grub/grub. cfg}}.<br />
Après avoir confirmé qu'il n' y a pas de problèmes, terminez la conversion en supprimant le sous-volume de sauvegarde {{ic|ext2_saved}}. Notez que vous ne pouvez pas revenir à ext3/4 sans lui.<br />
# btrfs subvolume delete /ext2_saved<br />
<br />
Enfin [[#Balance]] (équilibrer) le système de fichiers pour récupérer l'espace.<br />
<br />
N'oubliez pas que certaines applications qui ont été installées auparavant doivent être adaptées à Btrfs. Notamment [[TLP#Btrfs]]{{Broken section link}} nécessite une attention particulière pour éviter la corruption du système de fichiers, mais d'autres applications peuvent également bénéficier de certaines fonctionnalités.<br />
<br />
=== Checksum accélération matérielle ===<br />
<br />
Pour vérifier si le checksum de Btrfs est matériellement accéléré:<br />
{{hc|<nowiki>$ dmesg | grep crc32c</nowiki>|<nowiki>Btrfs loaded, crc32c=crc32c-intel</nowiki>}}<br />
<br />
Si vous voyez {{ic|1=crc32c=crc32c-generic}}, c'est probablement parce que votre partition racine doit être Btrfs, et vous devrez compiler {{ic|crc32c-intel}} dans le noyau pour qu'il fonctionne. Mettre {{ic|crc32c-intel}} dans [[Mkinitcpio (Français)|mkinitcpio.conf]] ne ''fonctionne'' pas.<br />
<br />
=== Récupération de la corruption ===<br />
<br />
{{ic|btrfs-check}} ne peut pas être utilisé sur un système de fichiers monté. Pour pouvoir utiliser {{ic|btrfs-check}} sans démarrer à partir d'un live USB, ajoutez-le au ramdisk initial:<br />
<br />
{{hc|/etc/mkinitcpio.conf|2=<br />
BINARIES="/usr/bin/btrfs"}}<br />
<br />
Régénérer le disque initial à l'aide de [[Mkinitcpio (Français)|mkinitcpio]].<br />
Ensuite, s'il y a un problème de démarrage, l'utilitaire est disponible pour réparation.<br />
<br />
{{Note|Si le processus fsck doit invalider le cache de l'espace (et/ou d'autres caches?) alors il est normal qu'un démarrage ultérieur raccroche pendant un certain temps (il peut donner des messages de console sur btrfs-transaction étant suspendue). Le système devrait se rétablir après un certain temps.}}<br />
<br />
Voir la page [https://btrfs.wiki.kernel.org/index.php/Btrfsck Btrfs wiki] pour plus d'informations.<br />
<br />
=== Démarrage en snapshots ===<br />
<br />
Pour démarrer dans un snapshot, vous devez spécifier le sous-volume via un [[Kernel parameters|paramètre du noyau]] en utilisant {{ic|1=rootflags=subvol=/path/to/subvolume}} et modifier votre {{ic|/etc/fstab}} pour pointer vers le même sous-volume en utilisant {{ic|1=subvol=}}.<br />
<br />
Alternativement, le sous-volume peut être spécifié avec son id récupérable avec par ex: {{ic|btrfs /root/path}} et {{ic|1=rootflags=subvolid=objectid}} comme paramètre du noyau respectivement {{ic|1=subvolid=objectid}} comme option de montage dans {{ic|/etc/fstab}}.<br />
<br />
Si vous utilisez GRUB, vous pouvez automatiquement remplir votre menu de démarrage avec des snapshots btrfs lors de la régénération du fichier de configuration à l'aide de {{Pkg|grub-btrfs}} ou {{AUR|grub-btrfs-git}}.<br />
<br />
=== Utiliser les sous-volumes Btrfs avec systemd-nspawn ===<br />
<br />
Voir [[Systemd-nspawn#Use Btrfs subvolume as container root]] et [[Systemd-nspawn#Use temporary Btrfs snapshot of container]].<br />
<br />
== Résolution des problèmes ==<br />
<br />
Voir la [https://btrfs.wiki.kernel.org/index.php/Problem_FAQ FAQ sur les problèmes de Btrfs] pour le dépannage général.<br />
<br />
=== GRUB ===<br />
<br />
==== Décalage de la partition ====<br />
<br />
Le problème de décalage peut se produire lorsque vous essayez d'intégrer {{ic|core.img}} dans un disque partitionné. Cela signifie qu'il est correct d'intégrer grub's {{ic|core.img}} dans un pool Btrfs sur un disque sans partition (par ex: {{ic|/dev/sdX}}) directement.<br />
<br />
[[GRUB (Français)|GRUB]] peut démarrer des partitions Btrfs, mais le module peut être plus grand que d'autres systèmes de fichiers. Et le fichier {{ic|core.img}} créé par {{ic|grub-install}} peut ne pas correspondre aux 63 premiers secteurs (31.5KiB) du disque entre le MBR et la première partition. Les outils de partitionnement à jour tels que {{ic|fdisk}} et {{ic|gdisk}} évitent ce problème en compensant la première partition par environ 1MiB ou 2MiB.<br />
<br />
==== Racine manquante ====<br />
<br />
Utilisateurs connaissant la situation suivante: {{ic|error no such device: root}} lors du démarrage à partir d'une configuration de style RAID, éditez {{ic|/usr/share/grub/grub-mkconfig_lib}} puis éditez {{ic|/usr/share/grub/grub-mkconfig_lib}} et supprimez les deux guillemets de la ligne: {{ic|1=echo " search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}"}}.<br />
<br />
Régénérer la configuration pour grub et le système devrait démarrer sans erreur.<br />
<br />
==== BTRFS: open_ctree a échoué ====<br />
<br />
Depuis novembre 2014, il semble y avoir un bug dans systemd ou mkinitcpio causant l'erreur suivante sur les systèmes avec le système de fichiers Btrfs multi-périphériques utilisant le {{ic|hook}} btrfs dans {{ic|mkinitcpio.conf}}:<br />
<br />
BTRFS: open_ctree failed<br />
mount: wrong fs type, bad option, bad superblock on /dev/sdb2, missing codepage or helicper program, or other error<br />
In some cases useful info is found in syslog - try dmesg|tail or so.<br />
You are now being dropped into an emergency shell.<br />
<br />
Une solution de contournement consiste à supprimer {{ic|btrfs}} du tableau {{ic|HOOKS}} dans {{ic|/etc/mkinitcpio.conf}} et à ajouter des {{ic|btrfs}} dans le tableau {{ic|MODULES}}. <br />
Régénérez ensuite les initramfs avec {{ic|mkinitcpio -p linux}} (régler le Preset si nécessaire) et redémarrez.<br />
<br />
Vous obtiendrez la même erreur si vous essayez de monter un raid array sans l'un des périphériques.<br />
Dans ce cas, vous devez ajouter l'option de montage {{ic|degraded}} dans {{ic|/etc/fstab}}. Si votre racine réside sur le tableau, vous devez également ajouter {{ic|1=rootflags=degraded}} aux [[Kernel parameters|paramètres de votre noyau]].<br />
<br />
Depuis d'août 2016, une solution de contournement potentielle pour ce bug est de monter le tableau par un seul lecteur uniquement dans {{ic|/etc/fstab}}, et de permettre à {{ic|btrfs}} de découvrir et ajouter les autres lecteurs automatiquement.<br />
Les identificateurs de groupe tels que UUID et LABEL semblent contribuer à l'échec.<br />
<br />
Par exemple, un tableau RAID1 composé de 'disk1' et 'disk2' aura un UUID qui lui sera alloué, mais au lieu d'utiliser l'UUID, utiliser uniquement {{ic|/dev/mapper/disk1}} dans {{ic|/etc/fstab}}.<br />
Pour une explication plus détaillée, voir le [https://blog.samcater.com/fix-for-btrfs-open_ctree-failed-when-running-root-fs-on-raid-1-or-raid10-arch-linux/ billet]{{Dead link|2021|11|07|status=404}} suivant.<br />
<br />
Une autre solution possible est de supprimer le hook {{ic|udev}} dans [[Mkinitcpio (Français)|mkinitcpio.conf]] et de le remplacer par le hook {{ic|systemd}}.<br />
Dans ce cas, les btrfs ne doivent pas être dans les tableaux HOOKS ou MODULES.<br />
<br />
Voir [https://bbs.archlinux.org/viewtopic.php?id=189845 le fil de discussion] du forum d'origine et {{Bug|42884}} pour plus d'informations.<br />
<br />
=== btrfs check ===<br />
<br />
{{Attention|Puisque Btrfs est en cours de développement, en particulier la commande {{ic|btrfs check}}, il est fortement recommandé de '''créer une sauvegarde''' et de consulter la documentation Btrfs suivante avant d'exécuter {{ic|btrfs check}} avec le commutateur {{ic|--repair}}.}}<br />
<br />
La commande de contrôle [https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-check btrfs check] peut être utilisée pour vérifier ou réparer un système de fichiers Btrfs non monté. Cependant, cet outil de réparation est encore immature et ne peut pas réparer certaines erreurs du système de fichiers même celles qui ne rendent pas le système de fichiers non montable.<br />
<br />
Voir [https://btrfs.wiki.kernel.org/index.php/Btrfsck Btrfsck] pour plus d'information.<br />
<br />
== Voir aussi ==<br />
<br />
* '''Site officiel'''<br />
** [https://btrfs.wiki.kernel.org/index.php/Main_Page Btrfs wiki]<br />
* '''Rapport de performance'''<br />
** [https://superuser.com/questions/432188/should-i-put-my-multi-device-btrfs-filesystem-on-disk-partitions-or-raw-devices Btrfs sur disques bruts?]<br />
** [https://btrfs.wiki.kernel.org/index.php/FAQ#Is_Btrfs_optimized_for_SSD.3F Btrfs est-il optimisé pour les SSD?]<br />
** '''Comparaison des options de montage Phoronix'''<br />
** [https://www.phoronix.com/scan.php?page=article&item=btrfs-mount-linux49 Linux 4.9]<br />
** [https://www.phoronix.com/scan.php?page=article&item=linux_314_btrfs Linux 3.14]<br />
** [https://www.phoronix.com/scan.php?page=article&item=linux_btrfs_311&num=1 Linux 3.11]<br />
** [https://www.phoronix.com/scan.php?page=news_item&px=MTM0OTU Linux 3.9]<br />
** [https://www.phoronix.com/scan.php?page=article&item=btrfs_linux37_mounts&num=1 Linux 3.7]<br />
** [https://www.phoronix.com/scan.php?page=article&item=linux_btrfs_options&num=1 Linux 3.2]<br />
* [https://blog.erdemagaoglu.com/post/4605524309/lzo-vs-snappy-vs-lzf-vs-zlib-a-comparison-of Lzo vs. zLib]<br />
* '''Divers'''<br />
** [https://www.funtoo.org/BTRFS_Fun Funtoo Wiki Btrfs Fun]<br />
** [https://www.phoronix.com/scan.php?page=news_item&px=MTA0ODU Avi Miller presenting Btrfs] at SCALE 10x, January 2012.<br />
** [https://www.phoronix.com/scan.php?page=news_item&px=MTA4Mzc Summary of Chris Mason's talk] from LFCS 2012<br />
** [https://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=35054394c4b3cecd52577c2662c84da1f3e73525 Btrfs: stop providing a bmap operation to avoid swapfile corruptions] 2009-01-21<br />
** [https://marc.merlins.org/perso/btrfs/post_2014-03-22_Btrfs-Tips_-Doing-Fast-Incremental-Backups-With-Btrfs-Send-and-Receive.html Doing Fast Incremental Backups With Btrfs Send and Receive]</div>Cirelli94https://wiki.archlinux.org/index.php?title=Btrfs_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=701444Btrfs (简体中文)2021-11-10T08:43:01Z<p>Cirelli94: /* 交换文件 */ Fix Btfrs in Btrfs correct name</p>
<hr />
<div>[[Category:File systems (简体中文)]]<br />
[[de:Arch auf BtrFS]]<br />
[[en:Btrfs]]<br />
[[es:Btrfs]]<br />
[[fr:Btrfs]]<br />
[[it:Btrfs]]<br />
[[ja:Btrfs]]<br />
[[pt:Btrfs]]<br />
{{Related articles start (简体中文)}}<br />
{{Related|File systems}}<br />
{{Related|Btrfs - Tips and tricks}}<br />
{{Related|Mkinitcpio-btrfs}}<br />
{{Related|Snapper}}<br />
{{Related|Installing on Btrfs root}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Btrfs|2020-10-19|638704}}<br />
<br />
引自 [https://btrfs.wiki.kernel.org/index.php/Main_Page Btrfs Wiki]:<br />
<br />
:Btrfs 是一种新型的写时复制 (CoW) Linux 文件系统,已经并入内核主线。Btrfs 在设计实现高级功能的同时,着重于容错、修复以及易于管理。它由 Oracle, Red Hat, Fujitsu, Intel, SUSE, STRATO 等企业和开发者共同开发,Btrfs 以 GNU GPL 协议授权,同时也欢迎任何人的贡献。<br />
<br />
{{警告|<br />
* Btrfs 有一些功能被认为是实验性的特性,可参见内核百科的 [https://btrfs.wiki.kernel.org/index.php/Main_Page#Stability_status Btrfs 稳定性状态报告],[https://btrfs.wiki.kernel.org/index.php/FAQ#Is_btrfs_stable.3F Btrfs 足够稳定了吗?] 和 [https://btrfs.wiki.kernel.org/index.php/Getting_started 开始使用 Btrfs]。<br />
* 了解当前的 [[#已知问题]].}}<br />
<br />
== 准备工作 ==<br />
<br />
要使用一些用户空间工具的话,需要 [[install|安装]] 基础操作必须的 {{Pkg|btrfs-progs}} 软件包。<br />
<br />
如果需要从 Btrfs 文件系统引导(比如说内核和内存盘在一个 Btrfs 的分区上),请检查 [[Arch boot process (简体中文)|启动引导器]] 是否支持 Btrfs。<br />
<br />
== 创建文件系统 ==<br />
<br />
下文展示了如何创建一个新的 Btrfs [[File systems (简体中文)|文件系统]]。要将一个 ext3/4 分区转换为 Btrfs,请参考 [[#从 Ext3/4 转换]]。要使用无分区的配置,请参考 [[#无分区 Btrfs 磁盘]]。<br />
<br />
查阅 {{man|8|mkfs.btrfs}} 以获取更多信息。<br />
<br />
=== 单一设备上的文件系统 ===<br />
<br />
要在分区 {{ic|/dev/''partition''}} 上创建一个 Btrfs 文件系统,执行:<br />
<br />
# mkfs.btrfs -L ''mylabel'' /dev/''partition''<br />
<br />
Btrfs 用于元数据的默认节点大小 (nodesize) 为 16KB,而用于数据的默认扇区大小 (sectorsize) 等于页面大小 (page size) 并会自动检测。 要对元数据使用较大的节点大小 (必须为扇区大小的倍数,最大允许 64KB),请通过 {{ic|-n}} 开关为 {{ic|nodesize}} 指定一个值。如下例所示,使用 32KB 块大小:<br />
<br />
# mkfs.btrfs -L ''mylabel'' -n 32k /dev/''partition''<br />
<br />
{{注意|根据 {{man|8|mkfs.btrfs|OPTIONS}} 手册页内容:“较小的节点大小会增加碎片,但也会让 B-trees 更高,进而使得锁定争用(locking contention)更少。较高的节点大小则能有更好的打包(packing)和更少的碎片,但代价是,更新元数据块时会使用更多的内存”。}}<br />
<br />
=== 多设备文件系统 ===<br />
<br />
{{警告|Btrfs 的 RAID 5 和 RAID 6 模式存在致命缺陷,除非用来做数据丢失测试,否则不应当用于任何场景。这里有[https://lore.kernel.org/linux-btrfs/20200627032414.GX10769@hungrycats.org/ 已知问题和部分解决方法的列表]。 查阅 [https://btrfs.wiki.kernel.org/index.php/RAID56 Btrfs Wiki 网页上关于 RAID 5 和 RAID 6 的说明] 以获取最新动态(似乎不更新了)。}}<br />
<br />
多个设备可以用来创建一组 RAID。支持的 RAID 级别有 RAID 0、RAID 1、RAID 10、RAID 5 和 RAID 6。从 5.5 版本内核开始,新增对 {{ic|RAID1c3}} 和 {{ic|RAID1c4}} 的支持,分别是 3 份冗余和 4 份冗余的 RAID 1。可以使用 {{ic|-d}} 和 {{ic|-m}} 参数分别为数据和元数据配置 RAID 等级。默认情况下,数据有一份副本({{ic|single}}),元数据则被镜像({{ic|RAID1}})。这就像创建一个 [[W:JBOD|JBOD 配置]],多个磁盘会被看做成一个文件系统,但文件不会重复。更多有关如何创建一个 Btrfs RAID 卷的信息请参阅 [https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices Btrfs Wiki:在多个设备上使用 Btrfs]。<br />
<br />
# mkfs.btrfs -d single -m raid1 /dev/''part1'' /dev/''part2'' ...<br />
<br />
必须在 {{ic|/etc/mkinitcpio.conf}} 中加入 {{ic|udev}} 钩子或 {{ic|btrfs}} 钩子才能在一个池中使用多个 Btrfs 设备。查阅 [[Mkinitcpio (简体中文)#常用钩子]] 以获取更多信息。<br />
<br />
{{注意|<br />
* 可以稍后再将设备添加到多设备文件系统中。详情请参见 [https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices Btrfs wiki 文章]。<br />
* 多个设备可以大小各异。但是,如果在 RAID 配置中一个硬盘的大小比其他的都大,那么它多出的空间将不会被使用。<br />
* 有些 [[boot loader|引导加载程序]] 不支持多设备文件系统,比如 [[Syslinux]]。<br />
* Btrfs 不会自动从速度最快的设备读取,因此混合使用不同类型的磁盘会导致性能表现不恒定。详情请参阅 [https://stackoverflow.com/a/55408367 Stack Overflow 上的这个回答]。<br />
}}<br />
<br />
[[#RAID]] 小节中有关于维护多设备上的 Btrfs 文件系统的一些建议。<br />
<br />
== 配置文件系统 ==<br />
<br />
=== 写时复制 (CoW) ===<br />
<br />
默认情况下 Btrfs 对所有文件使用 [[Wikipedia:copy-on-write|写时复制 (CoW)]]。参阅 [https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Copy_on_Write_.28CoW.29 Btrfs 系统管理指南相关章节] 以获取实现细节以及它的优点和缺点。<br />
<br />
==== 停用 CoW ====<br />
<br />
要对某个子卷上的新文件停用写时复制,使用 {{ic|nodatacow}} 挂载选项。这只会影响新创建的文件,写时复制仍然会在已存在的文件上生效。{{ic|nodatacow}} 参数同样会禁用压缩。参阅 {{man|5|btrfs}} 以了解细节。<br />
<br />
{{注意|引自 {{man|5|btrfs|MOUNT OPTIONS}}:“在单个文件系统中,无法使用 {{ic|nodatacow}} 参数挂载某些子卷,而其他的使用 {{ic|datacow}} 参数。第一个被挂载子卷的挂载参数将会应用于其他所有子卷。”}}<br />
<br />
要单文件或目录禁用写时复制特性,请使用下面的命令:<br />
<br />
$ chattr +C ''[文件/目录的地址(path)]''<br />
<br />
这会为这个文件的单个引用停用写时复制,如果这个文件不只有一个引用(例如通过 {{ic|1=cp --reflink=always}} 生成或者在文件系统快照中),写时复制依然生效。<br />
<br />
{{注意|引自 chattr 的手册页:“在 Btrfs 上,'C' 标志应该被设置在新建的或者是空白的文件/目录,如果被设置在已有数据的文件,当块分配给该文件时,文件将不确定是否完全稳定。如果 'C' 标志被设置给一个目录,将不会影响目前的目录,但在该目录创建的新文件将具有 No_COW 属性。”}}<br />
<br />
{{提示|可以用下面的方法为已存在的文件或目录停用写时复制:<br />
<br />
$ mv ''/path/to/dir'' ''/path/to/dir''_old<br />
$ mkdir ''/path/to/dir''<br />
$ chattr +C ''/path/to/dir''<br />
$ cp -a ''/path/to/dir''_old/* ''/path/to/dir''<br />
$ rm -rf ''/path/to/dir''_old<br />
<br />
需要保证这个过程中目标文件不会被使用,同时注意下面描述的 {{ic|mv}} 或 {{ic|cp --reflink}} 并不起作用。<br />
}}<br />
<br />
==== 创建轻量副本 ====<br />
<br />
默认情况下,使用 {{ic|cp}} 复制 Btrfs 文件系统上的文件时,会创建实际副本。要创建引用原始数据的轻量级副本,请使用 ''reflink'' 选项:<br />
<br />
$ cp --reflink ''source'' ''dest'' <br />
<br />
参阅 {{ic|cp}} 的手册页获得关于 {{ic|--reflink}} 标志的更多信息。<br />
<br />
=== 压缩 ===<br />
<br />
Btrfs 支持 [https://btrfs.wiki.kernel.org/index.php/Compression 透明和自动压缩]。这就减小了文件的大小,通过减少文件写入增幅来显著延长闪存介质(flash-baesd media)的寿命 [https://fedoraproject.org/wiki/Changes/BtrfsByDefault#Compression][https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/NTV77NFF6NDZM3QTPUM2TQZ5PCM6GOO2/][https://pagure.io/fedora-btrfs/project/issue/36#comment-701551]。在某些特定的场景下(比如单线程、重负荷的文件 I/O))还 [https://www.phoronix.com/scan.php?page=article&item=btrfs_compress_2635&num=1 提高了性能]。尽管在其他的场景下(比如多线程和/或大文件 I/O 高强度 CPU 任务)还是明显影响了性能。通常使用更快的压缩算法,比如 ''zstd'' 和 ''lzo'' 可以获得更好的性能,这个 [https://www.phoronix.com/scan.php?page=article&item=btrfs-zstd-compress 性能测试] 提供了详细的对比。<br />
<br />
承上文,{{ic|1=compress=''alg''}} 挂载选项可自动考虑为每个文件启用压缩,其中的 {{ic|''alg''}} 处可以选填为 {{ic|zlib}}, {{ic|lzo}}, {{ic|zstd}}, 或者 {{ic|no}}(即不压缩)。由此,Btrfs 将检查压缩数据的第一部分是否能将其缩减。如果能,则会压缩该文件的整个写入;否则不会压缩任何内容。所以,如果数据的第一部分没有被缩减,那么即使数据的其余部分可以大大缩减,写入时也不会被压缩。[https://btrfs.wiki.kernel.org/index.php/Compression#What_happens_to_incompressible_files.3F] 这样做是为了防止让磁盘一直等待写入,直到所有要写入的数据传递给 Btrfs 并被压缩后为止。<br />
<br />
另外可以改用 {{ic|1=compress-force=''alg''}} 挂载选项,这会让 Btrfs 跳过对数据第一部分的压缩检查,并尝试对每个文件启用自动压缩。最不济的情况,这会 (稍微) 导致 CPU 占用率无故升高。不过,在多个混合使用系统的经验测试显示,与仅使用 {{ic|1=compress=''zstd''}} (其也有 10% 的磁盘压缩率) 相比,使用 {{ic|1=compress-force=''zstd''}} 可以显著提高约 10% 的磁盘压缩率。<br />
<br />
只有在加入挂载选项后创建或修改的文件才会被压缩。<br />
<br />
给现存文件启用压缩,可使用 {{ic|btrfs filesystem defragment -c''alg''}} 命令,{{ic|''alg''}} 处可选填为 {{ic|zlib}},{{ic|lzo}} 或 {{ic|zstd}}。举例来说,要用 {{Pkg|zstd}} 方式给整个文件系统重新压缩,执行下列命令:<br />
<br />
# btrfs filesystem defragment -r -v -czstd /<br />
<br />
要在新的 Btrfs 分区上安装 Arch Linux 时就启用压缩功能 (充分利用压缩特性),请在 [[mounting|挂载]] 文件系统时使用 {{ic|compress}} 选项:{{ic|1=mount -o compress=zstd /dev/sd''xY'' /mnt/}}。在配置过程中,请在 [[fstab]] 中把 {{ic|1=compress=zstd}} 添加到根目录文件系统的挂载选项里。<br />
<br />
{{提示|通过执行 {{ic|chattr +c}},也可以在不使用 {{ic|compress}} 选项的情况下为每个单文件启用压缩属性。对目录执行会使这个目录下新文件自动被压缩。}}<br />
<br />
{{警告|<br />
* 如果使用 {{ic|zstd}} 参数,使用较旧版本内核或者尚不支持 {{ic|zstd}} 的 {{Pkg|btrfs-progs}} 的系统可能不能读取或修复您的文件系统。<br />
* [[GRUB]] 在 2.04 版本中引入了对 ''zstd'' 的支持。使用此后版本时,请通过手动运行 {{ic | grub-install}}(需添加适用于机器 BIOS/UEFI 设置的选项参数)确保安装在 MBR/ESP 中的引导加载程序已确实升级,因为这些事情不会自动完成。可参阅 {{Bug|63235}}。<br />
}}<br />
<br />
==== 查看压缩类型和压缩比 ====<br />
<br />
{{pkg|compsize}} 软件包能获取一个文件列表 (或一整个 Btrfs 文件系统),并测量出它们使用的压缩类型和其有效压缩比。不过,其给出的未压缩时大小数值不一定能和其他程序 (比如 {{ic|du}}) 给出的数值吻合,因为每一文件所占空间范围都会计数一次,即使文件被链接了多次,即使文件的一部分不再被使用 (但其未被垃圾回收)。 {{ic|-x}} 选项可让程序运行保持在单一个文件系统上,这在 {{ic|compsize -x /}} (检查根目录) 之类的情况下很有用,可以避免程序去尝试访问非 Btrfs 子目录从而导致整个程序运行失败。<br />
<br />
=== 子卷 ===<br />
<br />
"btrfs 子卷不是 (也不能看作) 块设备,一个子卷可以看作 POSIX 文件名字空间.这个名字空间可以通过子卷上层访问,也可以独立挂载."[https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Subvolumes]<br />
<br />
每个 btrfs 文件系统都有一个 ID 为 5 的顶层子卷。它可以挂载为 {{ic|/}}(默认情况下),或者可以挂载为另一个子卷。子卷可以在文件系统中移动,它们通过其 ID 而不是路径来标识。<br />
<br />
参阅下面的链接获得更多信息:<br />
* [https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Subvolumes Btrfs Wiki SysadminGuide#Subvolumes]<br />
* [https://btrfs.wiki.kernel.org/index.php/Getting_started#Basic_Filesystem_Commands Btrfs Wiki Getting started#Basic Filesystem Commands]<br />
* [https://btrfs.wiki.kernel.org/index.php/Trees Btrfs Wiki Trees]<br />
<br />
==== 创建子卷 ====<br />
<br />
要创建一个子卷:<br />
<br />
# btrfs subvolume create ''/path/to/subvolume''<br />
<br />
==== 列出子卷列表 ====<br />
<br />
要列出当前路径 ({{ic|''path''}}) 下的子卷和它们的 ID:<br />
<br />
# btrfs subvolume list -p ''path''<br />
<br />
==== 删除子卷 ====<br />
<br />
要删除一个子卷:<br />
<br />
# btrfs subvolume delete ''/path/to/subvolume''<br />
<br />
自 Linux 4.18 起, 用户可以像移除常规目录一样删除一个子卷 (用 {{ic|<nowiki>rm -r</nowiki>}}, {{ic|<nowiki>rmdir</nowiki>}} 命令)。<br />
<br />
==== 挂载子卷 ====<br />
<br />
可以使用 {{ic|1=subvol=''/path/to/subvolume''}} 或 {{ic|1=subvolid=''objectid''}} 挂载标志来安装子卷,就像文件系统分区一样。例如,您可以拥有一个名为 {{ic|subvol_root}} 的子卷,并将其挂载为 {{ic|/}}。通过在文件系统的顶层创建各种子卷,然后将它们挂载到适当的挂载点,可以模仿传统的文件系统分区。 因此,可以使用 [[#快照]] 轻松地将文件系统(或其一部分)恢复到先前的状态。<br />
<br />
{{提示|1= 不使用顶层子卷 (ID=5) 挂载为根目录,可以更方便地修改子卷的布局结构。相反,可考虑创建新的子卷,然后挂载为 {{ic|/}}。}}<br />
<br />
{{注意|引自 {{man|5|btrfs|MOUNT OPTIONS}}:“大多数挂载选项适用于'''整个文件系统''',并且只有要挂载的第一个子卷的选项才会生效。 这是因为没有实现,未来可能会发生变化。”可参阅 [https://btrfs.wiki.kernel.org/index.php/FAQ#Can_I_mount_subvolumes_with_different_mount_options.3F Btrfs Wiki FAQ] 以了解哪些挂载参数能够被用于独立的子卷。}}<br />
<br />
参阅 [[Snapper#Suggested filesystem layout]], [https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Managing_Snapshots Btrfs SysadminGuide#Managing Snapshots] 和 [https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Layout Btrfs SysadminGuide#Layout] 获得子卷应用的示例。<br />
<br />
有关 Btrfs 特定的挂载选项的完整列表,请参阅 {{man|5|btrfs}}。<br />
<br />
==== 挂载子卷为根挂载点 ====<br />
<br />
要使用一个子卷作为根挂载点,请使用 {{ic|1=rootflags=subvol=''/path/to/subvolume''}} —— 一个 [[Kernel parameters#Configuration|内核参数]] 指定子卷。在 {{ic|/etc/fstab}} 中编辑根挂载点并指定挂载选项 {{ic|1=subvol=}}。或者可以在 {{ic|/etc/fstab}} 中用 ID 指定子卷:用 {{ic|1=rootflags=subvolid=''objectid''}} 作为内核参数并用 {{ic|1=subvolid=''objectid''}} 作为挂载选项。<br />
<br />
==== 改变默认子卷 ====<br />
<br />
如果挂载时不指定 {{ic|1=subvol=}} 选项便会挂载默认子卷。要改变默认子卷,执行:<br />
<br />
# btrfs subvolume set-default ''subvolume-id'' /<br />
<br />
''subvolume-id'' 可以通过[[#列出子卷列表]]获得。<br />
<br />
{{注意|1=在安装了 [[GRUB]] 的系统上,在改变默认子卷以后不要忘记运行 {{ic|grub-install}}。参见 [https://bbs.archlinux.org/viewtopic.php?pid=1615373 这个论坛帖子]。}}<br />
<br />
通过 {{ic|btrfs subvolume set-default}} 修改默认子卷将会导致文件系统的最顶层无法访问,除非使用 {{ic|1=subvol=/}} 或者 {{ic|1=subvolid=5}} 挂载参数。[https://btrfs.wiki.kernel.org/index.php/SysadminGuide]<br />
<br />
=== 配额 ===<br />
<br />
{{警告|Qgroup 尚且不稳定且在有(过多)快照的子卷上应用配额可能会导致性能问题,比如在删除快照的时候。 此外,这里还有更多 [https://btrfs.wiki.kernel.org/index.php/Quota_support#Known_issues 已知问题].}}<br />
<br />
Btrfs中的配额支持是通过使用配额组或 qgroup 在子卷级别实现的:默认情况下,每个子卷都以 ''0/subvolume_id'' 的形式分配配额组。 但是,如果需要的话,可以使用任意数字创建配额组。<br />
<br />
要使用 Qgroup,你首先需要启用它:<br />
<br />
# btrfs quota enable ''path''<br />
<br />
从此时开始,新创建的子卷将由这些配额组控制。<br />
为了能够为已创建的子卷启用配额,首先正常启用配额,然后使用它们的 ''subvolume_id'' 为每个子卷创建一个配额组,再重新扫描它们:<br />
<br />
# btrfs subvolume list ''path'' | cut -d' ' -f2 | xargs -I{} -n1 btrfs qgroup create 0/{} ''path''<br />
# btrfs quota rescan ''path''<br />
<br />
Btrfs 中的配额组形成树层次结构,其中 Qgroup 附加到子卷。大小限制由每个 Qgroup 独立配置且在并在包含给定子卷的树中达到任何限制时应用。<br />
<br />
配额组的限制可以应用于总数据使用,非共享数据使用,压缩数据使用或全部。文件复制和文件删除可能都会影响限制,因为如果删除原始卷的文件并且只剩下一个副本,则另一个 Qgroup 的非共享限制可能会更改。例如,新快照几乎与原始子卷共享所有块,对子卷的新写入将向专用限制提升,一个卷中的公共数据的删除将升高到另一个卷中的专用限制。<br />
<br />
要对 Qgroup 应用限制,请使用命令 {{ic|btrfs qgroup limit}}。根据你的使用情况,使用总限制,非共享限制({{ic | -e}})或压缩限制({{ic | -c}})。<br />
<br />
显示文件系统使用中给定路径的使用情况和限制:<br />
<br />
# btrfs qgroup show -reF ''path''<br />
<br />
=== 提交间隔 ===<br />
<br />
将数据写入文件系统的频率由 Btrfs 本身和系统的设置决定。Btrfs 默认设置为 30 秒检查点间隔,新数据将在 30 秒内被提交到文件系统。 这可以通过在 {{ic|/etc/fstab}} 增加 {{ic|commit}} 挂载参数来修改:<br />
<br />
LABEL=arch64 / btrfs defaults,noatime,compress=lzo,commit=120 0 0<br />
<br />
系统范围的设置也会影响提交间隔。它们包括 {{ic|/proc/sys/vm/*}} 下的文件,这超出了本维基文章的范围,因此不再赘述。 它们的内核文档位于 {{ic|Documentation/sysctl/vm.txt}}。<br />
<br />
=== SSD TRIM ===<br />
<br />
Btrfs 文件系统能够从支持 TRIM 命令的 SSD 驱动器中释放未使用的块。内核从 5.6 版本开始提供了异步丢弃(asynchronous discard)支持,可使用挂载参数 {{ic|1=discard=async}} 启用。已释放的空间范围不会被马上丢弃,它们会被集中起来并在稍后由一个单独的工作线程进行 TRIM,这将能改善提交延迟。<br />
<br />
有关启用和使用 TRIM 的更多信息,请参阅 [[Solid State Drives#TRIM]]。<br />
<br />
== 使用 ==<br />
<br />
=== 交换文件 ===<br />
<br />
自 Linux 内核版本 5.0 起 Btrfs 提供 [[Swap_(简体中文)#交换文件|交换文件]] 支持 [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ed46ff3d423780fa5173b38a844bf0fdb210a2a7]。 [[Swap_(简体中文)#建立交换文件|Swap#建立交换文件]] 一节中已交代正确初始化交换文件的方法。 [[Power_management_(简体中文)/Suspend_and_hibernate_(简体中文)#休眠到_Btrfs_上的交换文件中|Power_management/Suspend_and_hibernate#休眠到 Btrfs 上的交换文件中]] 一节中则已交代了休眠到交换文件的配置方法。<br />
<br />
{{注意|对于内核版本 5.0+, Btrfs 有原生但带些许限制的交换文件支持:<br />
* 交换文件不可以放在快照子卷上。正确的过程是创建一个新子卷来存放交换文件。<br />
* Btrfs 不支持跨多设备文件系统上的交换文件。参见 [https://btrfs.wiki.kernel.org/index.php/FAQ#Does_btrfs_support_swap_files.3F Btrfs wiki: Btrfs 支持交换文件吗?(英文)] 和 [https://bbs.archlinux.org/viewtopic.php?pid&#61;1849371#p1849371 Arch 论坛上的讨论 (英文)]。<br />
}}<br />
<br />
{{警告|Linux 内核 5.0 之前的版本不支持交换文件。在 5.0 之前的内核版本上搭配 Btrfs 使用交换文件可导致文件系统损坏。}}<br />
<br />
=== 显示已使用的/空闲空间 ===<br />
<br />
像 {{ic|df}} 这样的用户空间工具可能不会准确的计算剩余空间 (因为并没有分别计算文件和元数据的使用情况) 。推荐使用 {{ic|btrfs filesystem usage}} 来查看使用情况。比如说:<br />
<br />
# btrfs filesystem usage /<br />
<br />
{{注意|{{ic|btrfs filesystem usage}} 在 {{ic|RAID5/RAID6}} 设备上可能无法正常工作。}}<br />
<br />
请参阅 [https://btrfs.wiki.kernel.org/index.php/FAQ#How_much_free_space_do_I_have.3F] 以获取更多信息。<br />
<br />
=== 碎片整理 ===<br />
<br />
Btrfs 支持通过配置挂载参数 {{ic|autodefrag}} 来实现在线的碎片整理,参见 {{man|5|btrfs|MOUNT OPTIONS}} 。要手动整理你的根目录的话,可以使用:<br />
<br />
# btrfs filesystem defragment -r /<br />
<br />
使用不带 {{ic|-r}} 开关的上述命令将导致仅整理该目录的子卷所拥有的元数据。这允许通过简单地指定路径进行单个文件碎片整理。<br />
<br />
对具有 CoW 副本(快照副本或使用{{ic|cp --reflink}}或 bcp 创建的文件)进行碎片整理以及使用带压缩算法的 {{ic|-c}} 开关进行碎片整理可能会导致生成两个不相关的文件从而增加磁盘使用量。<br />
<br />
=== RAID ===<br />
<br />
Btrfs 提供对 RAID 一类的 [[#多设备文件系统]]的原生支持.参阅 [https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices the Btrfs wiki page] 获得更多信息. [https://btrfs.wiki.kernel.org/index.php/SysadminGuide#RAID_and_data_replication Btrfs 管理员手册] 提供了技术背景信息.<br />
<br />
{{警告|奇偶校验 RAID(RAID 5/6)代码中存在多个严重的数据丢失错误。 检查 Btrfs Wiki 的 [https://btrfs.wiki.kernel.org/index.php/RAID56 RAID5/6 页面 (英文)] 和 BUG 汇报 ([https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg55161.html linux-btrfs 邮件列表 (英文)]) 以获取更多信息。2020 年 6 月, 有人提出了一个 [https://lore.kernel.org/linux-btrfs/20200627030614.GW10769@hungrycats.org/ 通俗易懂的现存问题列表 (英文)] 和一个 [https://lore.kernel.org/linux-btrfs/20200627032414.GX10769@hungrycats.org/ 有用的恢复指南 (英文)]。}}<br />
<br />
=== 检修 (Scrub) ===<br />
<br />
[https://btrfs.wiki.kernel.org/index.php/Glossary Btrfs Wiki 术语表]中写到,Scrub 是一种 "在线文件系统检查工具"。它能读取文件系统中的文件和元数据,并使用校验值和 RAID 存储上的镜像区分并修复损坏的数据。<br />
<br />
{{警告|运行 scrub 会阻止系统待机, 详见 [https://lore.kernel.org/linux-btrfs/20140227190656.GA28338@merlins.org/ 这个讨论]。}}<br />
<br />
==== 手动启动 ====<br />
<br />
启动一个(后台运行的)包含 {{ic|/}} 目录的文件系统在线检查任务:<br />
<br />
# btrfs scrub start /<br />
<br />
检查该任务的运行状态:<br />
<br />
# btrfs scrub status /<br />
<br />
==== 通过服务或者定时器启动 ====<br />
<br />
{{Pkg|btrfs-progs}} 软件包带有 {{ic|btrfs-scrub@.timer}} 系统单元,用来每月运行 scrub 命令。通过添加挂载点的参数来[[Enable|启用]]它,例如{{ic|btrfs-scrub@-.timer}} ({{ic|/}}) 或者 {{ic|btrfs-scrub@home.timer}} ({{ic|/home}}).<br />
<br />
也可以通过[[starting|启动]] {{ic|btrfs-scrub@.service}} 来手动运行 scrub (使用同样的挂载点参数),相较 (以 root 用户身份运行) {{ic|btrfs scrub}},这么做的优点是会记录在 [[systemd journal|Systemd 日志]]中。<br />
<br />
=== 数据平衡 (Balance) ===<br />
<br />
“Balance 将会通过分配器再次传递文件系统中的所有数据。它主要用于在添加或删除设备时跨设备重新平衡文件系统中的数据。如果设备出现故障,余额将为冗余 RAID 级别重新生成缺失的副本。”[https://btrfs.wiki.kernel.org/index.php/Glossary]。参阅 [https://btrfs.wiki.kernel.org/index.php/FAQ#What_does_.22balance.22_do.3F 上游的 FAQ].<br />
<br />
在单设备文件系统上,余额对于(临时)减少分配但未使用(元)数据块的数量也是有用的。有时候这对于解决 [https://btrfs.wiki.kernel.org/index.php/FAQ#Help.21_Btrfs_claims_I.27m_out_of_space.2C_but_it_looks_like_I_should_have_lots_left.21 "filesystem full" 故障] 来说也是必须的。<br />
<br />
# btrfs balance start /<br />
# btrfs balance status /<br />
<br />
=== 快照 ===<br />
<br />
"快照是和特定子卷共享文件和元数据的特殊子卷, 利用了 btrfs 的写时复制特性." 详见 [https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Snapshots Btrfs Wiki SysadminGuide#Snapshots].<br />
<br />
要创建一个快照:<br />
<br />
# btrfs subvolume snapshot ''source'' [''dest''/]''name''<br />
<br />
{{ic|''source''}}为要创建快照的对象,{{ic|[''dest''/]''name''}}为快照安放路径。<br />
<br />
加入 {{ic|-r}} 参数可以创建一个只读快照. 为只读快照创建一个快照可以获得一个只读快照的可写入版本.<br />
<br />
{{注意|快照不是递归包含的,这意味着子卷内的子卷在快照里是空目录。}}<br />
<br />
=== 发送和接收 ===<br />
<br />
可以通过 {{ic|send}} 命令发送一个快照,通常会与 btrfs 中的 {{ic|receive}} 组成管道.例如将快照 {{ic|/root_backup}} (也许是{{ic|/}}的备份) 发送到 {{ic|/backup}}:<br />
<br />
# btrfs send /root_backup | btrfs receive /backup<br />
<br />
''只能''发送只读快照,上面的命令在将子卷复制到外部设备 (例如备份驱动器) 时会很有用.<br />
<br />
也可以只发送两个快照间发生变化的部分,例如如果你已经发送了快照 {{ic|root_backup}} ,然后又建立了一个新的只读快照 {{ic|root_backup_new}} ,可以这样完成增量发送:<br />
<br />
# btrfs send -p /root_backup /root_backup_new | btrfs receive /backup<br />
<br />
现在你 {{ic|/backup}} 的快照会是 {{ic|root_backup_new}}.<br />
<br />
参阅 [https://btrfs.wiki.kernel.org/index.php/Incremental_Backup Btrfs Wiki 上关于增量备份的页面 (英文)] 获得更多信息 (例如使用工具自动化这一过程)。<br />
<br />
=== 去重 ===<br />
<br />
使用写时复制,Btrfs 能够复制文件或整个子卷而无需实际复制数据。但是,无论何时更改文件,都会创建一个新的“真正的”副本。重复数据删除更进一步,通过主动识别共享公共序列的数据块并将它们组合到具有相同写时复制语义的范围内。<br />
<br />
专用于 Btrfs 分区去重的工具包括 {{Pkg|duperemove}},{{aur|bedup}} 和 ''btrfs-dedup''。人们可能还希望仅使用基于文件的级别对数据进行重复数据删除,比如 {{pkg|rmlint}}、{{aur|jdupes}} 或者 {{aur|dduper-git}}。有关这些程序的可用功能的概述和其他信息,请参阅 [https://btrfs.wiki.kernel.org/index.php/Deduplication#Batch 上游 Wiki 条目 (英文)]。<br />
<br />
此外,Btrfs开发人员正致力于带内(也称为同步或内联)重复数据删除,这意味着在将新数据写入文件系统时完成重复数据删除。目前,它仍然是一个在 out-of-tree 开发的实验。愿意测试新功能的用户可以阅读[https://btrfs.wiki.kernel.org/index.php/User_notes_on_dedupe 相关的内核 Wiki 页 (英文)]。<br />
<br />
== 已知问题 ==<br />
<br />
一些在尝试之前应该知道的限制。<br />
<br />
=== 加密 ===<br />
<br />
Btrfs 目前还没有内建的加密支持,但未来[https://lwn.net/Articles/700487/ 可能]加入此功能。可以在运行{{ic|mkfs.btrfs}}前加密分区,参阅[[Dm-crypt with LUKS]]. <br />
<br />
(如果已经创建了文件系统,可以使用[[EncFS]]或[[TrueCrypt]],但是这样会无法使用 btrfs 的一些功能。)<br />
<br />
=== 检查 btrfs 文件系统问题 ===<br />
<br />
{{ic|btrfs check}} 工具目前有一些已知问题,在继续深入阅读了解之前,您不应该直接运行它, 参见 [[#检查 Btrfs 文件系统]] 小节。<br />
<br />
== 提示和技巧 ==<br />
<br />
=== 无分区 Btrfs 磁盘 ===<br />
<br />
{{警告|大多数用户不希望这种类型的设置,应该在常规分区上安装 Btrfs。 此外,GRUB 强烈建议不要安装到无分区磁盘。请考虑为 mkfs.btrfs 使用 {{ic|--alloc-start}} 参数以留出更大空间给 GRUB。}}<br />
<br />
Btrfs 能应用到整个设备上,替代 [[MBR]] 或 [[GPT]] 分区表,但是并不要求一定这么做,最简单的方法是 [[#创建文件系统|在一个已存在的分区上创建 Btrfs 文件系统]]。 如果选择用 Btrfs 替代分区表, 可以用 [[#子卷]] 模拟不同的分区。下列是在单个无分区设备上使用 Btrfs 文件系统的限制:<br />
<br />
* 不能在同一磁盘上的不同分区上放置其它的 [[file systems|文件系统]]。<br />
* 如果使用 5.0 之前版本的 Linux 内核,则不能使用 [[Swap_(简体中文)|交换区]],因为 Btrfs 在 5.0 前不支持 [[Swap_(简体中文)#交换文件|交换文件]],并且也无处创建 [[Swap_(简体中文)#交换分区|交换分区]]。<br />
* 不能使用 [[UEFI]] 启动。<br />
<br />
运行下面的命令把整个设备的分区表替换成 Btrfs:<br />
<br />
# mkfs.btrfs /dev/sd''X''<br />
<br />
如果设备上存在分区表,则需要使用:<br />
<br />
# mkfs.btrfs -f /dev/sd''X''<br />
<br />
例如 {{ic|/dev/sda}} 而不是 {{ic|/dev/sda1}}。后一种形式会格式化现有的分区而不是替换掉原有的分区表。由于根分区是 Btrfs 文件系统,请确保已将 {{ic|btrfs}} 编译进内核, 或者将 {{ic|btrfs}} 放入 [[mkinitcpio.conf#MODULES]] 中并且 [[Mkinitcpio_(简体中文)#创建和启用镜像|重新生成 initramfs]]。<br />
<br />
像使用普通的 MBR 分区表存储设备一样安装 [[boot loader|启动管理器]], 参考 [[Syslinux#Manual install]] 或 [[GRUB/Tips and tricks#Install to partition or partitionless disk]]。 如果你的内核因为 {{ic|Failed to mount /sysroot.}} 错误无法启动, 请在 {{ic|/etc/default/grub}} 里添加 {{ic|1=GRUB_PRELOAD_MODULES="btrfs"}} 并生成 GRUB 配置文件 ([[GRUB#Generate the main configuration file]])。<br />
<br />
=== 从 Ext3/4 转换 ===<br />
<br />
{{警告|到 2015 年中后期,Btrfs 的邮件列表中报告了多起转换失败的案例。尽管近期的更新可能有所修复,但还是建议谨慎使用。在开始之前请确定您有''可用的''备份并且愿意承担丢失数据的风险。<br />
详见 [https://btrfs.wiki.kernel.org/index.php/Conversion_from_Ext3 Btrfs Wiki:从 Ext3 文件系统转换 (英文)]。}}<br />
{{警告| 5.6.1 及之前版本的 btrfs-progs 有一个 Bug,它会导致生成的 Btrfs 文件系统的最后一块组 (last block group) 含有大小错误。得益于 [https://github.com/kdave/btrfs-progs/commit/0ff7a9b5210723bd4ad0d9d78dbbb18ee8fdd2b1#diff-31168275dcaac634489082b54c4c66d0 这个 commit],这个 Bug 已经在 5.7 版本中修复。请在 5.7-1 及以上版本的 btrfs-progs 上使用 {{ic|brtfs-convert}} 功能。}}<br />
<br />
从安装 CD 启动,然后转化分区:<br />
<br />
# btrfs-convert /dev/''partition''<br />
<br />
挂载转换后的分区并修改 {{ic|/etc/fstab}} 文件,指定分区类型 ('''type''' 为 btrfs,并且 '''fs_passno'''[最后一列] 要修改为0,因为 Btrfs 在启动时并不进行磁盘检查)。<br />
还要注意的是分区的 UUID 将有改变,所以使用 UUID (指定分区) 时,请更新 fstab 中相应的条目。 {{ic|chroot}} 到系统并重建 GRUB 条目(如果对此过程不熟悉,参考[[Install from existing Linux|从现有 Linux 系统安装]] 和 [[GRUB]] 中的相应内容)。 如果正在转换根目录,还需要在 chroot 环境中重建初始化内存盘 ({{ic|mkinitcpio -p linux}})。 如果 GRUB 不能启动 (例如有 'unknown filesystem' 错误),则需要重新安装 ({{ic|grub-install /dev/''partition''}}) 并重新生成配置文件 ({{ic|grub-mkconfig -o /boot/grub/grub.cfg}})。<br />
<br />
{{注意|如果转换过程中有任何异样,不管是无法挂载新转换的 Btrfs 文件系统或是无法往其中写入数据,只要备份子卷 {{ic|/ext2_saved}} 还在,就可以进行回滚。请使用 {{ic|btrfs-convert -r /dev/''partition''}} 命令进行回滚,这将会丢弃任何对新转换 Btrfs 文件系统的更改。}}<br />
<br />
确认没有问题后,通过删除 {{ic|ext2_saved}} 备份子卷完成转换的最后一步。请注意,如果没了它 (备份子卷),你将没办法还原回 ext3/4 文件系统。<br />
<br />
# btrfs subvolume delete /ext2_saved<br />
<br />
最后通过 [[#数据平衡 (Balance)|Balance]] 回收空间。<br />
<br />
=== 校验和 (Checksum) 硬件加速 ===<br />
<br />
CRC32 是英特尔 (Intel) SSE4.2 中的新指令。要验证 Btrfs 校验和是否有硬件加速:<br />
<br />
{{hc|# dmesg {{!}} grep crc32c|2=<br />
Btrfs loaded, crc32c=crc32c-intel<br />
}}<br />
<br />
如果你看到的是 {{ic|1=crc32c=crc32c-generic}},则很有可能是因为您根分区是 Btrfs,并且您须要之后将 {{ic|crc32c-intel}} 编译进内核中才能使其正常生效。单纯将 {{ic|crc32c-intel}} 放入 [[mkinitcpio.conf]] 是 ''不会'' 生效的。<br />
<br />
=== 损坏恢复 ===<br />
<br />
{{警告|{{ic|btrfs check}} 工具有一些已知问题,参见 [[#检查 Btrfs 文件系统]] 小节。}}<br />
<br />
''btrfs-check'' 不能在一个已挂载的文件系统上工作。为了能够在不从 Live USB 启动的情况下使用 ''btrfs-check'',需要将其添加到初始内存盘:<br />
<br />
{{hc|/etc/mkinitcpio.conf|output=<br />
BINARIES=("/usr/bin/btrfs")<br />
}}<br />
<br />
然后 [[Regenerate the initramfs|重新生成 initramfs]]。<br />
<br />
之后如果启动时出现问题,则可以使用该实用程序进行修复。<br />
<br />
{{注意|如果 fsck 进程必须使空间缓存 (和/或其他缓存?) 无效 (invalidate cache),那么随后的引导会挂起一段时间,这是正常的(进程可能会给出关于 btrfs-transaction 挂起的控制台消息)。系统应该在一段时间后从中恢复正常。}}<br />
<br />
查阅 [https://btrfs.wiki.kernel.org/index.php/Btrfsck Btrfs Wiki 的 Btrfsck 页] 以获取更多信息。<br />
<br />
=== 引导进入快照 ===<br />
<br />
要引导进入快照,因为快照可以像子卷那样被挂载,所以请像挂载子卷为根分区那样进行同样的流程 (已交代于[[#挂载子卷为根挂载点]]的一段中)。<br />
<br />
如果使用 GRUB,则可以在 {{Pkg|grub-btrfs}} 或 {{AUR|grub-btrfs-git}} 的帮助下,在重新生成配置文件时使用 Btrfs 快照自动填充启动菜单。<br />
<br />
=== 搭配 systemd-nspawn 使用 Btrfs 子卷 ===<br />
<br />
可查阅 [[Systemd-nspawn#Use Btrfs subvolume as container root]] 和 [[Systemd-nspawn#Use temporary Btrfs snapshot of container]] 等文章。<br />
<br />
== 疑难解答 ==<br />
<br />
请查阅 [https://btrfs.wiki.kernel.org/index.php/Problem_FAQ Btrfs FAQ 问题集 (英文)] 以获得排除一般问题的信息。<br />
<br />
=== GRUB ===<br />
<br />
==== 分区偏移 ====<br />
<br />
{{注意|1= 当您试图将 {{ic|core.img}} 嵌入到已分区磁盘上时,可能会发生偏移问题。这意味着 [[Special:Diff/319474|可以]] 将 GRUB 的 {{ic|corg.img}} 直接嵌入到无分区磁盘 (例如 {{ic|/dev/sd''X''}}) 上的 Btrfs 池中。}}<br />
<br />
GRUB 2 可以引导启动 Btrfs 分区,但是因为模块比其它文件系统大,grub-install 生成的 core.img 文件超过了 MBR 与第一个分区之间的空间大小 (63 扇区/31.5KiB)。更至最新后的 {{ic|fdisk}} 和 {{ic|gdisk}} 之类的磁盘工具会通过第一个分区前空出 1-2MiB 的空间来避免此问题。<br />
<br />
==== Missing root ====<br />
<br />
{{Accuracy|Suggests editing a non-configuration file manually.|Talk:Btrfs#Should not suggest to edit files in /usr/share}}<br />
<br />
Users experiencing the following: {{ic|1=error no such device: root}} when booting from a RAID style setup then edit /usr/share/grub/grub-mkconfig_lib and remove both quotes from the line {{ic|1=echo " search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}"}}. Regenerate the config for grub and the system should boot without an error.<br />
<br />
=== 出现 BTRFS: open_ctree failed 错误 ===<br />
<br />
截至 2014 年 11 月,一个似乎存在于 [[systemd]] 或 [[mkinitcpio]] 中的 Bug 被提出,其可能会导致在 {{ic|mkinitcpio.conf}} 中使用 {{ic|btrfs}} 钩子 (hook) 的用户在启动多设备文件系统的 Btrfs 卷时出以下错误:<br />
<br />
{{bc|<nowiki><br />
BTRFS: open_ctree failed<br />
mount: wrong fs type, bad option, bad superblock on /dev/sdb2, missing codepage or helper program, or other error<br />
<br />
In some cases useful info is found in syslog - try dmesg|tail or so.<br />
<br />
You are now being dropped into an emergency shell.<br />
</nowiki>}}<br />
<br />
一个临时解决方案是,从 {{ic|HOOKS}} 中移除 {{ic|btrfs}} 并把它放入 {{ic|MODULES}} 中,然后通过 {{ic|mkinitcpio -p linux}} 重新生成 initramfs 并重新启动。<br />
<br />
请查阅 [https://bbs.archlinux.org/viewtopic.php?id=189845 原论坛讨论] 和 {{Bug|42884}} 获得更多的讨论内容和信息。<br />
<br />
另外,如果在挂载 RAID 卷组缺少某个卷时,也有可能会发生这个错误。这种情况下,需要把 {{ic|degraded}} 加入到 {{ic|/etc/fstab}} 中;如果根目录在卷组上,需要同时加入[[kernel parameters|内核参数]] {{ic|1=rootflags=degraded}}。<br />
<br />
承上段,截至 2016 年 8 月,针对这个 Bug,一个可能的解决方案是在 {{ic|/etc/fstab}} 中仅靠单个硬盘来挂载阵列,然后让 Btrfs 自动发现并追加其它硬盘。UUID 和 LABEL 等基于组的标识符似乎是导致出现错误的原因。 具体举例来说,由'disk1' 和 'disk2' 组成的双设备 RAID1 阵列会被分配到一个 UUID。但是请在 {{ic|/etc/fstab}} 中仅使用 {{ic|/dev/mapper/disk1}} 来指定磁盘阵列,而不要使用 UUID。更多解释,参见这个[https://web.archive.org/web/20161108175034/http://blog.samcater.com/fix-for-btrfs-open_ctree-failed-when-running-root-fs-on-raid-1-or-raid10-arch-linux/ 博客文章]。<br />
<br />
=== 检查 Btrfs 文件系统 ===<br />
<br />
{{警告|Btrfs (特别是 {{ic|btrfs check}} 命令) 仍处在开发阶段,强烈建议在加上 {{ic|--repair}} 参数运行 {{ic|btrfs check}} 前先做一个''备份'',并提前阅读 [https://btrfs.wiki.kernel.org/index.php/Btrfsck Btrfsck 文档 (英文)].}}<br />
<br />
''[https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-check btrfs check]'' 可以检查并修复一个未挂载的 Btrfs 文件系统。但是由于它并未开发完成,它并不能修复某些错误 (即使这些错误没导致无法挂载)。<br />
<br />
== 另见 ==<br />
<br />
* '''官方网站'''<br />
** [https://btrfs.wiki.kernel.org/ Btrfs Wiki]<br />
** [https://btrfs.wiki.kernel.org/index.php/Glossary Btrfs Wiki Glossary]<br />
* '''官方 FAQs'''<br />
** [https://btrfs.wiki.kernel.org/index.php/FAQ Btrfs Wiki FAQ]<br />
** [https://btrfs.wiki.kernel.org/index.php/Problem_FAQ Btrfs Wiki Problem FAQ]<br />
* '''Btrfs pull request'''<br />
** [http://lkml.indiana.edu/hypermail/linux/kernel/1401.3/03045.html 3.14]<br />
** [http://lkml.indiana.edu/hypermail/linux/kernel/1311.1/03526.html 3.13]<br />
** [http://lkml.indiana.edu/hypermail/linux/kernel/1309.1/02981.html 3.12]<br />
** [http://lkml.indiana.edu/hypermail/linux/kernel/1305.1/01064.html 3.11]<br />
* '''性能相关'''<br />
** [https://superuser.com/questions/432188/should-i-put-my-multi-device-btrfs-filesystem-on-disk-partitions-or-raw-devices Btrfs on raw disks?]<br />
** [https://lore.kernel.org/linux-btrfs/CAKcLGm_MKEdTiHFBd-b-v2sN5gJmgFRqsykzWRXTVqUw4O6Acw@mail.gmail.com/ Varying leafsize and nodesize in Btrfs]<br />
** [https://lore.kernel.org/linux-btrfs/jgui4j$th5$1@dough.gmane.org/ Btrfs support for efficient SSD operation (data blocks alignment)]<br />
** [https://btrfs.wiki.kernel.org/index.php/FAQ#Is_Btrfs_optimized_for_SSD.3F Is Btrfs optimized for SSDs?]<br />
** '''Phoronix 的挂载选项测试'''<br />
*** [https://www.phoronix.com/scan.php?page=article&item=linux_314_btrfs Linux 3.14]<br />
*** [https://www.phoronix.com/scan.php?page=article&item=linux_btrfs_311&num=1 Linux 3.11]<br />
*** [https://www.phoronix.com/scan.php?page=news_item&px=MTM0OTU Linux 3.9]<br />
*** [https://www.phoronix.com/scan.php?page=article&item=btrfs_linux37_mounts&num=1 Linux 3.7]<br />
*** [https://www.phoronix.com/scan.php?page=article&item=linux_btrfs_options&num=1 Linux 3.2]<br />
** [https://blog.erdemagaoglu.com/post/4605524309/lzo-vs-snappy-vs-lzf-vs-zlib-a-comparison-of Lzo vs. zLib]<br />
* '''杂项'''<br />
** [https://www.funtoo.org/wiki/BTRFS_Fun Funtoo Wiki Btrfs Fun]<br />
** [https://www.phoronix.com/scan.php?page=news_item&px=MTA0ODU Avi Miller presenting Btrfs] at SCALE 10x, January 2012.<br />
** [https://www.phoronix.com/scan.php?page=news_item&px=MTA4Mzc Summary of Chris Mason's talk] from LFCS 2012<br />
** [https://git.kernel.org/?p&#61;linux/kernel/git/torvalds/linux-2.6.git;a&#61;commit;h&#61;35054394c4b3cecd52577c2662c84da1f3e73525 Btrfs: stop providing a bmap operation to avoid swapfile corruptions] 2009-01-21<br />
** [https://marc.merlins.org/perso/btrfs/post_2014-03-22_Btrfs-Tips_-Doing-Fast-Incremental-Backups-With-Btrfs-Send-and-Receive.html Doing Fast Incremental Backups With Btrfs Send and Receive]</div>Cirelli94https://wiki.archlinux.org/index.php?title=Improving_performance&diff=656201Improving performance2021-03-26T15:41:18Z<p>Cirelli94: /* Improving system responsiveness under low-memory conditions */ updated fedora references</p>
<hr />
<div>[[Category:Hardware]]<br />
[[Category:System administration]]<br />
[[ar:Improving performance]]<br />
[[es:Improving performance]]<br />
[[ja:パフォーマンスの最大化]]<br />
[[pt:Improving performance]]<br />
[[ru:Improving performance]]<br />
[[zh-hans:Improving performance]]<br />
{{Related articles start}}<br />
{{Related|/Boot process}}<br />
{{Related|Pacman/Tips and tricks#Performance}}<br />
{{Related|OpenSSH#Speeding up SSH}}<br />
{{Related|Openoffice#Speed up OpenOffice}}<br />
{{Related|Laptop}}<br />
{{Related|Preload}}<br />
{{Related articles end}}<br />
This article provides information on basic system diagnostics relating to performance as well as steps that may be taken to reduce resource consumption or to otherwise optimize the system with the end-goal being either perceived or documented improvements to a system's performance.<br />
<br />
== The basics ==<br />
<br />
=== Know your system ===<br />
<br />
The best way to tune a system is to target bottlenecks, or subsystems which limit overall speed. The system specifications can help identify them.<br />
<br />
* If the computer becomes slow when large applications (such as LibreOffice and Firefox) run at the same time, check if the amount of RAM is sufficient. Use the following command, and check the "available" column:<br />
<br />
$ free -h<br />
<br />
* If boot time is slow, and applications take a long time to load at first launch (only), then the hard drive is likely to blame. The speed of a hard drive can be measured with the {{ic|hdparm}} command:<br />
{{Note|{{Pkg|hdparm}} indicates only the pure read speed of a hard drive, and is not a valid benchmark. A value higher than 40MB/s (while idle) is however acceptable on an average system.}}<br />
<br />
# hdparm -t /dev/sdX<br />
<br />
* If CPU load is consistently high even with enough RAM available, then try to lower CPU usage by disabling running [[daemons]] and/or processes. This can be monitored in several ways, for example with {{Pkg|htop}}, {{ic|pstree}} or any other [[List_of_applications#System monitors|system monitoring]] tool:<br />
<br />
$ htop<br />
<br />
* If applications using direct rendering are slow (i.e those which use the GPU, such as video players, games, or even a [[window manager]]), then improving GPU performance should help. The first step is to verify if direct rendering is actually enabled. This is indicated by the {{ic|glxinfo}} command, part of the {{Pkg|mesa-demos}} package:<br />
<br />
{{hc|<nowiki>$ glxinfo | grep "direct rendering"</nowiki>|<br />
direct rendering: Yes<br />
}}<br />
<br />
* When running a [[desktop environment]], disabling (unused) visual desktop effects may reduce GPU usage. Use a more lightweight environment or create a [[Desktop_environment#Custom_environments|custom environment]] if the current does not meet the hardware and/or personal requirements.<br />
<br />
=== Benchmarking ===<br />
<br />
The effects of optimization are often difficult to judge. They can however be measured by [[benchmarking]] tools.<br />
<br />
== Storage devices ==<br />
<br />
=== Multiple hardware paths ===<br />
<br />
{{Style|Subjective writing}}<br />
<br />
An internal hardware path is how the storage device is connected to your motherboard. There are different ways to connect to the motherboard such as TCP/IP through a NIC, plugged in directly using PCIe/PCI, Firewire, Raid Card, USB, etc. By spreading your storage devices across these multiple connection points you maximize the capabilities of your motherboard, for example 6 hard-drives connected via USB would be much much slower than 3 over USB and 3 over Firewire. The reason is that each entry path into the motherboard is like a pipe, and there is a set limit to how much can go through that pipe at any one time. The good news is that the motherboard usually has several pipes.<br />
<br />
More Examples<br />
<br />
# Directly to the motherboard using PCI/PCIe/ATA<br />
# Using an external enclosure to house the disk over USB/Firewire<br />
# Turn the device into a network storage device by connecting over TCP/IP<br />
<br />
Note also that if you have a 2 USB ports on the front of your machine, and 4 USB ports on the back, and you have 4 disks, it would probably be fastest to put 2 on front/2 on back than 3 on back/1 on front. This is because internally the front ports are likely a separate Root Hub than the back, meaning you can send twice as much data by using both than just 1. Use the following commands to determine the various paths on your machine.<br />
<br />
{{hc|USB Device Tree|$ lsusb -t}}<br />
<br />
{{hc|PCI Device Tree|$ lspci -tv}}<br />
<br />
=== Partitioning ===<br />
<br />
Make sure that your partitions are [[Partitioning#Partition_alignment|properly aligned]].<br />
<br />
==== Multiple drives ====<br />
<br />
If you have multiple disks available, you can set them up as a software [[RAID]] for serious speed improvements.<br />
<br />
Creating [[swap]] on a separate disk can also help quite a bit, especially if your machine swaps frequently.<br />
<br />
==== Layout on HDDs ====<br />
<br />
If using a traditional spinning HDD, your partition layout can influence the system's performance. Sectors at the beginning of the drive (closer to the outside of the disk) are faster than those at the end. Also, a smaller partition requires less movements from the drive's head, and so speed up disk operations. Therefore, it is advised to create a small partition (10GB, more or less depending on your needs) only for your system, as near to the beginning of the drive as possible. Other data (pictures, videos) should be kept on a separate partition, and this is usually achieved by separating the home directory ({{ic|/home/''user''}}) from the system ({{ic|/}}).<br />
<br />
=== Choosing and tuning your filesystem ===<br />
<br />
Choosing the best filesystem for a specific system is very important because each has its own strengths. The [[File systems]] article provides a short summary of the most popular ones. You can also find relevant articles in [[:Category:File systems]].<br />
<br />
==== Mount options ====<br />
<br />
The [[fstab#atime options|noatime]] option is known to improve performance of the filesystem.<br />
<br />
Other mount options are filesystem specific, therefore see the relevant articles for the filesystems:<br />
<br />
* [[Ext3]]<br />
* [[Ext4#Improving performance]]<br />
* [[JFS Filesystem#Optimizations]]<br />
* [[XFS#Performance]]<br />
* [[Btrfs#Defragmentation]], [[Btrfs#Compression]], and {{man|5|btrfs}}<br />
* [[ZFS#Tuning]]<br />
<br />
===== Reiserfs =====<br />
<br />
The {{Ic|1=data=writeback}} mount option improves speed, but may corrupt data during power loss. The {{Ic|notail}} mount option increases the space used by the filesystem by about 5%, but also improves overall speed. You can also reduce disk load by putting the journal and data on separate drives. This is done when creating the filesystem: <br />
<br />
# mkreiserfs –j /dev/sd'''a1''' /dev/sd'''b1'''<br />
<br />
Replace {{ic|/dev/sd'''a1'''}} with the partition reserved for the journal, and {{ic|/dev/sd'''b1'''}} with the partition for data. You can learn more about reiserfs with this [http://www.funtoo.org/Funtoo_Filesystem_Guide,_Part_2 article].<br />
<br />
=== Tuning kernel parameters ===<br />
<br />
There are several key tunables affecting the performance of block devices, see [[sysctl#Virtual memory]] for more information.<br />
<br />
=== Input/output schedulers ===<br />
<br />
==== Background information ====<br />
<br />
The input/output ''(I/O)'' scheduler is the kernel component that decides in which order the block I/O operations are submitted to storage devices. It is useful to remind here some specifications of two main drive types because the goal of the I/O scheduler is to optimize the way these are able to deal with read requests:<br />
<br />
* An HDD has spinning disks and a head that moves physically to the required location. Therefore, random latency is quite high ranging between 3 and 12ms (whether it is a high end server drive or a laptop drive and bypassing the disk controller write buffer) while sequential access provides much higher throughput. The typical HDD throughput is about 200 I/O operations per second ''(IOPS)''.<br />
<br />
* An SSD does not have moving parts, random access is as fast as sequential one, typically under 0.1ms, and it can handle multiple concurrent requests. The typical SSD throughput is greater than 10,000 IOPS, which is more than needed in common workload situations.<br />
<br />
If there are many processes making I/O requests to different storage parts, thousands of IOPS can be generated while a typical HDD can handle only about 200 IOPS. There is a queue of requests that have to wait for access to the storage. This is where the I/O schedulers plays an optimization role.<br />
<br />
==== The scheduling algorithms ====<br />
<br />
One way to improve throughput is to linearize access: by ordering waiting requests by their logical address and grouping the closest ones. Historically this was the first Linux I/O scheduler called [[Wikipedia:Elevator algorithm|elevator]].<br />
<br />
One issue with the elevator algorithm is that it is not optimal for a process doing sequential access: reading a block of data, processing it for several microseconds then reading next block and so on. The elevator scheduler does not know that the process is about to read another block nearby and, thus, moves to another request by another process at some other location. The [[Wikipedia:Anticipatory scheduling|anticipatory]] I/O scheduler overcomes the problem: it pauses for a few milliseconds in anticipation of another close-by read operation before dealing with another request.<br />
<br />
While these schedulers try to improve total throughput, they might leave some unlucky requests waiting for a very long time. As an example, imagine the majority of processes make requests at the beginning of the storage space while an unlucky process makes a request at the other end of storage. This potentially infinite postponement of the process is called starvation. To improve fairness, the [[Wikipedia:Deadline scheduler|deadline]] algorithm was developed. It has a queue ordered by address, similar to the elevator, but if some request sits in this queue for too long then it moves to an "expired" queue ordered by expire time. The scheduler checks the expire queue first and processes requests from there and only then moves to the elevator queue. Note that this fairness has a negative impact on overall throughput.<br />
<br />
The [[Wikipedia:CFQ|Completely Fair Queuing (CFQ)]] approaches the problem differently by allocating a timeslice and a number of allowed requests by queue depending on the priority of the process submitting them. It supports [[cgroup]] that allows to reserve some amount of I/O to a specific collection of processes. It is in particular useful for shared and cloud hosting: users who paid for some IOPS want to get their share whenever needed. Also, it idles at the end of synchronous I/O waiting for other nearby operations, taking over this feature from the ''anticipatory'' scheduler and bringing some enhancements. Both the ''anticipatory'' and the ''elevator'' schedulers were decommissioned from the Linux kernel replaced by the more advanced alternatives presented below.<br />
<br />
The [https://algo.ing.unimo.it/people/paolo/disk_sched/ Budget Fair Queuing (BFQ)] is based on CFQ code and brings some enhancements. It does not grant the disk to each process for a fixed time-slice but assigns a "budget" measured in number of sectors to the process and uses heuristics. It is a relatively complex scheduler, it may be more adapted to rotational drives and slow SSDs because its high per-operation overhead, especially if associated with a slow CPU, can slow down fast devices. The objective of BFQ on personal systems is that for interactive tasks, the storage device is virtually as responsive as if it was idle. In its default configuration it focuses on delivering the lowest latency rather than achieving the maximum throughput.<br />
<br />
[https://lwn.net/Articles/720675/ Kyber] is a recent scheduler inspired by active queue management techniques used for network routing. The implementation is based on "tokens" that serve as a mechanism for limiting requests. A queuing token is required to allocate a request, this is used to prevent starvation of requests. A dispatch token is also needed and limits the operations of a certain priority on a given device. Finally, a target read latency is defined and the scheduler tunes itself to reach this latency goal. The implementation of the algorithm is relatively simple and it is deemed efficient for fast devices.<br />
<br />
==== Kernel's I/O schedulers ====<br />
<br />
While some of the early algorithms have now been decommissioned, the official Linux kernel supports a number of I/O schedulers which can be split into two categories:<br />
<br />
*The '''multi-queue schedulers''' are available by default with the kernel. The [https://www.thomas-krenn.com/en/wiki/Linux_Multi-Queue_Block_IO_Queueing_Mechanism_(blk-mq) Multi-Queue Block I/O Queuing Mechanism (blk-mq)] maps I/O queries to multiple queues, the tasks are distributed across threads and therefore CPU cores. Within this framework the following schedulers are available:<br />
**''None'', where no queuing algorithm is applied.<br />
**''mq-deadline'', the adaptation of the deadline scheduler (see below) to multi-threading.<br />
**''Kyber''<br />
**''BFQ''<br />
<br />
*The '''single-queue schedulers''' are legacy schedulers:<br />
**[[w:Noop scheduler|NOOP]] is the simplest scheduler, it inserts all incoming I/O requests into a simple FIFO queue and implements request merging. In this algorithm, there is no re-ordering of the request based on the sector number. Therefore it can be used if the ordering is dealt with at another layer, at the device level for example, or if it does not matter, for SSDs for instance.<br />
**[[w:Deadline scheduler|Deadline]]<br />
**[[w:CFQ|CFQ]]<br />
<br />
:{{Note|1=Single-queue schedulers [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f382fb0bcef4c37dc049e9f6963e3baf204d815c were removed from kernel since Linux 5.0].}}<br />
<br />
==== Changing I/O scheduler ====<br />
<br />
{{Note|The best choice of scheduler depends on both the device and the exact nature of the workload. Also, the throughput in MB/s is not the only measure of performance: deadline or fairness deteriorate the overall throughput but may improve system responsiveness. [[Benchmarking]] may be useful to indicate each I/O scheduler performance.}}<br />
<br />
To list the available schedulers for a device and the active scheduler (in brackets):<br />
<br />
{{hc|$ cat /sys/block/'''''sda'''''/queue/scheduler|<br />
mq-deadline kyber [bfq] none<br />
}}<br />
<br />
To list the available schedulers for all devices:<br />
<br />
{{hc|$ grep "" /sys/block/'''*'''/queue/scheduler|<br />
/sys/block/pktcdvd0/queue/scheduler:none<br />
/sys/block/sda/queue/scheduler:mq-deadline kyber [bfq] none<br />
/sys/block/sr0/queue/scheduler:[mq-deadline] kyber bfq none<br />
}}<br />
<br />
To change the active I/O scheduler to ''bfq'' for device ''sda'', use:<br />
<br />
# echo '''''bfq''''' > /sys/block/'''''sda'''''/queue/scheduler<br />
<br />
The process to change I/O scheduler, depending on whether the disk is rotating or not can be automated and persist across reboots. For example the [[udev]] rule below sets the scheduler to ''none'' for [[NVMe]], ''mq-deadline'' for [[SSD]]/eMMC, and ''bfq'' for rotational drives:<br />
<br />
{{hc|/etc/udev/rules.d/60-ioschedulers.rules|2=<br />
# set scheduler for NVMe<br />
ACTION=="add{{!}}change", KERNEL=="nvme[0-9]n[0-9]", ATTR{queue/scheduler}="none"<br />
# set scheduler for SSD and eMMC<br />
ACTION=="add{{!}}change", KERNEL=="sd[a-z]{{!}}mmcblk[0-9]*", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="mq-deadline"<br />
# set scheduler for rotating disks<br />
ACTION=="add{{!}}change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"<br />
}}<br />
<br />
Reboot or force [[udev#Loading new rules]].<br />
<br />
==== Tuning I/O scheduler ====<br />
<br />
Each of the kernel's I/O scheduler has its own tunables, such as the latency time, the expiry time or the FIFO parameters. They are helpful in adjusting the algorithm to a particular combination of device and workload. This is typically to achieve a higher throughput or a lower latency for a given utilization.<br />
The tunables and their description can be found within the [https://www.kernel.org/doc/html/latest/block/index.html kernel documentation].<br />
<br />
To list the available tunables for a device, in the example below ''sdb'' which is using ''deadline'', use:<br />
<br />
{{hc|$ ls /sys/block/'''''sdb'''''/queue/iosched|<br />
fifo_batch front_merges read_expire write_expire writes_starved}}<br />
<br />
To improve ''deadline'''s throughput at the cost of latency, one can increase {{ic|fifo_batch}} with the command:<br />
<br />
{{bc|# echo ''32'' > /sys/block/'''''sdb'''''/queue/iosched/'''fifo_batch'''}}<br />
<br />
=== Power management configuration ===<br />
<br />
When dealing with traditional rotational disks (HDD's) you may want to [[Hdparm#Power_management_configuration|lower or disable power saving features]] completely.<br />
<br />
=== Reduce disk reads/writes ===<br />
<br />
Avoiding unnecessary access to slow storage drives is good for performance and also increasing lifetime of the devices, although on modern hardware the difference in life expectancy is usually negligible.<br />
<br />
{{Note|A 32GB SSD with a mediocre 10x write amplification factor, a standard 10000 write/erase cycle, and '''10GB of data written per day''', would get an '''8 years life expectancy'''. It gets better with bigger SSDs and modern controllers with less write amplification. Also compare [http://techreport.com/review/25889/the-ssd-endurance-experiment-500tb-update] when considering whether any particular strategy to limit disk writes is actually needed.}}<br />
<br />
==== Show disk writes ====<br />
<br />
The {{Pkg|iotop}} package can sort by disk writes, and show how much and how frequently programs are writing to the disk. See {{man|8|iotop}} for details.<br />
<br />
==== Relocate files to tmpfs ====<br />
<br />
Relocate files, such as your browser profile, to a [[tmpfs]] file system, for improvements in application response as all the files are now stored in RAM:<br />
<br />
* Refer to [[Profile-sync-daemon]] for syncing browser profiles. Certain browsers might need special attention, see e.g. [[Firefox on RAM]].<br />
* Refer to [[Anything-sync-daemon]] for syncing any specified folder.<br />
* Refer to [[Makepkg#Improving compile times]] for improving compile times by building packages in tmpfs.<br />
<br />
==== File systems ====<br />
<br />
Refer to corresponding [[file system]] page in case there were performance improvements instructions, e.g. [[Ext4#Improving performance]] and [[XFS#Performance]].<br />
<br />
==== Swap space ====<br />
<br />
See [[Swap#Performance]].<br />
<br />
==== Writeback interval and buffer size ====<br />
<br />
See [[Sysctl#Virtual memory]] for details.<br />
<br />
=== Storage I/O scheduling with ionice ===<br />
<br />
Many tasks such as backups do not rely on a short storage I/O delay or high storage I/O bandwidth to fulfil their task, they can be classified as background tasks. On the other hand quick I/O is necessary for good UI responsiveness on the desktop. Therefore it is beneficial to reduce the amount of storage bandwidth available to background tasks, whilst other tasks are in need of storage I/O. This can be achieved by making use of the linux I/O scheduler CFQ, which allows setting different priorities for processes.<br />
<br />
The I/O priority of a background process can be reduced to the "Idle" level by starting it with<br />
<br />
# ionice -c 3 command<br />
<br />
See {{man|1|ionice}} and [https://www.cyberciti.biz/tips/linux-set-io-scheduling-class-priority.html] for more information.<br />
<br />
== CPU ==<br />
<br />
=== Overclocking ===<br />
<br />
[[Wikipedia:Overclocking|Overclocking]] improves the computational performance of the CPU by increasing its peak clock frequency. The ability to overclock depends on the combination of CPU model and motherboard model. It is most frequently done through the BIOS. Overclocking also has disadvantages and risks. It is neither recommended nor discouraged here.<br />
<br />
Many Intel chips will not correctly report their clock frequency to acpi_cpufreq and most other utilities. This will result in excessive messages in dmesg, which can be avoided by unloading and blacklisting the kernel module {{ic|acpi_cpufreq}}.<br />
To read their clock speed use ''i7z'' from the {{Pkg|i7z}} package. To check for correct operation of an overclocked CPU, it is recommended to do [[stress testing]].<br />
<br />
=== Frequency scaling ===<br />
<br />
See [[CPU frequency scaling]].<br />
<br />
=== Alternative CPU schedulers ===<br />
<br />
{{Expansion|MuQSS is not the only alternative scheduler.}}<br />
<br />
The default CPU scheduler in the mainline Linux kernel is [[Wikipedia:Completely_Fair_Scheduler|CFS]]. Alternative schedulers are available.<br />
<br />
{{Accuracy|The official {{Pkg|linux-zen}} package does not enable MuQSS ([https://bugs.archlinux.org/task/56312 Bug Report])}}<br />
<br />
One alternative scheduler focused on desktop interactivity and responsiveness is [http://ck.kolivas.org/patches/muqss/sched-MuQSS.txt MuQSS], developed by [http://kernel.kolivas.org/ Con Kolivas]. MuQSS is included in the {{Pkg|linux-zen}} kernel package. It is also available as a stand-alone patch or as part of the wider '''-ck''' patchset. See [[Linux-ck]] and [[Linux-pf]] for more information on the patchset.<br />
<br />
=== Real-time kernel ===<br />
<br />
Some applications such as running a TV tuner card at full HD resolution (1080p) may benefit from using a [[realtime kernel]].<br />
<br />
=== Adjusting priorities of processes ===<br />
<br />
See also {{man|1|nice}} and {{man|1|renice}}.<br />
<br />
==== Ananicy ====<br />
<br />
[https://github.com/Nefelim4ag/Ananicy Ananicy] is a daemon, available in the {{AUR|ananicy-git}} package, for auto adjusting the nice levels of executables. The nice level represents the priority of the executable when allocating CPU resources.<br />
<br />
==== cgroups ====<br />
<br />
See [[cgroups]].<br />
<br />
==== Cpulimit ====<br />
<br />
[https://github.com/opsengine/cpulimit Cpulimit] is a program to limit the CPU usage percentage of a specific process. After installing {{Pkg|cpulimit}}, you may limit the CPU usage of a processes' PID using a scale of 0 to 100 times the number of CPU cores that the computer has. For example, with eight CPU cores the precentage range will be 0 to 800. Usage:<br />
<br />
$ cpulimit -l 50 -p 5081<br />
<br />
=== irqbalance ===<br />
<br />
The purpose of {{Pkg|irqbalance}} is distribute hardware interrupts across processors on a multiprocessor system in order to increase performance. It can be [[systemd#Using units|controlled]] by the provided {{ic|irqbalance.service}}.<br />
<br />
=== Turn off CPU exploit mitigations ===<br />
<br />
{{Warning|1=Do not apply this setting without considering the vulnerabilities it opens up. See [https://phoronix.com/scan.php?page=news_item&px=Linux-Improve-CPU-Spec-Switches this] and [https://linuxreviews.org/HOWTO_make_Linux_run_blazing_fast_(again)_on_Intel_CPUs this] for more information.}}<br />
<br />
Turning off CPU exploit mitigations improves performance (sometimes up to 50%). Use below [[kernel parameter]] to disable them all:<br />
<br />
mitigations=off<br />
<br />
The explanations of all the switches it toggles are given at [https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html kernel.org]. You can use {{AUR|spectre-meltdown-checker}} for vulnerability check.<br />
<br />
== Graphics ==<br />
<br />
=== Xorg configuration ===<br />
<br />
Graphics performance may depend on the settings in {{man|5|xorg.conf}}; see the [[NVIDIA]], [[ATI]], [[AMDGPU]] and [[Intel]] articles. Improper settings may stop Xorg from working, so caution is advised.<br />
<br />
=== Mesa configuration ===<br />
<br />
The performance of the Mesa drivers can be configured via [https://dri.freedesktop.org/wiki/ConfigurationInfrastructure/ drirc]. GUI configuration tools are available:<br />
<br />
* {{App|adriconf (Advanced DRI Configurator)|GUI tool to configure Mesa drivers by setting options and writing them to the standard drirc file.|https://gitlab.freedesktop.org/mesa/adriconf/|{{Pkg|adriconf}}}}<br />
* {{App|DRIconf|Configuration applet for the Direct Rendering Infrastructure. It allows customizing performance and visual quality settings of OpenGL drivers on a per-driver, per-screen and/or per-application level.|https://dri.freedesktop.org/wiki/DriConf/|{{AUR|driconf}}}}<br />
<br />
=== Overclocking ===<br />
<br />
As with CPUs, overclocking can directly improve performance, but is generally recommended against. There are several packages in the [[AUR]], such as {{AUR|amdoverdrivectrl}} (old AMD/ATI cards), {{AUR|rocm-smi}} (recent AMD cards), {{AUR|nvclock}} (old NVIDIA - up to Geforce 9), and {{Pkg|nvidia-utils}} for recent NVIDIA cards.<br />
<br />
See [[AMDGPU#Overclocking]] or [[NVIDIA/Tips and tricks#Enabling overclocking]].<br />
<br />
=== Enabling PCI Resizable BAR ===<br />
<br />
The PCI specification allows larger [[wikipedia:PCI_configuration_space#Standardized_registers|Base Address Registers]] to be used for exposing PCI devices memory to the PCI Controller. This can result in a performance increase for video cards. Having access to the the full vRAM improves performance, but also enables optimizations in the graphics driver. The combination of resizable BAR, above 4G encoding and these driver optimizations are what AMD calls [https://www.amd.com/en/technologies/smart-access-memory AMD Smart Access Memory], currently available on AMD Series 500 chipset motherboards. This setting may not be available on all motherboards, and is known to sometimes cause boot problems on certain boards.<br />
<br />
If the BAR has a 256M size, the feature is not enabled or not supported:<br />
<br />
{{hc|1=$ dmesg {{!}} grep BAR=|2=<br />
[drm] Detected VRAM RAM=8176M, BAR=256M}}<br />
<br />
To enable it, enable the setting named "Above 4G Decode" or ">4GB MMIO" in your motherboard settings. Verify that the BAR is now larger:<br />
<br />
{{hc|1=$ dmesg {{!}} grep BAR=|2=<br />
[drm] Detected VRAM RAM=8176M, BAR=8192M}}<br />
<br />
== RAM, swap and OOM handling ==<br />
<br />
=== Clock frequency and timings ===<br />
<br />
RAM can run at different clock frequencies and timings, which can be configured in the BIOS. Memory performance depends on both values. Selecting the highest preset presented by the BIOS usually improves the performance over the default setting. Note that increasing the frequency to values not supported by both motherboard and RAM vendor is overclocking, and similar risks and disadvantages apply, see [[#Overclocking]].<br />
<br />
=== Root on RAM overlay ===<br />
<br />
If running off a slow writing medium (USB, spinning HDDs) and storage requirements are low, the root may be run on a RAM overlay ontop of read only root (on disk). This can vastly improve performance at the cost of a limited writable space to root. See {{AUR|liveroot}}.<br />
<br />
=== Zram or zswap ===<br />
<br />
The [https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html zram] kernel module (previously called '''compcache''') provides a compressed block device in RAM. If you use it as swap device, the RAM can hold much more information but uses more CPU. Still, it is much quicker than swapping to a hard drive. If a system often falls back to swap, this could improve responsiveness. Using zram is also a good way to reduce disk read/write cycles due to swap on SSDs.<br />
<br />
Similar benefits (at similar costs) can be achieved using [[zswap]] rather than zram. The two are generally similar in intent although not operation: zswap operates as a compressed RAM cache and neither requires (nor permits) extensive userspace configuration.<br />
<br />
Example: To set up one lz4 compressed zram device with 32GiB capacity and a higher-than-normal priority (only for the current session):<br />
<br />
# modprobe zram<br />
# echo lz4 > /sys/block/zram0/comp_algorithm<br />
# echo 32G > /sys/block/zram0/disksize<br />
# mkswap --label zram0 /dev/zram0<br />
# swapon --priority 100 /dev/zram0<br />
<br />
To disable it again, either reboot or run<br />
<br />
# swapoff /dev/zram0<br />
# rmmod zram<br />
<br />
A detailed explanation of all steps, options and potential problems is provided in the [https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html official documentation of the zram module].<br />
<br />
The {{Pkg|systemd-swap}} package provides a {{ic|systemd-swap.service}} unit to automatically initialize zram devices. Configuration is possible in {{ic|/etc/systemd/swap.conf}}.<br />
<br />
The package {{AUR|zramswap}} provides an automated script for setting up a swap with a higher priority and a default size of 20% of the RAM size of your system. To do this automatically on every boot, [[enable]] {{ic|zramswap.service}}.<br />
<br />
Alternatively, the {{AUR|zramd}} package allows to setup zram automatically using zstd compression by default, its configuration can be changed at {{ic|/etc/default/zramd}}. It can be started at boot by enabling the {{ic|zramd.service}} unit.<br />
<br />
==== Swap on zRAM using a udev rule ====<br />
<br />
The example below describes how to set up swap on zRAM automatically at boot with a single udev rule. No extra package should be needed to make this work.<br />
<br />
First, enable the module:<br />
<br />
{{hc|/etc/modules-load.d/zram.conf|<nowiki><br />
zram<br />
</nowiki>}}<br />
<br />
Configure the number of /dev/zram nodes you need.<br />
<br />
{{hc|/etc/modprobe.d/zram.conf|<nowiki><br />
options zram num_devices=2<br />
</nowiki>}}<br />
<br />
Create the udev rule as shown in the example.<br />
<br />
{{hc|/etc/udev/rules.d/99-zram.rules|<nowiki><br />
KERNEL=="zram0", ATTR{disksize}="512M" RUN="/usr/bin/mkswap /dev/zram0", TAG+="systemd"<br />
KERNEL=="zram1", ATTR{disksize}="512M" RUN="/usr/bin/mkswap /dev/zram1", TAG+="systemd"<br />
</nowiki>}}<br />
<br />
Add /dev/zram to your fstab.<br />
<br />
{{hc|/etc/fstab|<nowiki><br />
/dev/zram0 none swap defaults 0 0<br />
/dev/zram1 none swap defaults 0 0<br />
</nowiki>}}<br />
<br />
=== Using the graphic card's RAM ===<br />
<br />
In the unlikely case that you have very little RAM and a surplus of video RAM, you can use the latter as swap. See [[Swap on video RAM]].<br />
<br />
=== Improving system responsiveness under low-memory conditions ===<br />
<br />
On traditional GNU/Linux system, especially for graphical workstations, when allocated memory is overcommitted, the overall system's responsiveness may degrade to a nearly unusable state before either triggering the in-kernel OOM-killer or a sufficient amount of memory got free (which is unlikely to happen quickly when the system is unresponsive, as you can hardly close any memory-hungry applications which may continue to allocate more memory). The behaviour also depends on specific setups and conditions, returning to a normal responsive state may take from a few seconds to more than half an hour, which could be a pain to wait in serious scenario like during a conference presentation.<br />
<br />
While the behaviour of the kernel as well as the userspace things under low-memory conditions may improve in the future as discussed on kernel[https://lore.kernel.org/lkml/d9802b6a-949b-b327-c4a6-3dbca485ec20@gmx.com/T/] and fedora[https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/XUZLHJ5O32OX24LG44R7UZ2TMN6NY47N/] mailing list, users can use more feasible and effective options than hard-resetting the system or tuning the {{ic|vm.overcommit_*}} [[sysctl]] parameters:<br />
<br />
* Manually trigger the kernel OOM-killer with [https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html Magic SysRq key], namely {{ic|Alt+SysRq+f}}.<br />
* Use a userspace OOM daemon to tackle these automatically (or interactively).<br />
<br />
{{Warning|Triggering OOM killer to kill running applications may lose your unsaved works. It is up to you that either you are patient enough to wait in hope that applications will finally free the memory normally, or you want to bring back unresponsive system as soon as possible.}}<br />
<br />
Sometimes a user may prefer OOM daemon to SysRq because with kernel OOM-killer you cannot prioritize the process to (or not) terminate. To list some OOM daemons:<br />
<br />
* {{App|earlyoom|Simple userspace OOM-killer implementation written in C. Fedora has this in its default Workstation installation [https://pagure.io/fedora-workstation/issue/119].|https://github.com/rfjakob/earlyoom|{{Pkg|earlyoom}}}}<br />
* {{App|oomd|OOM-killer implementation based on [https://lwn.net/Articles/759781/ PSI], requires Linux kernel version 4.20+. Configuration is in JSON and is quite complex. Confirmed to work in Facebook's production environment.|https://github.com/facebookincubator/oomd|{{aur|oomd}}}}<br />
* {{App|nohang|Sophisticated OOM handler written in Python, with optional PSI support, more configurable than earlyoom.|https://github.com/hakavlad/nohang|{{aur|nohang-git}}}}<br />
* {{App|low-memory-monitor|GNOME developer's effort that aims to provides better communication to userspace applications to indicate the low memory state, besides that it could be configured to trigger the kernel OOM-killer. Based on PSI, requires Linux 5.2+.|https://gitlab.freedesktop.org/hadess/low-memory-monitor/|{{aur|low-memory-monitor-git}}}}<br />
<br />
== Network ==<br />
<br />
* Kernel networking: see [[Sysctl#Improving performance]]<br />
* NIC: see [[Network configuration#Set device MTU and queue length]]<br />
* DNS: consider using a caching DNS resolver, see [[Domain name resolution#DNS servers]]<br />
* Samba: see [[Samba#Improve throughput]]<br />
<br />
== Watchdogs ==<br />
<br />
According to [[Wikipedia:Watchdog timer]]:<br />
<br />
:A watchdog timer [...] is an electronic timer that is used to detect and recover from computer malfunctions. During normal operation, the computer regularly resets the watchdog timer [...]. If, [...], the computer fails to reset the watchdog, the timer will elapse and generate a timeout signal [...] used to initiate corrective [...] actions [...] typically include placing the computer system in a safe state and restoring normal system operation.<br />
<br />
Many users need this feature due to their system's mission-critical role (i.e. servers), or because of the lack of power reset (i.e. embedded devices). Thus, this feature is required for a good operation in some situations. On the other hand, normal users (i.e. desktop and laptop) do not need this feature and can disable it.<br />
<br />
To disable watchdog timers (both software and hardware), append {{ic|nowatchdog}} to your boot parameters.<br />
<br />
To check the new configuration do:<br />
<br />
# cat /proc/sys/kernel/watchdog<br />
<br />
or use:<br />
<br />
# wdctl<br />
<br />
After you disabled watchdogs, you can ''optionally'' avoid the loading of the module responsible of the hardware watchdog, too. Do it by [[blacklisting]] the related module, e.g. {{ic|iTCO_wdt}}.<br />
<br />
{{Note|1=Some users [https://bbs.archlinux.org/viewtopic.php?id=221239 reported] the {{ic|nowatchdog}} parameter does not work as expected but they have successfully disabled the watchdog (at least the hardware one) by blacklisting the above-mentioned module.}}<br />
<br />
Either action will speed up your boot and shutdown, because one less module is loaded. Additionally disabling watchdog timers increases performance and [[Power management#Disabling NMI watchdog|lowers power consumption]].<br />
<br />
See [https://bbs.archlinux.org/viewtopic.php?id=163768], [https://bbs.archlinux.org/viewtopic.php?id=165834], [http://0pointer.de/blog/projects/watchdog.html], and [https://www.kernel.org/doc/html/latest/watchdog/watchdog-parameters.html] for more information.<br />
<br />
== See also ==<br />
<br />
* [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Performance_Tuning_Guide/index.html Red Hat Performance Tuning Guide]<br />
* [https://www.thomas-krenn.com/en/wiki/Linux_Performance_Measurements_using_vmstat Linux Performance Measurements using vmstat]</div>Cirelli94https://wiki.archlinux.org/index.php?title=Bluetooth_keyboard&diff=635493Bluetooth keyboard2020-09-15T18:56:40Z<p>Cirelli94: Added explanation that legacy method are deprecated and added link to actual method.</p>
<hr />
<div>[[Category:Bluetooth]]<br />
[[Category:Keyboards]]<br />
[[ja:Bluetooth キーボード]]<br />
[[ru:Bluetooth keyboard]]<br />
This article describes how to set up a [[Bluetooth]] HID keyboard with Arch Linux, {{Pkg|bluez}} version 5.<br />
<br />
== Pairing process ==<br />
<br />
{{Merge|Bluetooth|Pairing process, and some troubleshooting related to it, are redundant with general device setup on Bluetooth page, and should be merged there. Keyboard-specific info would stay on this page.|Talk:Bluetooth#Merging general setup from Keyboard, Mouse, Headset pages}}<br />
<br />
Login to the affected computer by a wired keyboard or by ssh.<br />
<br />
First, make sure the local BT controller (e.g. a BT dongle the built in BT radio) is recognized:<br />
{{hc|# lsusb|<br />
Bus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)<br />
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter<br />
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. LAN9500 Ethernet 10/100 Adapter / SMSC9512/9514 Hub<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
}}<br />
<br />
The above output is from a Raspberry-Pi revision 'B' with archlinux-arm and a Keysonic BT Dongle.<br />
<br />
Three items worth remembering:<br />
* BT devices (keyboard) and controllers (dongle) need to be paired once.<br />
* The BT controller needs to be powered up after every boot.<br />
* The BT controller needs to be told to connect to the keyboard after every boot.<br />
<br />
''Pairing'' is a one time process, required only once. There are BT keyboards sold with a BT dongle which come already paired, but that's not certain. We will use the {{ic|bluetoothctl}} command from {{Pkg|bluez-utils}} to pair our dongle and the keyboard. <br />
<br />
''Power up'' can be done with {{ic|bluetoothctl}}, or automatically in {{ic|/etc/bluetooth/main.conf}}, see below.<br />
<br />
Same for ''connecting'', either {{ic|bluetoothctl}} or {{ic|hcitool}} can be used, the latter is more useful for scripting.<br />
<br />
We will use {{ic|bluetoothctl}} for the pairing process. Run the command to get at the {{ic|[bluetooth]#}} prompt.<br />
{{hc|# bluetoothctl|<br />
[bluetooth]#<br />
}}<br />
<br />
{{Note|If you are on a color console: the word "bluetooth" is in the default color as long as no devices are available, and blue as soon as required devices and/or controllers have been found.}}<br />
<br />
While in ''bluetoothctl'' power up the controller:<br />
{{hc|[bluetooth]# power on|<br />
Changing power on succeeded<br />
[CHG] Controller 06:05:04:03:02:01 Powered: yes<br />
}}<br />
<br />
Next, tell {{ic|bluetoothctl}} to look only for keyboards, and make that the default agent:<br />
{{hc|[bluetooth]# agent KeyboardOnly|<br />
Agent registered<br />
}}<br />
<br />
{{hc|[bluetooth]# default-agent|<br />
Default agent request successful<br />
}}<br />
<br />
Next, put your controller (the local dongle) in ''pairable'' mode:<br />
{{hc|[bluetooth]# pairable on|<br />
Changing pairable on succeeded<br />
}}<br />
<br />
Next, put your keyboard in an active mode, where it is ''discoverable'', i.e. pairable. Some keyboards have a special button for this on the underside, or require a special key combination to be pressed. See the documentation of your keyboard. Please note that this ''discoverability'' of a device is time limited, some devices are only visible 30 seconds, other for 2 minutes. Your mileage may vary.<br />
<br />
Next, let the controller scan the BT frequencies for a suitable device:<br />
{{hc|[bluetooth]# scan on|<br />
Discovery started<br />
[CHG] Controller 06:05:04:03:02:01 Discovering: yes<br />
}}<br />
<br />
After a few seconds the adress of the keyboard should be listed as found. This line will repeat over and over, but won't stop you from entering new commands.<br />
<br />
Next, actually do the pairing. The address used is the BT-MAC address of the keyboard:<br />
{{hc|[bluetooth]# pair 01:02:03:04:05:06|<br />
Pairing successful<br />
}}<br />
<br />
{{Note| Some keyboards, such as Microsoft Surface Ergonomic, will send a pass code (e.g. "[agent] Passkey: 501334") which has to be typed in on the bluetooth keyboard followed by the key Enter in order to pair successfully. Use "paired-devices" command to double check if the pairing succeeded.}}<br />
<br />
Next, make this a trusted device (this allows the device to establish the connection on itself). Again, the BT-MAC address is the address of the keyboard device:<br />
{{hc|[bluetooth]# trust 01:02:03:04:05:06|<br />
Trusted <br />
}}<br />
<br />
Next and finally connect to the device (keyboard). Again, the BT-MAC address is the address of the keyboard device:<br />
{{hc|[bluetooth]# connect 01:02:03:04:05:06|<br />
Connection successful<br />
}}<br />
<br />
Done. Leave the {{ic|bluetoothctl}} utility:<br />
[bluetooth]# quit<br />
<br />
Now the external device (i.e. keyboard) and the USB BT dongle are paired permanently, unless you break the pairing intentionally. This does not mean that the keyboard will connect automatically to your BT device after a boot. This is mainly due to the fact that the bluetooth controller will be automatically turned off after each reboot. To automatically connect the keyboard after a reboot, see [[Bluetooth#Auto power-on after boot]].<br />
<br />
== Legacy method for auto-connect ==<br />
'''This methods are deprecated nowadays''', you should follow the instructions from [[Bluetooth#Auto_power-on_after_boot]] for an updated method.<br />
<br />
Before Bluez added the feature to automatically power on the bluetooth controller after a reboot, linked above, it was necessary to run two commands manually or automatically via a systemd service or a udev rule to ''Power up'' the controller and ''connect'' device and controller. In the following, those legacy methods are demonstrated if the new method yields any problems.<br />
<br />
=== Manually enabling a Bluetooth Keyboard ===<br />
<br />
Although the device and the controller are now paired (see above), you need to connect them every time the computer starts. <br />
<br />
First the BT controller (i.e. BT Dongle) needs to be powered up. This is done with the {{ic|hciconfig}} utility. We assume that you have only one BT device connected, and this one has the symbolic name {{ic|hci0}}. <br />
# hciconfig hci0 up<br />
<br />
Next, make the connection, now using the {{ic|hcitool}} utility. Make sure that the keyboard is powered up and connectable, i.e. not in a power saving sleep state.<br />
# hcitool cc 01:02:03:04:05:06<br />
<br />
Your BT keyboard should be useable now, even if an error message ("Can't create connection: Input/output error") is shown. Next we will discuss how to automate this process with [[systemd]].<br />
<br />
=== Automatically enabling a Bluetooth Keyboard ===<br />
<br />
Remember that you have to pair and trust your device in bluetoothctl to cause autoconnect. Then you can power up your adapter automatically in several ways:<br />
<br />
'''Custom systemd service file:'''<br />
<br />
Create a config file {{ic|/etc/btkbd.conf}}<br />
<br />
{{bc|<nowiki><br />
# Config file for btkbd.service<br />
# change when required (e.g. keyboard hardware changes, more hci devices are connected)<br />
BTKBDMAC = ''mac_address_of_your_device''<br />
HCIDEVICE = ''hci_device_identifier''<br />
</nowiki>}}<br />
<br />
{{ic|''mac_address_of_your_device''}} can be found with the {{ic|scan on}} command of the ''bluetoothctl'' utility.<br />
<br />
{{ic|''hci_device_identifier''}} can be found with:<br />
<br />
{{hc|# hcitool dev|Devices:<br />
hci0 06:05:04:03:02:01<br />
}}<br />
<br />
We are looking for the identifier {{ic|hci0}} in this case. The MAC address shown here is the address of the controller, not the address of the keyboard itself.<br />
<br />
Next, create a new service file at {{ic|/etc/systemd/system/btkbd.service}}. <br />
<br />
{{bc|<nowiki><br />
[Unit]<br />
Description=systemd Unit to automatically start a Bluetooth keyboard<br />
Documentation=https://wiki.archlinux.org/index.php/Bluetooth_Keyboard<br />
ConditionPathExists=/etc/btkbd.conf<br />
ConditionPathExists=/usr/local/bin/hcitool<br />
ConditionPathExists=/usr/local/sbin/hciconfig<br />
<br />
[Service]<br />
Type=oneshot<br />
EnvironmentFile=/etc/btkbd.conf<br />
ExecStart=<br />
ExecStart=/usr/local/sbin/hciconfig ${HCIDEVICE} up<br />
# ignore errors on connect, spurious problems with bt? so start next command with -<br />
ExecStart=-/usr/local/bin/hcitool cc ${BTKBDMAC}<br />
<br />
[Install]<br />
WantedBy=bluetooth.target<br />
</nowiki>}}<br />
<br />
And then enable this service with systemd's tools.<br />
<br />
Or '''udev rule:'''<br />
<br />
Create new file {{ic|/etc/udev/rules.d/10-local.rules}}<br />
<br />
{{bc|<nowiki><br />
# Set bluetooth power up<br />
ACTION=="add", KERNEL=="hci0", RUN+="/usr/bin/hciconfig hci0 up"<br />
</nowiki>}}<br />
<br />
== Troubleshooting ==<br />
{{Expansion|TBD}}<br />
What if the BT controller does not show up in {{ic|lsusb}} ?<br />
* Load generic bluetooth driver:<br />
# modprobe btusb<br />
* Is it an USB adapter or integral to the system? Use {{ic|lspci}} for integral adapters<br />
<br />
What if the BT controller is not visible in {{ic|bluetoothctl}} ?<br />
* Check: {{ic|bluetoothctl}} is started:<br />
systemctl status bluetooth<br />
* Check: You run the command with superuser privileges using {{ic|su}} or {{ic|sudo}}. Otherwise you have blue ''[bluetooth]#'' prompt and get the following message when powering on the controller:<br />
[bluetooth]# power on<br />
No default controller available<br />
My BT keyboard still does not work. What to do?<br />
* Check: Does it have power? <br />
* Check: Did it connect to the BT controller? If not, try with another controller or your smart phone.<br />
All went fine but when I type I'm getting "Bluetooth: hci0 ACL packet for unknown connection handle 4"<br />
* Try reset: hciconfig hci0 reset<br />
<br />
== Xorg ==<br />
Device should be added as {{ic|/dev/input/event*}} and your Xorg should add it automatically if you did not disable such feature.</div>Cirelli94https://wiki.archlinux.org/index.php?title=List_of_applications/Utilities&diff=603907List of applications/Utilities2020-04-03T13:49:19Z<p>Cirelli94: /* Disk cleaning */ updated sweeper link</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/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://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|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}}{{Broken package link|package not found}}}}<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 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.|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 />
<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|k3rmit|A VTE-based terminal emulator that aims to be simple, fast and effective.|https://github.com/orhun/k3rmit|{{AUR|k3rmit-git}}}}<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://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.|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.|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|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|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-git}}}}<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.|https://www.washington.edu/alpine/{{Dead link|2020|03|30|status=404}}|{{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|[[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|qtFM|Small, lightweight filemanager for Linux desktops based on pure Qt.|https://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.|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.|http://ignorantguru.github.io/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/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 ====<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://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/|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.|https://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 .pac* files]].<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|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 />
* {{App|ydiff|A Python wrapper to get highlighted output from GNU diff's output or vcs-tracked file/dirs, in either unfied or side-by-side view.|https://github.com/ymattw/ydiff|{{AUR|ydiff}}}}<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.|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|pyRenamer|Application for the mass renaming of files.|https://github.com/SteveRyherd/pyRenamer|{{AUR|pyrenamer}}{{Broken package link|package not found}}}}<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.embeddediq.com/|{{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 />
==== Code forges ====<br />
<br />
* {{App|[[GitLab]]|Project management and code hosting application.|https://gitlab.com/gitlab-org/gitlab-ce|{{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|hub|cli 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.|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++ .|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: {{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.|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|[[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|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.|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/|{{AUR|alleyoop}}{{Broken package link|package not found}}}}<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.|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/|{{AUR|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|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|[[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/|{{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/|{{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 />
==== 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|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|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|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|xneur}}, {{AUR|gxneur}} (GUI)}}<br />
<br />
==== Keybinding managers ====<br />
<br />
See [[Keyboard shortcuts#Xorg]].<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/{{Dead link|2020|02|25}}|{{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/{{Dead link|2020|03|30|status=domain name not resolved}}|{{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.|https://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.|https://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://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 />
* {{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|balena-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/WoeUSB/WoeUSB-frontend-wxgtk| {{AUR|woeusb}} or {{AUR|woeusb-git}}}}<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/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.|http://projects.l3ib.org/fsniper/{{Dead link|2020|03|30|status=404}}|{{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.|https://nicolargo.github.io/glances/|{{Pkg|glances}}}}<br />
* {{App|kmon|Linux kernel manager and activity monitor.|https://github.com/orhun/kmon|{{AUR|kmon}}}}<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|{{AUR|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|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.|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|KDE Info Center|Centralized and convenient overview of system information for KDE.|https://www.kde.org/applications/system/kinfocenter/{{Dead link|2020|03|30|status=404}}|{{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/|{{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/KCron{{Dead link|2020|03|30|status=404}}|{{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>Cirelli94https://wiki.archlinux.org/index.php?title=Power_management/Suspend_and_hibernate&diff=596520Power management/Suspend and hibernate2020-01-31T10:52:47Z<p>Cirelli94: I added a tip to identify swap_device value</p>
<hr />
<div>[[Category:Power management]]<br />
[[es:Power management (Español)/Suspend and hibernate]]<br />
[[ja:サスペンドとハイバネート]]<br />
[[ru:Power management/Suspend and hibernate]]<br />
[[zh-hans:Power management/Suspend and hibernate]]<br />
{{Related articles start}}<br />
{{Related|Uswsusp}}<br />
{{Related|systemd}}<br />
{{Related|Power management}}<br />
{{Related articles end}}<br />
<br />
Currently there are three methods of suspending available: '''suspend to RAM''' (usually called just '''suspend'''), '''suspend to disk''' (usually known as '''hibernate'''), and '''hybrid suspend''' (sometimes aptly called '''suspend to both'''):<br />
<br />
* '''Suspend to RAM''' method cuts power to most parts of the machine aside from the RAM, which is required to restore the machine's state. Because of the large power savings, it is advisable for laptops to automatically enter this mode when the computer is running on batteries and the lid is closed (or the user is inactive for some time).<br />
<br />
* '''Suspend to disk''' method saves the machine's state into [[swap space]] and completely powers off the machine. When the machine is powered on, the state is restored. Until then, there is [[Wikipedia:Standby power|zero]] power consumption.<br />
<br />
* '''Suspend to both''' method saves the machine's state into swap space, but does not power off the machine. Instead, it invokes usual suspend to RAM. Therefore, if the battery is not depleted, the system can resume from RAM. If the battery is depleted, the system can be resumed from disk, which is much slower than resuming from RAM, but the machine's state has not been lost.<br />
<br />
There are multiple low level interfaces (backends) providing basic functionality, and some high level interfaces providing tweaks to handle problematic hardware drivers/kernel modules (e.g. video card re-initialization).<br />
<br />
== Low level interfaces ==<br />
<br />
Though these interfaces can be used directly, it is advisable to use some of [[#High level interfaces|high level interfaces]] to suspend/hibernate. Using low level interfaces directly is significantly faster than using any high level interface, since running all the pre- and post-suspend hooks takes time, but hooks can properly set hardware clock, restore wireless etc.<br />
<br />
=== kernel (swsusp) ===<br />
<br />
The most straightforward approach is to directly inform the in-kernel software suspend code (swsusp) to enter a suspended state; the exact method and state depends on the level of hardware support. On modern kernels, writing appropriate strings to {{ic|/sys/power/state}} is the primary mechanism to trigger this suspend.<br />
<br />
See [https://www.kernel.org/doc/Documentation/power/states.txt kernel documentation] for details.<br />
<br />
=== uswsusp ===<br />
<br />
The uswsusp ('Userspace Software Suspend') is a wrapper around the kernel's suspend-to-RAM mechanism, which performs some graphics adapter manipulations from userspace before suspending and after resuming.<br />
<br />
See main article [[Uswsusp]].<br />
<br />
== High level interfaces ==<br />
<br />
The end goal of these packages is to provide binaries/scripts that can be invoked to perform suspend/hibernate. Actually hooking them up to power buttons or menu clicks or laptop lid events is usually left to other tools. To automatically suspend/hibernate on certain power events, such as laptop lid close or battery depletion percentage, you may want to look into running [[Acpid]].<br />
<br />
=== systemd ===<br />
<br />
[[systemd]] provides native commands for suspend, hibernate and a hybrid suspend, see [[Power management#Power management with systemd]] for details. This is the default interface used in Arch Linux.<br />
<br />
See [[Power management#Sleep hooks]] for additional information on configuring suspend/hibernate hooks. Also see {{man|1|systemctl}}, {{man|8|systemd-sleep}}, and {{man|7|systemd.special}}.<br />
<br />
== Hibernation ==<br />
<br />
In order to use hibernation, you need to create a [[swap]] partition or file. You will need to point the kernel to your swap using the {{ic|1=resume=}} kernel parameter, which is configured via the boot loader. You will also need to [[#Configure the initramfs|configure the initramfs]]. This tells the kernel to attempt resuming from the specified swap in early userspace. These three steps are described in detail below.<br />
<br />
{{Note|<br />
* See [[Dm-crypt/Swap encryption#With suspend-to-disk support]] when using [[encryption]].<br />
* {{Pkg|linux-hardened}} does not support hibernation, see {{Bug|63648}}.<br />
}}<br />
<br />
=== About swap partition/file size ===<br />
<br />
Even if your swap partition is smaller than RAM, you still have a big chance of hibernating successfully. According to [https://www.kernel.org/doc/Documentation/power/interface.txt kernel documentation]:<br />
<br />
: ''{{ic|/sys/power/image_size}} controls the size of the image created by the suspend-to-disk mechanism. It can be written a string representing a non-negative integer that will be used as an upper limit of the image size, in bytes. The suspend-to-disk mechanism will do its best to ensure the image size will not exceed that number. However, if this turns out to be impossible, it will try to suspend anyway using the smallest image possible. In particular, if "0" is written to this file, the suspend image will be as small as possible. Reading from this file will display the current image size limit, which is set to 2/5 of available RAM by default.''<br />
<br />
You may either decrease the value of {{ic|/sys/power/image_size}} to make the suspend image as small as possible (for small swap partitions), or increase it to possibly speed up the hibernation process. See [[Systemd#Temporary files]] to make this change persistent.<br />
<br />
The suspend image cannot span multiple swap partitions and/or swap files. It must fully fit in one swap partition or one swap file.[https://www.kernel.org/doc/Documentation/power/swsusp.txt]<br />
<br />
=== Required kernel parameters ===<br />
<br />
The [[kernel parameter]] {{ic|1=resume=''swap_device''}} must be used. Any of the [[persistent block device naming]] methods can be used as {{ic|''swap_device''}}. For example:<br />
<br />
* {{ic|1=resume=UUID=4209c845-f495-4c43-8a03-5363dd433153}}<br />
* {{ic|1=resume="PARTLABEL=Swap partition"}}<br />
* {{ic|1=resume=/dev/archVolumeGroup/archLogicalVolume}} -- if swap is on a [[LVM]] logical volume<br />
<br />
Generally, it is preferred to use the same naming method for both the {{ic|resume}} and {{ic|root}} parameters.<br />
<br />
==== Hibernation into swap file ====<br />
<br />
{{Warning|[[Btrfs#Swap file|Btrfs]] on Linux kernel before version 5.0 does not support swap files. Failure to heed this warning may result in file system corruption. While a swap file may be used on Btrfs when mounted through a loop device, this will result in severely degraded swap performance.}}<br />
<br />
Using a swap file instead of a swap partition requires an additional kernel parameter {{ic|1=resume_offset=''swap_file_offset''}}.<br />
<br />
{{Note|The {{ic|resume}} parameter must point to the [[block device]] where the swap file resides. For a stacked block device such as an encrypted container, RAID or LVM, it means that {{ic|resume}} must point to the unlocked/mapped device that contains the file system with the swap file.}}<br />
<br />
The value of {{ic|''swap_file_offset''}} can be obtained by running {{ic|filefrag -v ''swap_file''}}, the output is in a table format and the required value is located in the first row of the {{ic|physical_offset}} column. For example:<br />
<br />
{{hc|# filefrag -v /swapfile|<br />
Filesystem type is: ef53<br />
File size of /swapfile is 4294967296 (1048576 blocks of 4096 bytes)<br />
ext: logical_offset: physical_offset: length: expected: flags:<br />
0: 0.. 0: '''38912'''.. 38912: 1: <br />
1: 1.. 22527: 38913.. 61439: 22527: unwritten<br />
2: 22528.. 53247: 899072.. 929791: 30720: 61440: unwritten<br />
...<br />
}}<br />
<br />
In the example the value of {{ic|''swap_file_offset''}} is the first {{ic|38912}} with the two periods.<br />
<br />
{{Tip|<br />
* The following command may be used to identify {{ic|''swap_device''}}: {{ic|1=sudo findmnt -no SOURCE -T /swapfile}}<br />
* The following command may be used to identify {{ic|''swap_file_offset''}}: {{ic|1=filefrag -v /swapfile {{!}} awk '{ if($1=="0:"){print $4} }'}}<br />
* The value of {{ic|''swap_file_offset''}} can also be obtained by running {{ic|swap-offset ''swap_file''}}. The ''swap-offset'' binary is provided within the set of tools [[uswsusp]]. If using this method, then these two parameters have to be provided in {{ic|/etc/suspend.conf}} via the keys {{ic|resume device}} and {{ic|resume offset}}. No reboot is required in this case.<br />
}}<br />
<br />
{{Note|The kernel parameters will only take effect after rebooting. To be able to hibernate right away, obtain the volume's major and minor device numbers from [[lsblk]] and echo them in format {{ic|''major'':''minor''}} to {{ic|/sys/power/resume}} and the resume offset to {{ic|/sys/power/resume_offset}}. For example, if the swap file is on volume {{ic|8:2}} and has the offset {{ic|38912}}:<br />
<br />
# echo 8:2 > /sys/power/resume<br />
# echo 38912 > /sys/power/resume_offset<br />
<br />
See https://www.kernel.org/doc/Documentation/power/swsusp.txt.}}<br />
<br />
{{Tip|You might want to decrease the [[swappiness]] for your swapfile if the only purpose is to be able to hibernate and not expand RAM.}}<br />
<br />
==== Hibernation into swap file on Btrfs ====<br />
<br />
{{Note|Since systemd 244, {{ic|systemctl hibernate}} does not work with a swap file on Btrfs. The [https://github.com/systemd/systemd/issues/14249 systemd issue 14249] was fixed on 2020-01-08, but there is not any release since then.}}<br />
<br />
Hibernation onto a swapfile is supported by recent versions of systemd [https://github.com/systemd/systemd/issues/9559].<br />
<br />
The resume_offset number can be computed using the [https://github.com/osandov/osandov-linux/blob/master/scripts/btrfs_map_physical.c tool btrfs_map_physical.c].<br />
Do not try to use the filefrag tool, on [[Btrfs]] the "physical" offset you get from filefrag is not the real physical offset on disk; there is a virtual disk address space in order to support multiple devices. [https://bugzilla.kernel.org/show_bug.cgi?id=202803]<br />
<br />
Download or copy the [https://github.com/osandov/osandov-linux/blob/master/scripts/btrfs_map_physical.c tool btrfs_map_physical.c] into a file named {{ic|btrfs_map_physical.c}}, then compile it,<br />
<br />
$ gcc -O2 -o btrfs_map_physical btrfs_map_physical.c<br />
<br />
and run it. An example output is shown below.<br />
<br />
{{hc|# ./btrfs_map_physical ''/path/to/swapfile''|<br />
FILE OFFSET EXTENT TYPE LOGICAL SIZE LOGICAL OFFSET PHYSICAL SIZE DEVID PHYSICAL OFFSET<br />
0 regular 4096 2927632384 268435456 1 '''4009762816'''<br />
4096 prealloc 268431360 2927636480 268431360 1 4009766912<br />
268435456 prealloc 268435456 3251634176 268435456 1 4333764608<br />
536870912 prealloc 268435456 3520069632 268435456 1 4602200064<br />
805306368 prealloc 268435456 3788505088 268435456 1 4870635520<br />
1073741824 prealloc 268435456 4056940544 268435456 1 5139070976<br />
1342177280 prealloc 268435456 4325376000 268435456 1 5407506432<br />
1610612736 prealloc 268435456 4593811456 268435456 1 5675941888<br />
}}<br />
<br />
Note the the first physical offset returned by this tool. In this example, we use {{ic|4009762816}}. Also note the pagesize that can be found with {{ic|getconf PAGESIZE}}.<br />
<br />
To compute the {{ic|resume_offset}} value, divide the physical offset by the pagesize. In this example, it is {{ic|1=4009762816 / 4096 = 978946}}.<br />
<br />
=== Configure the initramfs ===<br />
<br />
* When an [[initramfs]] with the {{ic|base}} hook is used, which is the default, the {{ic|resume}} hook is required in {{ic|/etc/mkinitcpio.conf}}. Whether by label or by UUID, the swap partition is referred to with a udev device node, so the {{ic|resume}} hook must go ''after'' the {{ic|udev}} hook. This example was made starting from the default hook configuration:<br />
<br />
:{{bc|1=HOOKS=(base udev autodetect keyboard modconf block filesystems '''resume''' fsck)}}<br />
<br />
:Remember to [[regenerate the initramfs]] for these changes to take effect.<br />
<br />
:{{Note|[[LVM]] users should add the {{ic|resume}} hook after {{ic|lvm2}}.}}<br />
<br />
* When an initramfs with the {{ic|systemd}} hook is used, a resume mechanism is already provided, and no further hooks need to be added.<br />
<br />
== Troubleshooting ==<br />
<br />
=== ACPI_OS_NAME ===<br />
<br />
You might want to tweak your '''DSDT table''' to make it work. See [[DSDT]] article<br />
<br />
=== Suspend/hibernate does not work, or does not work consistently ===<br />
<br />
There have been many reports about the screen going black without easily viewable errors or the ability to do anything when going into and coming back from suspend and/or hibernate. These problems have been seen on both laptops and desktops. This is not an official solution, but switching to an older kernel, especially the LTS-kernel, will probably fix this.<br />
<br />
Also problem may arise when using hardware watchdog timer (disabled by default, see {{ic|1=RuntimeWatchdogSec=}} in {{man|5|systemd-system.conf|OPTIONS}}). Bugged watchdog timer may reset the computer before the system finished creating the hibernation image.<br />
<br />
Sometimes the screen goes black due to device initialization from within the initramfs. Removing any modules you might have in [[Mkinitcpio#MODULES]] and rebuilding the initramfs, can possibly solve this issue, specially graphics drivers for [[Kernel_mode_setting#Early_KMS_start|early KMS]]. Initializing such devices before resuming can cause inconsistencies that prevents the system resuming from hibernation. This does not affect resuming from RAM. Also, check the blog article [https://01.org/blogs/rzhang/2015/best-practice-debug-linux-suspend/hibernate-issues best practices to debug suspend issues].<br />
<br />
Moving from the [[radeon]] video driver to the newer [[AMDGPU]] driver could also help to make the hibernation and awakening process successful.<br />
<br />
For Intel graphics drivers, enabling early KMS may help to solve the blank screen issue. Refer to [[Kernel mode setting#Early KMS start]] for details.<br />
<br />
After upgrading to kernel 4.15.3, resume may fail with a static (non-blinking) cursor on a black screen. [[Blacklisting]] the module {{ic|nvidiafb}} might help. [https://bbs.archlinux.org/viewtopic.php?id=234646]<br />
<br />
=== Wake-on-LAN ===<br />
<br />
If [[Wake-on-LAN]] is active, the network interface card will consume power even if the computer is hibernated.<br />
<br />
=== Instantaneous wakeups from suspend ===<br />
<br />
For some Intel Haswell systems with the LynxPoint and LynxPoint-LP chipset, instantaneous wakeups after suspend are reported. They are linked to erroneous BIOS ACPI implementations and how the {{ic|xhci_hcd}} module interprets it during boot. As a work-around reported affected systems are added to a blacklist (named {{ic|XHCI_SPURIOUS_WAKEUP}}) by the kernel case-by-case.[https://bugzilla.kernel.org/show_bug.cgi?id=66171#c6] <br />
<br />
Instantaneous resume may happen, for example, if a USB device is plugged during suspend and ACPI wakeup triggers are enabled. A viable work-around for such a system, if it is not on the blacklist yet, is to disable the wakeup triggers. An example to disable wakeup through USB is described as follows.[https://bbs.archlinux.org/viewtopic.php?pid=1575617] <br />
<br />
To view the current configuration:<br />
<br />
{{hc|$ cat /proc/acpi/wakeup|<br />
Device S-state Status Sysfs node<br />
...<br />
EHC1 S3 *enabled pci:0000:00:1d.0<br />
EHC2 S3 *enabled pci:0000:00:1a.0<br />
XHC S3 *enabled pci:0000:00:14.0<br />
...<br />
}}<br />
<br />
The relevant devices are {{ic|EHC1}}, {{ic|EHC2}} and {{ic|XHC}} (for USB 3.0). To toggle their state you have to echo the device name to the file as root.<br />
<br />
# echo EHC1 > /proc/acpi/wakeup<br />
# echo EHC2 > /proc/acpi/wakeup<br />
# echo XHC > /proc/acpi/wakeup<br />
<br />
This should result in suspension working again. However, this settings are only temporary and would have to be set at every reboot. To automate this take a look at [[systemd#Writing unit files]]. See [https://bbs.archlinux.org/viewtopic.php?pid=1575617#p1575617 BBS thread] for a possible solution and more information.<br />
<br />
If you use {{ic|nouveau}} driver, the reason of instantaneous wakeup may be a bug in that driver, which sometimes prevents graphics card from suspension. One possible workaround is unloading {{ic|nouveau}} kernel module right before going to sleep and loading it back after wakeup. To do this, create the following script:<br />
<br />
{{hc|/usr/lib/systemd/system-sleep/10-nouveau.sh|2=<br />
#!/bin/bash<br />
<br />
case $1/$2 in<br />
pre/*)<br />
# echo "Going to $2..."<br />
/usr/bin/echo "0" > /sys/class/vtconsole/vtcon1/bind<br />
/usr/bin/rmmod nouveau<br />
;;<br />
post/*)<br />
# echo "Waking up from $2..."<br />
/usr/bin/modprobe nouveau<br />
/usr/bin/echo "1" > /sys/class/vtconsole/vtcon1/bind<br />
;;<br />
esac<br />
}}<br />
<br />
The first echo line unbinds nouveaufb from the framebuffer console driver (fbcon). Usually it is {{ic|vtcon1}} as in this example, but it may also be another {{ic|vtcon*}}. See {{ic|/sys/class/vtconsole/vtcon*/name}} which one of them is a "frame buffer device" [https://nouveau.freedesktop.org/wiki/KernelModeSetting/].<br />
<br />
=== System does not power off when hibernating ===<br />
<br />
When you hibernate your system, the system should power off (after saving the state on the disk). Sometimes, you might see the power LED is still glowing. If that happens, it might be instructive to set the {{ic|HibernateMode}} to {{ic|shutdown}} in {{man|5|sleep.conf.d}}:<br />
<br />
{{hc|/etc/systemd/sleep.conf.d/hibernatemode.conf|2=<br />
[Sleep]<br />
HibernateMode=shutdown<br />
}}<br />
<br />
With the above configuration, if every thing else is setup correctly, on invocation of a {{ic|systemctl hibernate}} the machine will shutdown saving state to disk as it does so.</div>Cirelli94https://wiki.archlinux.org/index.php?title=Meta_package_and_package_group&diff=587693Meta package and package group2019-11-03T12:40:02Z<p>Cirelli94: /* Difference between meta package and package group */ Improved clarity on differences.</p>
<hr />
<div>[[Category:Package management]]<br />
[[es:Package group]]<br />
[[pt:Meta package and package group]]<br />
[[ru:Meta package and package group]]<br />
A '''meta package''' and a '''package group''' can be defined by the [[packager]] to denote a set of related packages. Both can allow to install or uninstall this set of packages simultaneously by using the meta package or the group name as a substitute for each individual package name. While a group is not a package, it can be installed in a similar fashion to a package, see [[Pacman#Installing package groups]] and [[PKGBUILD#groups]].<br />
<br />
== Difference between meta package and package group ==<br />
The difference between a meta package and a regular package is that a meta package is empty and exists purely to link related packages together via dependencies.<br />
A ''meta package'', often (though not always) titled with the "-meta" suffix, provides similar functionality to a package group in that it enables multiple related packages to be installed or uninstalled simultaneously.<br />
<br />
Each solution has advantages and disadvantages:<br />
<br />
''meta package'':<br />
* Meta packages can be installed just like any other package (see [[Pacman#Installing specific packages]]).<br />
* You can remove a meta package like any other package (see [[Pacman#Removing_packages]]).<br />
* Any new member packages will be installed when the meta package itself is updated with a new set of dependencies.<br />
* It is not flexible:<br />
** you cannot choose which meta package dependencies you wish to install.<br />
** You cannot remove meta package dependencies without having to uninstall the meta package itself.<br />
<br />
<br />
''group''<br />
* Package groups will prompt you to select the packages from the group that you wish to install (see [[Pacman#Installing_package_groups]]).<br />
* You can't uninstall a group, because you installed a list of packages.<br />
* New group members will not be automatically installed.<br />
* It is flexible:<br />
** You can choose which group members you wish to install.<br />
** You can uninstall group members without having to remove the entire group.<br />
<br />
== Meta packages ==<br />
<br />
The most important meta package is {{Pkg|base}}. It contains a minimal package set that defines a basic Arch Linux installation. It includes:<br />
<br />
* basics such as {{Pkg|glibc}} and [[bash]], <br />
* distribution related things such as [[pacman]] and [[systemd]]<br />
* POSIX tools such as [[core utilities]], process, file and file compression utilities<br />
* networking tools such as {{Pkg|iproute2}}<br />
<br />
The [[kernel]] is an optional dependency. See [https://www.archlinux.org/news/base-group-replaced-by-mandatory-base-package-manual-intervention-required/ the announcement when it was introduced], and [https://lists.archlinux.org/pipermail/arch-dev-public/2019-January/029435.html reasoning why base is a meta package].<br />
<br />
== Groups ==<br />
<br />
The most important package group is {{Grp|base-devel}}. It contains tools required to build many packages like [[GCC]] and [[GNU make|make]]. See also [[makepkg#Usage]].<br />
<br />
== See also ==<br />
<br />
* [https://www.archlinux.org/groups/ List of all package groups]<br />
* Examples:<br />
** [[GNOME#Installation]]<br />
** [[KDE#Installation]]<br />
** [[i3#Installation]]</div>Cirelli94https://wiki.archlinux.org/index.php?title=Eclipse&diff=579739Eclipse2019-08-13T13:00:12Z<p>Cirelli94: /* Installation */ Added eclipse-rust package</p>
<hr />
<div>[[Category:Integrated development environments]]<br />
[[es:Eclipse]]<br />
[[it:Eclipse]]<br />
[[ja:Eclipse]]<br />
[[ru:Eclipse]]<br />
[[zh-hans:Eclipse]]<br />
[https://eclipse.org Eclipse] is an open source community project, which aims to provide a universal development platform. The Eclipse project is most widely known for its cross-platform integrated development environment (IDE). The Arch Linux packages (and this guide) relate specifically to the IDE.<br />
<br />
The Eclipse IDE is largely written in Java but can be used to develop applications in a number of languages, including Java, C/C++, PHP, Perl and Python. The IDE can also provide subversion support and task management.<br />
<br />
== Installation ==<br />
<br />
[[Install]] one of the following packages:<br />
<br />
* {{Pkg|eclipse-jee}} for Java EE Developers<br />
* {{Pkg|eclipse-java}} for Java Developers<br />
* {{Pkg|eclipse-cpp}} for C/C++ Developers<br />
* {{Pkg|eclipse-php}} for PHP Developers<br />
* {{Pkg|eclipse-javascript}} for JavaScript and Web Developers<br />
* {{Pkg|eclipse-rust}} for Rust Developers<br />
<br />
You cannot install multiple of these at the same time since they conflict, see {{Bug|45577}}: choose the package above which most immediately fulfills your needs, and then add support for any additionally required languages through [[#Plugins]].<br />
<br />
== Plugins ==<br />
<br />
Many plugins are easily installed using '''pacman''' (see [[Eclipse plugin package guidelines]] for further information). This will also keep them up-to-date. Alternatively, you can choose either the [[#Eclipse Marketplace|Eclipse Marketplace]] or the internal [[#Plugin manager|plugin manager]].<br />
<br />
=== Add the default update site ===<br />
<br />
Make sure that you check that the default update site for your version of Eclipse is configured so that plugin dependencies can automatically be installed. The most current version of Eclipse is Photon and the default update site for it is: http://download.eclipse.org/releases/photon. Go to Help > Install new Software > Add, fill the name to easily identify the update site later - for instance, Photon Software Repository - and fill the location with the url.<br />
<br />
=== Eclipse Marketplace ===<br />
<br />
{{Note|make sure you have followed the [[#Add the default update site|Add the default update site]] section.}}<br />
To use the Eclipse Marketplace, install it first: go to Help > Install new software > Switch to the default update site > General Purpose Tools > Marketplace Client. Restart Eclipse and it will be available in Help > Eclipse Marketplace.<br />
<br />
=== Plugin manager ===<br />
<br />
{{Note|make sure you have followed the [[#Add the default update site|Add the default update site]] section.}}<br />
Use Eclipse's plugin manager to download and install plugins from their original repositories: in this case you have to find the needed repository in the plugin's website, then go to ''Help > Install New Software...'', enter the repository in the ''Work with'' field, select the plugin to install from the list below and follow the instructions.<br />
<br />
{{Note|<br />
* If you install plugins with Eclipse's plugin manager, you are advised to launch Eclipse as root: this way the plugins will be installed in {{ic|/usr/lib/eclipse/plugins/}}; if you installed them as normal user, they would be stored in a version-dependent folder inside {{ic|~/.eclipse/}}, and, after upgrading Eclipse, they would not be recognized any longer.<br />
* Do not use Eclipse as root for your everyday work.<br />
}}<br />
<br />
==== Updates via plugin manager ====<br />
<br />
Run Eclipse and select ''Help > Check for Updates''. If you have installed them as root as advised in the section above, you have to run Eclipse as root.<br />
<br />
For plugins to be updated, you should check to have their update repositories enabled in ''Window > Preferences > Install/Update > Available Software Sites'': you can find each plugin's repository(es) on the respective project website. To add, edit, remove... repositories just use the buttons on the right of the ''Available Software Sites'' panel. For Eclipse 4.5 (Mars), check you have enabled this repository:<br />
<br />
http://download.eclipse.org/releases/mars<br />
<br />
To receive update notifications, go to ''Window > Preferences > Install/Update > Automatic Updates''. If you want to receive notifications for plugins installed as root, you should run Eclipse as root, go to ''Window > Preferences > Install/Update > Available Software Sites'', select the repositories related to the installed plugins and ''Export'' them, then run Eclipse as normal user and ''Import'' them in the same panel.<br />
<br />
=== List of plugins ===<br />
<br />
* {{App|AVR|AVR microcontroller plugin.|http://avr-eclipse.sourceforge.net/wiki/index.php/The_AVR_Eclipse_Plugin|{{AUR|eclipse-avr}}}}<br />
* {{App|Aptana|HTML5/CSS3/JavaScript/Ruby/Rails/PHP/Pydev/Django support. Also available as standalone application.|http://www.aptana.com/|{{AUR|aptana-studio}}}}<br />
* {{App|IvyDE|IvyDE dependency Manager.|https://ant.apache.org/ivy/ivyde/|{{AUR|eclipse-ivyde}}}}<br />
* {{App|Markdown|Markdown editor plugin for Eclipse.|http://www.winterwell.com/software/markdown-editor.php|{{AUR|eclipse-markdown}}}}<br />
* {{App|PyDev|[[Python]] support.|http://pydev.org/|{{AUR|eclipse-pydev}}}}<br />
* {{App|Subclipse|[[Subversion]] support.|https://github.com/subclipse/subclipse|{{AUR|eclipse-subclipse}}}}<br />
* {{App|Subversive|Alternative Subversion support.|https://www.eclipse.org/subversive/|{{AUR|eclipse-subversive}}}}<br />
* {{App|TestNG|TestNG support.|http://testng.org/doc/eclipse.html|{{AUR|eclipse-testng}}}}<br />
* {{App|TeXlipse|[[LaTeX]] support.|http://texlipse.sourceforge.net/|{{AUR|eclipse-texlipse}}}}<br />
* {{App|Checkstyle|Eclipse Checkstyle support.|http://eclipse-cs.sourceforge.net/|{{AUR|eclipse-checkstyle}}}}<br />
<br />
== Enable javadoc integration ==<br />
<br />
Want to see API entries when hovering the mouse pointer over standard Java methods?<br />
<br />
=== Online version ===<br />
<br />
If you have constant Internet access on your machine, you can use the on-line documentation:<br />
<br />
# Go to ''Window > Preferences'', then go to ''Java > Installed JREs''.<br />
# There should be one named "java" with the type "Standard VM". Select this and click ''Edit''.<br />
# Select the {{ic|/usr/lib/jvm/java-8-openjdka/jre/lib/rt.jar}} item under "JRE system libraries:", then click ''Javadoc Location...''.<br />
# Enter "https://docs.oracle.com/javase/8/docs/api/" in the "Javadoc location path:" text field.<br />
<br />
=== Offline version ===<br />
<br />
You can store the documentation locally by installing the {{Pkg|openjdk8-doc}} package. Eclipse may be able to find the javadocs automatically. If that does not work, set Javadoc location for rt.jar to {{ic|file:/usr/share/doc/java8-openjdk/api}}.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Ctrl+X closes Eclipse ===<br />
<br />
Part of [https://bugs.eclipse.org/bugs/show_bug.cgi?id=318177 this] bug. Just look in {{ic|~/workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi}} and delete the wrong {{ic|Ctrl+X}} combination. Usually it is the first one.<br />
<br />
=== Dark theme ===<br />
<br />
Eclipse supplies a Dark theme which can be enabled in Window > Preferences > General > Appearance and selecting the 'Dark' theme.<br />
<br />
The dark theme uses its own colours rather than the GTK theme colours, if you prefer it to fully respect GTK colour settings, then remove or move to backup sub folder all of the .css files from {{ic|/usr/lib/eclipse/plugins/org.eclipse.ui.themes_x.x.xxx.vxxxxxxxx-xxxx/css/}}.<br />
<br />
=== Change Default Window Title Font Size ===<br />
<br />
You cannot change the window title font size using the Eclipse preferences, you must edit the actual theme .css files. Note, that you will have to redo this when you upgrade eclipse.<br />
They are located under<br />
/usr/share/eclipse/plugins/org.eclipse.platform_4.3.<your version number>/css<br />
Open the appropriate file with your text editor, ie e4_default_gtk.css if you are using the "GTK theme".<br />
Search for .MPartStack, and change the font-size to your desired size<br />
.MPartStack {<br />
font-size: 9;<br />
swt-simple: false;<br />
swt-mru-visible: false;<br />
}<br />
<br />
=== Disable GTK 3 ===<br />
<br />
When the SWT GTK 3 UI is buggy and sometimes unusable, You can try to disable the use of GTK 3 with the SWT_GTK3=0 [[environment variable]] when you start eclipse:<br />
SWT_GTK3=0 eclipse<br />
<br />
Another option to achieve the same effect is to add the following to {{ic|/usr/lib/eclipse/eclipse.ini}}.<br />
--launcher.GTK_version<br />
2<br />
<br />
Those two lines must be added '''before''':<br />
--launcher.appendVmargs<br />
<br />
=== Freshplayerplugin ===<br />
<br />
Eclipse is not compatible with {{AUR|freshplayerplugin}}. See https://github.com/i-rinat/freshplayerplugin/issues/298.<br />
<br />
=== Eclipse 4.6 may not open the marketplace properly===<br />
<br />
See [https://bugs.eclipse.org/bugs/show_bug.cgi?id=497729 this] bug. You can take following two steps to fix it:<br />
<br />
eclipse -consoleLog -application org.eclipse.equinox.p2.director -uninstallIU org.apache.httpcomponents.httpclient/4.3.6.v201411290715<br />
cd /usr/lib/eclipse/ && sudo rm plugins/org.apache.httpcomponents.httpclient_4.3.6.v201411290715.jar<br />
<br />
=== Show in System Explorer does not work ===<br />
See [http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Freference%2Fref-9.htm&cp=0_4_1_52 this] guide. Go to '''Window''' > '''Preferences''' > '''General''' > '''Workspace''' and change the command launching system explorer. As Xfce user you may like to change it to {{ic|thunar ${selected_resource_uri} }} to open the selected folder with thunar.<br />
<br />
=== Display issues under Wayland ===<br />
When running Eclipse on Wayland, you may encounter rendering issues such as slow response time to mouse events or chopped dialog windows (Bug report [https://bugs.eclipse.org/bugs/show_bug.cgi?id=483545]). A possible workaround for this issue is to force Eclipse to run under XWayland.<br />
<br />
With the superuser, open the file {{ic|/usr/bin/eclipse}} and append this line before the {{ic|exec}} line :<br />
export GDK_BACKEND=x11<br />
<br />
This will force the execution of Eclipse on XWayland.<br />
<br />
== See also ==<br />
<br />
* [https://www.ibm.com/developerworks/library/os-ecl-subversion/ How to use Subversion with Eclipse]</div>Cirelli94