https://wiki.archlinux.org/api.php?action=feedcontributions&user=Qguv&feedformat=atomArchWiki - User contributions [en]2024-03-29T09:28:49ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Rust&diff=521772Rust2018-05-18T13:54:15Z<p>Qguv: /* Usage */ updated rust version in example</p>
<hr />
<div>[[Category:Programming languages]]<br />
[[ja:Rust]]<br />
[[ru:Rust]]<br />
From [[Wikipedia:Rust (programming language)|Wikipedia]]:<br />
:''[http://rust-lang.org/ Rust] is a general-purpose, multi-paradigm, compiled programming language sponsored by Mozilla Research. It is designed to be a "safe, concurrent, practical language", supporting pure-functional, imperative-procedural, and object-oriented styles.''<br />
:''The goal of Rust is to be a good language for creating highly concurrent and highly safe systems, and programming in the large. This has led to a feature set with an emphasis on safety, control of memory layout, and concurrency. Performance of idiomatic Rust is comparable to the performance of idiomatic C++.''<br />
<br />
== Core language ==<br />
=== Rust Core Library ===<br />
<br />
The [https://doc.rust-lang.org/core/ Rust Core Library] is the dependency-free foundation of the Rust Standard Library. It interfaces directly with LLVM primitives, which allows Rust to be platform and hardware-agnostic. It is this integration with LLVM that allows Rust to obtain greater performance than equivalent C applications compiled with Clang, making Rust software designed with libcore lower level than C. Developers looking to target software for embedded platforms may forego the standard library with {{ic|#[nostd]}} to exclusively use the no-batteries-included core library for smaller binary sizes and improved performance. However, using {{ic|#[nostd]}} limits the amount of software support that you can get from the larger Rust community as a majority of libraries require the standard library. <br />
<br />
=== Rust Standard Library ===<br />
<br />
The [http://doc.rust-lang.org/std/index.html Rust Standard Library] provides the convenient high level abstractions by which a majority of portable Rust software is created with. It features convenient features such as the {{ic|Vec}}, {{ic|Iterator}}, {{ic|Option}}, {{ic|Result}}, and {{ic|String}} types; a vast amount of methods for language primitives; a large number of standard macros; I/O and multithreading support; heap allocations with {{ic|Box}}; and many more high level features not available in the core library.<br />
<br />
=== Release Cycle ===<br />
<br />
Rust follows a regular six week release cycle, similar to the release cycle of Firefox. With each new release, the core and standard libraries are improved to support more platforms, improve performance, and to stabilize new features for use with stable Rust.<br />
<br />
== Installation ==<br />
<br />
=== Native Installation ===<br />
<br />
To [[install]] the latest stable version of Rust from the official Arch Linux software repository, [[install]] the {{Pkg|rust}} package. This will install the rustc compiler.<br />
<br />
There's also development version of the Rust compiler available from [[AUR]]. Use {{AUR|rust-nightly-bin}} for prebuilt generic binaries or {{AUR|rust-git}} to build the compiler with system libraries. Prebuilt, periodically updated rust-git packages are also available from the [[Unofficial user repositories#rust-git|unofficial repo]].<br />
<br />
=== Rustup ===<br />
<br />
The official and recommended method of installing Rust for the purpose of developing software is to use the [https://www.rustup.rs/ Rustup toolchain manager], written in Rust.<br />
<br />
The benefits to using the Rustup toolchain manager instead of the standalone prepackaged Rust in the software repository is the ability to install multiple toolchains (stable, beta, nightly) for multiple targets (windows, mac, android) and architectures (x86, x86_64, arm). It is also important to note that tools such as [https://github.com/Manishearth/rust-clippy Clippy] require compiler plugin support, which is only supported in nightly builds of Rust.<br />
<br />
One has 2 choices for a rustup installation, one is officially supported by Rust, while the other is supported by Arch Linux.<br />
<br />
==== Upstream installation script ====<br />
<br />
Download the file with {{ic|curl -f <nowiki>https://sh.rustup.rs</nowiki> > rust.sh}}, view it: {{ic|less ./rust.sh}}, and run the script {{ic|./rust.sh}} to start rustup installation. The script makes PATH changes only to login shell [[Bash#Invocation|configuration files]]. You need to {{ic|source $HOME/.cargo/env}} until you logout and login back into the system.<br />
To update rustup afterwards, run {{ic|rustup self update}}.<br />
<br />
The script installs and activates the default toolchain by default (the one used by the {{pkg|rust}} package, so there is no need to manually install it to start using Rust.<br />
<br />
{{warning|Running {{ic|curl ''some-url'' {{!}} sh}}, as the Rust documentation suggests, is considered as a security risk by some, because it executes unknown and/or untrusted code, that might even be corrupted during the download. Therefore it is recommended to manually download the script and check it, before executing it.}}<br />
<br />
{{Note|Please make sure that {{ic|$HOME/.cargo/bin}} is in your {{ic|PATH}} when you run {{ic|rustup}}.}}<br />
<br />
==== Arch Linux package ====<br />
<br />
{{Pkg|rustup}} is also available on the Arch Linux software repository. Note that {{ic|rustup self update}} will '''not''' work when installed this way, the package needs to be updated by pacman.<br />
<br />
This package has the advantage that the various Rust executables live in {{ic|/usr/bin}}, instead of {{ic|~/.cargo/bin}}, removing the need to add another directory to your {{ic|PATH}}.<br />
<br />
{{note|The {{pkg|rustup}} package does '''not''' install a toolchain by default. The user needs to install a toolchain manually, for the Rust commands to do anything.}}<br />
<br />
==== Usage ====<br />
<br />
You might need to manually install a toolchain, e.g. {{ic|stable}}, {{ic|beta}}, {{ic|nightly}} or {{ic|1.23.0}}. You also need to do this if you want to use/test another toolchain.<br />
$ rustup install ''toolchain''<br />
<br />
You can now run the Rust commands by running, {{ic|rustup run ''toolchain'' ''command''}}. However, to use these commands directly, you need to activate the toolchain: <br />
$ rustup default ''toolchain''<br />
<br />
Check the installed Rust version using {{ic|rustc -V}}:<br />
<br />
{{hc|$ rustc -V |<br />
rustc 1.26.0 (a77568041 2018-05-07)<br />
}}<br />
<br />
{{note|Rustup does not install some Rust commands that the {{pkg|rust}} package does include, such as {{ic|rustfmt}} and {{ic|rls}}. They are not included because this allows the Rust maintainers to ship a nightly of Rust with a broken {{ic|rustfmt}}/{{ic|rls}}. To install them, run {{ic|rustup component add rls-preview}} and {{ic|rustup component add rustfmt-preview}} respectively. This will also suspend updates of the nightly channel, if they break {{ic|rustfmt}}/{{ic|rls}}.<br />
}}<br />
<br />
{{note|Rust does not do its own linking, and so you’ll need to have a linker installed. You can use {{Pkg|gcc}}, otherwise Rust will generate the following {{ic| error: linker `cc` not found.}}<br />
}}<br />
<br />
=== Test your installation ===<br />
<br />
Check that Rust is installed correctly by building a simple program, as follows:<br />
{{hc|~/hello.rs|<br />
fn main() {<br />
println!("Hello, World!");<br />
}<br />
}}<br />
<br />
You can compile it with {{ic|rustc}}, then run it:<br />
{{hc|$ rustc hello.rs && ./hello|<br />
Hello, World!<br />
}}<br />
<br />
== Cross Compiling ==<br />
<br />
=== Using rustup ===<br />
<br />
You can easily cross-compile using rustup. rustup supports many crosscompile targets. A full list can be found running {{ic|rustup target list}}.<br />
<br />
For instance, if you want to install rust using the stable channel for windows, using the gnu compiler, you will need to do : <br />
<br />
{{bc|<nowiki><br />
$ rustup install stable-x86_64-pc-windows-gnu<br />
</nowiki>}}<br />
<br />
This will only installs rust and its tools for your target architecture, but some additional tools might be needed for cross compiling.<br />
<br />
=== Windows ===<br />
<br />
In this section, {{ic|$ARCH}} is the target architecture (either {{ic|x86_64}} or {{ic|i686}}). It will explain how to cross compile using rustup.<br />
<br />
# [[Install]] {{AUR|mingw-w64-gcc}} and {{Pkg|wine}}<br />
# Add a binfmt definition for windows executables either manually or by installing {{AUR|binfmt-wine}}{{Broken package link|package not found}}.<br />
# If you are using rustup, you can run {{ic|rustup install stable-$ARCH-pc-windows-gnu}} and {{ic|rustup target add $ARCH-pc-windows-gnu}} to install rust and rust standard library for your architecture. If you are not using rustup, install a copy of rust's standard library for windows in your rustlib directory ({{ic|/usr/local/lib/rustlib}} if you're using {{AUR|rust-nightly-bin}} and {{ic|/usr/lib/rustlib}} if you're using the official {{Pkg|rust}} package). The easiest way to do this is to download the rust installer for windows for your target architecture, install it under wine ({{ic|wine start my-rust-installer.msi}}) and copy {{ic|$INSTALL_DIR/lib/rustlib/$ARCH-pc-windows-gnu}} into your rustlib directory. <br />
# Finally, tell cargo where to find the MinGW-w64 gcc/ar by adding the following to your {{ic|~/.cargo/config}}:<br />
{{hc|~/.cargo/config|<nowiki><br />
[target.$ARCH-pc-windows-gnu]<br />
linker = "/usr/bin/$ARCH-w64-mingw32-gcc"<br />
ar = "/usr/$ARCH-w64-mingw32/bin/ar"<br />
</nowiki>}}<br />
<br />
Finally, you can cross compile for windows by passing the {{ic|--target $ARCH-pc-windows-gnu}} to cargo:<br />
{{bc|<nowiki><br />
$ # Build<br />
$ cargo build --release --target "$ARCH-pc-windows-gnu"<br />
$ # Run unit tests under wine<br />
$ cargo test --target "$ARCH-pc-windows-gnu"<br />
</nowiki>}}<br />
<br />
=== Unofficial packages ===<br />
<br />
The [[Unofficial user repositories#archlinuxcn|unofficial repo archlinuxcn]] has rust-nightly and Rust std library for i686, ARM, ARMv7, Windows 32 and 64 so you can just install the one you want then enjoy cross compiling. However, you have to find an ARM toolchain by yourself. For Windows 32bit targets, you'll need to get a libgcc_s_dw2-1.dll to build and run.<br />
<br />
== Cargo ==<br />
<br />
[https://crates.io/ Cargo], Rust's package manager, is part of the {{Pkg|rust}} package. The nightly version is available in the AUR as {{AUR|cargo-nightly-bin}}. If you use {{Pkg|rustup}}, it already includes cargo.<br />
<br />
Cargo is a tool that allows Rust projects to declare their various dependencies, and ensure that you'll always get a repeatable build. You're encouraged to read the [http://doc.crates.io/guide.html official guide].<br />
<br />
=== Usage ===<br />
<br />
To create a new project using Cargo:<br />
{{bc|$ cargo new hello_world --bin}}<br />
<br />
This creates a directory with a default {{ic|Cargo.toml}} file, set to build an executable (because we included {{ic|--bin}}, otherwise it would build a library).<br />
<br />
{{Note|Cargo uses this {{ic|Cargo.toml}} as a manifest containing all of the metadata required to compile your project.<br />
{{hc|head=Cargo.toml|<br />
output=[package]<br />
name = "hello_world"<br />
version = "0.1.0"<br />
authors = ["Your Name <you@example.com>"]<br />
}}<br />
}}<br />
<br />
== IDE Support ==<br />
<br />
=== Tools ===<br />
<br />
==== Racer ====<br />
<br />
The [https://github.com/phildawes/racer Racer] autocomplete engine is the current best method of gaining autocomplete support. However, it requires that you also install a copy of the Rust source code, which you can obtain in one of several ways:<br />
* With rustup: {{ic|rustup component add rust-src}}<br />
* From the AUR: {{Aur|rust-src}} or {{Aur|rust-nightly-src}}, in this case you must set the {{ic|RUST_SRC_PATH}} environment var.<br />
After installing the source code, you can either use {{ic|Cargo}} to install racer or obtain it from the repos ({{pkg|rust-racer}}).<br />
<br />
$ cargo install racer<br />
<br />
==== Clippy ====<br />
<br />
[https://github.com/Manishearth/rust-clippy Clippy] takes advantage of compiler plugin support in Nightly builds of Rust to provide a large number of additional lints for detecting and warning about a larger variety of errors and non-idiomatic Rust. Because it requires support for compiler plugins in order to operate, clippy will not work when compiling with the stable Rust compiler.<br />
<br />
$ cargo +nightly install clippy<br />
<br />
=== Editors ===<br />
<br />
==== Atom ====<br />
<br />
Atom supports Rust programming when both of the next plugins installed: [https://atom.io/packages/language-rust language-rust] and [https://atom.io/packages/linter-rust linter-rust].<br />
<br />
==== IntelliJ IDEA ====<br />
<br />
[https://www.jetbrains.com/idea/ IntelliJ IDEA] has a [https://github.com/intellij-rust/intellij-rust Rust plugin]. The same plugin also works with CLion. When configuring the toolchain, use rustup to download the source ({{ic|rustup component add rust-src}}), and then select {{ic|~/.rustup/toolchains/<your toolchain>/bin}} as the toolchain location.<br />
<br />
==== Visual Studio Code ====<br />
<br />
Support for Rust can be obtained by installing the [https://marketplace.visualstudio.com/items?itemName=kalitaalexey.vscode-rust Rust] extension.<br />
<br />
==== Vim ====<br />
<br />
Vim support for Rust is enabled via the official [https://github.com/rust-lang/rust.vim rust.vim] plugin.<br />
<br />
====Emacs====<br />
<br />
Emacs support for Rust is enabled via the offical [https://github.com/rust-lang/rust-mode rust-mode] plugin or the {{AUR|emacs-rust-mode}} package.<br />
<br />
<br />
====Kate====<br />
<br />
Kate support for Rust is enabled via the official [https://github.com/rust-lang/kate-config kate] plugin. It is installed by defaut by the {{Pkg|kate}} package, require the installation of {{AUR|racer}} and manual activation.<br />
<br />
== See also ==<br />
<br />
* [http://rust-lang.org/ Official website of the Rust Programming Language]<br />
* [https://www.rust-lang.org/documentation.html Rust Documentation]<br />
* [http://doc.rust-lang.org/stable/book/ Official Rust Book]<br />
* [https://doc.rust-lang.org/std/ Standard Library API Lookup]<br />
* [http://rustbyexample.com/ Examples with small descriptions]<br />
* [https://github.com/ctjhoa/rust-learning Page listing of Rust tutorials]<br />
* [https://crates.io/ Libraries(crates) available through Cargo]<br />
* [https://this-week-in-rust.org/ This Week in Rust]<br />
* [http://blog.rust-lang.org/ The Rust Programming Language Blog]<br />
* [https://users.rust-lang.org/ The Rust Users Forum]<br />
* [https://internals.rust-lang.org/ The Rust Internals Forum]<br />
* [https://rust.libhunt.com/ Awesome Rust: A curated list of Rust libraries and resources]<br />
* [[Wikipedia:Rust (programming language)|Wikipedia article]]</div>Qguvhttps://wiki.archlinux.org/index.php?title=User_talk:Sudokode&diff=521276User talk:Sudokode2018-05-15T14:17:28Z<p>Qguv: asking about expired ptpb.pw ssl cert</p>
<hr />
<div>It's the end of the world as we know it!<br />
<br />
<br />
== ptpb.pw cert expired ==<br />
<br />
Hey sudokode, looks like ptpb.pw's SSL cert has expired. Do you have any plans to renew it? Thanks! [[User:Qguv|qguv]] ([[User talk:Qguv|talk]]) 14:17, 15 May 2018 (UTC)</div>Qguvhttps://wiki.archlinux.org/index.php?title=Picom&diff=513418Picom2018-03-12T03:34:08Z<p>Qguv: removed link to garnetius' fork, which has been taken down by its author</p>
<hr />
<div>[[Category:X server]]<br />
[[Category:Eye candy]]<br />
[[ja:Compton]]<br />
[[ko:Compton]]<br />
[[ru:Compton]]<br />
[[zh-hans:Compton]]<br />
[https://github.com/chjj/compton Compton] is a standalone [[compositor]] for [[Xorg]], suitable for use with [[window managers]] that do not provide compositing. Compton is a fork of [http://oliwer.net/xcompmgr-dana/ xcompmgr-dana], which in turn is a fork of [[xcompmgr]].<br />
<br />
== Installation ==<br />
<br />
[[Install]] {{Pkg|compton}} or its [[git]] version, {{AUR|compton-git}}.<br />
<br />
{{AUR|compton-conf}} or {{AUR|compton-conf-git}} package provide [[Qt]]-based GUI for Compton configuration.<br />
<br />
== Usage ==<br />
<br />
See {{man|1|compton}}. Compton may be manually enabled or disabled at any time during a session, or autostarted as a background ([[Daemon]]) process for sessions. There are also several optional arguments that may be used to tweak the compositing effects provided. These include:<br />
<br />
* {{ic|-b}}: Run as a background ([[Daemon]]) process for a session (e.g. when autostarting for a [[window manager]] such as [[Openbox]])<br />
* {{ic|-c}}: Enable shadow effects<br />
* {{ic|-C}}: Disable shadow effects on panels and docks<br />
* {{ic|-G}}: Disable shadow effects for application windows and drag-and-drop objects<br />
* {{ic|--config}}: Use a specified configuration file<br />
<br />
Many more options are available, including to set timing, displays to be managed, and the opacity of menus, window borders, and inactive application menus. See the [https://github.com/chjj/compton/blob/master/man/compton.1.asciidoc Compton Man Page] for further information.<br />
<br />
{{Note|If a different [[composite manager]] is running, it should be disabled before starting ''compton''.}}<br />
<br />
=== Autostarting ===<br />
<br />
How compton would be autostarted as a [[Daemon]] process will depend on the [[desktop environment]] or [[window manager]] used. For example, for [[Openbox]] the {{ic|~/.config/openbox/autostart}} file must be edited, while for [[i3]] it would be the {{ic|~/.i3/config}} file. Where necessary, compton may also be autostarted from [[xprofile]] or [[Xinitrc]]. Read the [[startup files]] article for further information.<br />
<br />
=== Command only ===<br />
<br />
To manually enable default compositing effects during a session, use the following command:<br />
<br />
$ compton<br />
<br />
Alternatively, to disable all shadowing effects during a session, the {{ic|-C}} and {{ic|-G}} arguments must be added:<br />
<br />
$ compton -CG<br />
<br />
To autostart compton as a background ([[Daemon]]) process for a session, the {{ic|-b}} argument must be used:<br />
<br />
$ compton -b<br />
<br />
To disable all shadowing effects from the [[Daemon]] process, the {{ic|-C}} and {{ic|-G}} arguments must again be added:<br />
<br />
$ compton -CGb<br />
<br />
Finally, this is an example where additional arguments that require values to be set have been used:<br />
<br />
$ compton -cCGfF -o 0.38 -O 200 -I 200 -t 0 -l 0 -r 3 -D2 -m 0.88<br />
<br />
=== Using a configuration file ===<br />
<br />
The default configuration is available in {{ic|/etc/xdg/compton.conf}}. For modifications, it can be copied to {{ic|~/.config/compton.conf}}, or to {{ic|~/.compton.conf}}.<br />
<br />
To use a custom configuration file with compton during a session, use the following command:<br />
<br />
$ compton --config ''path/to/compton.conf''<br />
<br />
To auto-start compton as a background ([[Daemon]]) process for a session, specify the {{ic|-b}} argument:<br />
<br />
$ compton --config ''path/to/compton.conf'' -b<br />
<br />
==== Disable shadows for some windows ====<br />
<br />
The {{ic|shadow-exclude}} option can disable shadows for windows if required. For currently disabled windows, see [https://projects.archlinux.org/svntogit/community.git/tree/trunk/compton.conf?h=packages/compton#n80 here].<br />
<br />
To disable shadows for menus add the following to wintypes in {{ic|compton.conf}}:<br />
<br />
# menu = { shadow = false; };<br />
dropdown_menu = { shadow = false; };<br />
popup_menu = { shadow = false; };<br />
# utility = { shadow = false; };<br />
<br />
== Multihead ==<br />
<br />
If a [[multihead]] configuration is used without xinerama - meaning that X server is started with more than one screen - then compton will start on only one screen by default. It can be started on all screens by using the {{ic|-d}} argument. For example, to run on X screen 0 in the background:<br />
<br />
compton -b -d :0<br />
<br />
The above should work on all monitors, but if it doesn't try an older method that manually specifies each one:<br />
<br />
seq 0 3 | xargs -l1 -I@ compton -b -d :0.@<br />
<br />
== Troubleshooting ==<br />
<br />
The use of compositing effects may on occasion cause issues such as visual glitches when not configured correctly for use with other applications and programs.<br />
<br />
=== Conky ===<br />
<br />
To disable shadows around [[Conky]] windows, have the following in {{ic|~/.conkyrc}}:<br />
<br />
own_window_class conky<br />
<br />
=== dwm | dmenu===<br />
<br />
dwm's statusbar is not detected by any of compton's functions to automatically exclude window manager elements. Neither dwm statusbar nor dmenu have a static window id. If you want to exclude it from inactive window transparency (or other), you'll have to either patch a window class into the source code of each, or exclude by less precise attributes. The following example is with dwm's status on top, which allows a resolution independent of location exclusion:<br />
<br />
$ compton <any other arguments> --focus-exclude "x = 0 && y = 0 && override_redirect = true"<br />
<br />
Otherwise, where using a configuration file:<br />
<br />
focus-exclude = "x = 0 && y = 0 && override_redirect = true";<br />
<br />
The override redirect property seems to be false for most windows- having this in the exclusion rule prevents other windows drawn in the upper left corner from being excluded (for example, when dwm statusbar is hidden, x0 y0 will match whatever is in dwm's master stack).<br />
<br />
=== Firefox ===<br />
<br />
To disable shadows for Firefox elements add the following to shadow-exclude in {{ic|compton.conf}}:<br />
<br />
"class_g = 'Firefox' && argb",<br />
<br />
See [https://github.com/chjj/compton/issues/201#issuecomment-45288510] for more information.<br />
<br />
=== slock ===<br />
<br />
Where inactive window transparency has been enabled (the {{ic|-i}} argument when running as a command), this may provide troublesome results when also using [[slock]]. One solution is to amend the transparency to {{ic|0.2}}. For example, where running compton arguments as a command:<br />
<br />
$ compton <any other arguments> -i 0.2<br />
<br />
Otherwise, where using a configuration file:<br />
<br />
inactive-dim = 0.2;<br />
<br />
Alternatively, you may try to exclude slock by its window id, or by excluding all windows with no name.<br />
<br />
{{Note|Some programs change their id for every new instance, but slock's appears to be static. Someone more knowledgeable will have to confirm that slock's id is in fact static- until then, use at your own risk.}}<br />
<br />
Exclude all windows with no name from compton using the following options:<br />
<br />
$ compton <other arguments> --focus-exclude "! name~=<nowiki>''</nowiki>"<br />
<br />
Find your slock's window id by running the command:<br />
<br />
$ xwininfo & slock<br />
<br />
Quickly click anywhere on the screen (before slock exits), then type your password to unlock. You should see the window id in the output:<br />
<br />
xwininfo: Window id: 0x1800001 (has no name)<br />
<br />
Take the window id and exclude it from compton with:<br />
<br />
$ compton <any other arguments> --focus-exclude 'id = 0x1800001'<br />
<br />
Otherwise, where using a configuration file:<br />
<br />
focus-exclude = "id = 0x1800001";<br />
<br />
=== Corrupted screen contents with Intel graphics ===<br />
<br />
On at least some Intel chipsets, DRI3 is known to cause [https://bugs.freedesktop.org/show_bug.cgi?id=97916 trouble] for compton when the display resolution is changed or a new monitor is connected. This can happen with either the {{ic|intel}} or {{ic|modesetting}} driver. A workaround is to [[Intel graphics#DRI3_issues|disable DRI3]].<br />
<br />
=== Flicker ===<br />
<br />
Applies to fully maximized windows (in sessions without any panels) with the default {{ic|compton.conf}} caused and resolved by the following option:<br />
<br />
unredir-if-possible = false;<br />
<br />
See [https://github.com/chjj/compton/issues/402] for more information.<br />
<br />
=== Fullscreen tearing ===<br />
<br />
If you observe screen tearing of video playback only in fullscreen mode see [[#Flicker]].<br />
<br />
=== Lag when using xft fonts ===<br />
<br />
If you experience heavy lag when using Xft fonts in applications such as [[xterm]] or [[urxvt]] try:<br />
<br />
--xrender-sync --xrender-sync-fence<br />
<br />
Or the xrender backend.<br />
<br />
See [https://github.com/chjj/compton/issues/152] for more information.<br />
<br />
=== Screen artifacts/screenshot issues when using AMD's Catalyst driver ===<br />
<br />
Try running Compton with:<br />
<br />
--backend xrender<br />
<br />
Or add<br />
<br />
backend = "xrender";<br />
<br />
to your {{ic|compton.conf}} file.<br />
<br />
See [https://github.com/chjj/compton/issues/208] for more information.<br />
<br />
=== Tabbed windows ===<br />
<br />
When windows with transparency are tabbed, the underlying tabbed windows are still visible because of transparency. Each tabbed window also draws its own shadow resulting in multiple shadows.<br />
<br />
Removing the multiple shadows issue can be done by adding the following to the already existing [https://projects.archlinux.org/svntogit/community.git/tree/trunk/compton.conf?h=packages/compton#n80 {{ic|shadow-exclude}} list]:<br />
<br />
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"<br />
<br />
Not drawing underlying tabbed windows can be enabled by adding the following to your {{ic|compton.conf}}:<br />
<br />
opacity-rule = [<br />
"95:class_g = 'URxvt' && !_NET_WM_STATE@:32a",<br />
"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"<br />
];<br />
<br />
Note that {{ic|URxvt}} is the Xorg class name of your terminal. Change this if you use a different terminal.<br />
<br />
See [https://www.reddit.com/r/unixporn/comments/330zxl/webmi3_no_more_overlaying_shadows_and_windows_in/] for more information.<br />
<br />
=== Unable to change the background color with xsetroot ===<br />
<br />
Currently, compton is incompatible with {{ic|xsetroot}}'s {{ic|-solid}} option, a workaround is to use {{aur|hsetroot}} to set the background color:<br />
<br />
$ hsetroot -solid '#000000'<br />
<br />
See [https://github.com/chjj/compton/issues/162] for more information.<br />
<br />
== See also ==<br />
<br />
* [http://ubuntuforums.org/showthread.php?t=2144468&p=12644745#post12644745 Howto: Using Compton for tear-free compositing on XFCE or LXDE]</div>Qguvhttps://wiki.archlinux.org/index.php?title=Dnscrypt-proxy&diff=455201Dnscrypt-proxy2016-10-26T04:18:35Z<p>Qguv: /* Configuration */ remind folks to enable the systemd service</p>
<hr />
<div>[[Category:Domain Name System]]<br />
[[Category:Encryption]]<br />
[[es:DNSCrypt]]<br />
[[ja:DNSCrypt]]<br />
[[pt:DNSCrypt]]<br />
[[zh-cn:DNSCrypt]]<br />
[http://dnscrypt.org/ DNSCrypt] encrypts and authenticates DNS traffic between user and DNS resolver. While IP traffic itself is unchanged, it prevents local spoofing of DNS queries, ensuring DNS responses are sent by the server of choice. [https://www.reddit.com/r/sysadmin/comments/2hn435/dnssec_vs_dnscrypt/ckuhcbu]<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|dnscrypt-proxy}} package.<br />
<br />
== Configuration ==<br />
<br />
Select a resolver from {{ic|/usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv}} and [[Systemd#Editing provided units|edit]] {{ic|dnscrypt-proxy.service}}, using the first column as the name of the resolver with the {{ic|-R}} flag. For example, to select ''dnscrypt.eu-nl'' as the resolver, the drop-in file would look like this:<br />
<br />
[Service]<br />
ExecStart=<br />
ExecStart=/usr/bin/dnscrypt-proxy -R dnscrypt.eu-nl<br />
<br />
{{Tip|A potentially more up-to-date list is available directly on the [https://github.com/jedisct1/dnscrypt-proxy/blob/master/dnscrypt-resolvers.csv upstream page].}}<br />
<br />
After selecting a dnscrypt resolver, modify the [[resolv.conf]] file and replace the current set of resolver addresses with address for ''localhost'':<br />
<br />
nameserver 127.0.0.1<br />
<br />
Other programs may overwrite this setting; see [[resolv.conf#Preserve DNS settings]] for details.<br />
<br />
Finally, [[Enable|start and enable]] the {{ic|dnscrypt-proxy.service}}.<br />
<br />
== Tips and tricks ==<br />
<br />
=== DNSCrypt as a forwarder for local DNS cache ===<br />
<br />
It is recommended to run DNSCrypt as a forwarder for a local DNS cache, otherwise every single query will make a round-trip to the upstream resolver. Any local DNS caching program should work, examples below show configuration for [[Unbound]], [[dnsmasq]], and [[pdnsd]].<br />
<br />
First configure ''dnscrypt-proxy'' to listen on a port different from the default {{ic|53}}, since the DNS cache needs to listen on {{ic|53}} and query ''dnscrypt-proxy'' on a different port. Port number {{ic|40}} is used as an example in this section:<br />
<br />
{{hc|# systemctl edit dnscrypt-proxy.socket|2=<br />
[Socket]<br />
ListenStream=<br />
ListenDatagram=<br />
ListenStream=127.0.0.1:40<br />
ListenDatagram=127.0.0.1:40<br />
}}<br />
<br />
{{Note|The {{ic|ListenStream}} and {{ic|ListenDatagram}} options need to be cleared with empty assignment before overriding, otherwise the new address would be ''added'' to the list of sockets. See [[systemd#Editing provided units]] for details.}}<br />
<br />
Then restart {{ic|dnscrypt-proxy.socket}} and ''stop'' {{ic|dnscrypt-proxy.service}} if already running to let it be started by the ''.socket'' unit.<br />
<br />
<br />
==== Example: configuration for Unbound ====<br />
<br />
Configure [[Unbound]] to your liking (in particular, see [[Unbound#Local DNS server]]) and add the following lines to the end of the {{ic|server}} section in {{ic|/etc/unbound/unbound.conf}}:<br />
<br />
do-not-query-localhost: no<br />
forward-zone:<br />
name: "."<br />
forward-addr: 127.0.0.1@40<br />
<br />
{{Tip|If you are setting up a server, add {{ic|interface: 0.0.0.0@53}} and {{ic|access-control: ''your-network''/''subnet-mask'' allow}} inside the {{ic|server:}} section so that the other computers can connect to the server. A client must be configured with {{ic|nameserver ''address-of-your-server''}} in {{ic|/etc/resolv.conf}}.}}<br />
<br />
[[Restart]] {{ic|unbound.service}} to apply the changes.<br />
<br />
==== Example: configuration for dnsmasq ====<br />
<br />
Configure dnsmasq as a [[dnsmasq#DNS cache setup|local DNS cache]]. The basic configuration to work with DNSCrypt:<br />
<br />
{{hc|/etc/dnsmasq.conf|2=<br />
no-resolv<br />
server=127.0.0.1#40<br />
listen-address=127.0.0.1<br />
}}<br />
<br />
If you configured DNSCrypt to use a resolver with enabled DNSSEC validation, make sure to enable it also in dnsmasq:<br />
<br />
{{hc|/etc/dnsmasq.conf|2=<br />
proxy-dnssec<br />
}}<br />
<br />
Restart {{ic|dnsmasq.service}} to apply the changes.<br />
<br />
==== Example: configuration for pdnsd ====<br />
<br />
Install [[pdnsd]]. A basic configuration to work with DNSCrypt is:<br />
<br />
{{hc|/etc/pdnsd.conf|2=<br />
global {<br />
perm_cache = 1024;<br />
cache_dir = "/var/cache/pdnsd";<br />
run_as = "pdnsd";<br />
server_ip = 127.0.0.1;<br />
status_ctl = on;<br />
query_method = udp_tcp;<br />
min_ttl = 15m; # Retain cached entries at least 15 minutes.<br />
max_ttl = 1w; # One week.<br />
timeout = 10; # Global timeout option (10 seconds).<br />
neg_domain_pol = on;<br />
udpbufsize = 1024; # Upper limit on the size of UDP messages.<br />
}<br />
<br />
server {<br />
label = "dnscrypt-proxy";<br />
ip = 127.0.0.1;<br />
port = 40;<br />
timeout = 4;<br />
proxy_only = on;<br />
}<br />
<br />
source {<br />
owner = localhost;<br />
file = "/etc/hosts";<br />
}<br />
}}<br />
<br />
Restart {{ic|pdnsd.service}} to apply the changes.<br />
<br />
=== Enable EDNS0 ===<br />
<br />
[[wikipedia:Extension_mechanisms_for_DNS|Extension Mechanisms for DNS]] that, among other things, allows a client to specify how large a reply over UDP can be.<br />
<br />
Add the following line to your {{ic|/etc/resolv.conf}}:<br />
options edns0<br />
<br />
You may also wish to add the following argument to ''dnscrypt-proxy'':<br />
--edns-payload-size=<bytes><br />
<br />
The default size being '''1252''' bytes, with values up to '''4096''' bytes being purportedly safe. A value below or equal to '''512''' bytes will disable this mechanism, unless a client sends a packet with an OPT section providing a payload size.<br />
<br />
==== Test EDNS0 ====<br />
<br />
Make use of the [https://www.dns-oarc.net/oarc/services/replysizetest DNS Reply Size Test Server], use the ''dig'' command line tool from the {{Pkg|bind-tools}} package to issue a TXT query for the name ''rs.dns-oarc.net'':<br />
$ dig +short rs.dns-oarc.net txt<br />
<br />
With '''EDNS0''' supported, the output should look similar to this:<br />
rst.x3827.rs.dns-oarc.net.<br />
rst.x4049.x3827.rs.dns-oarc.net.<br />
rst.x4055.x4049.x3827.rs.dns-oarc.net.<br />
"2a00:d880:3:1::a6c1:2e89 DNS reply size limit is at least 4055 bytes"<br />
"2a00:d880:3:1::a6c1:2e89 sent EDNS buffer size 4096"<br />
<br />
=== Redundant DNSCrypt providers ===<br />
<br />
{{Style|Needs some tweaks to comply with [[Help:Style]], e.g avoid writing in first person and link to [[enable]], [[start]] and similar instead of explicit systemctl commands.}}<br />
<br />
==== Add new forward address ====<br />
<br />
{{note|Obtaining redundancy requires a simple edit to the above Unbound example and the addition of a second instance of the dnscrypt-proxy and service. Please be sure that the above Unbound example is working prior to proceeding, as this tip extends the previous example.}}<br />
<br />
Extend the previous [[Unbound]] configuration in {{ic|/etc/unbound/unbound.conf}} to include an additional forward address that uses a different port. Port 41 is used in the below example:<br />
<br />
do-not-query-localhost: no<br />
forward-zone:<br />
name: "."<br />
forward-addr: 127.0.0.1@40<br />
forward-addr: 127.0.0.1@41<br />
<br />
==== Create instanced systemd service ====<br />
<br />
We will use an instanced systemd service to accomplish this. This will use one {{ic|dnscrypt-proxy@.service}} systemd service to handle as many distinct DNSCrypt resolves as we want.<br />
<br />
First, we need {{ic|/etc/systemd/system/dnscrypt-proxy@.service}} containing:<br />
<br />
<pre><br />
[Unit]<br />
Description=DNSCrypt client proxy<br />
Documentation=man:dnscrypt-proxy(8)<br />
Requires=dnscrypt-proxy@%i.socket<br />
<br />
[Service]<br />
Type=notify<br />
NonBlocking=true<br />
ExecStart=/usr/sbin/dnscrypt-proxy \<br />
--resolver-name=%i<br />
Restart=always<br />
</pre><br />
<br />
This specifies an instanced systemd service that starts a dnscrypt-proxy using the service name specified after the @ symbol of a corresponding .socket file.<br />
<br />
==== Add first dnscrypt-socket ====<br />
<br />
You can now create two (or more!) socket files, specifying different DNSCrypt providers.<br />
<br />
For the first dnscrypt-proxy socket, listening on 127.0.0.1@40 and connecting to the example dnscrypt.eu-nl provider, copy {{ic|/lib/systemd/system/dnscrypt-proxy.socket}} to {{ic|/etc/systemd/system/dnscrypt-proxy@dnscrypt.eu-nl.socket}}.<br />
<br />
==== Add additional dyscrypt-sockets ====<br />
<br />
For the second (or more) dnscrypt-proxy socket, copy {{ic|/lib/systemd/system/dnscrypt-proxy.socket}} to eg. {{ic|/etc/systemd/system/dnscrypt-proxy@cloudns-syd.socket}}<br />
<br />
Here you can replace the socket instance name to eg. '''cloudns-syd''' as one of those listed in {{ic|providers name}} column in {{ic|/usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv}} and edit it to eg. port 41 and so forth.<br />
<br />
<pre><br />
[Unit]<br />
Description=dnscrypt-proxy-secondary listening socket<br />
<br />
[Socket]<br />
ListenStream=127.0.0.1:41<br />
ListenDatagram=127.0.0.1:41<br />
<br />
[Install]<br />
WantedBy=sockets.target<br />
</pre><br />
<br />
==== Apply new systemd configuration ====<br />
<br />
Now we need to reload the systemd configuration.<br />
<br />
# systemctl daemon-reload<br />
<br />
Since we are replacing the default service with a different name, we need to explicitly [[stop]] and [[disable]] {{ic|dnscrypt-proxy}} and {{ic|dnscrypt-proxy.socket}}.<br />
<br />
Now [[start/enable]] the new sockets, {{ic|dnscrypt-proxy@dnscrypt.eu-nl.socket}} and {{ic|dnscrypt-proxy@cloudns-syd.socket}}.<br />
<br />
Finally [[restart]] {{ic|unbound.service}}<br />
<br />
== Known issues ==<br />
<br />
=== dnscrypt runs with root privileges ===<br />
<br />
See {{Bug|49881}}. To work around this, create an unprivileged user manually.<br />
<br />
[[Users_and_groups#User_management|Create the user]] as follows:<br />
<br />
# useradd -r -d /var/dnscrypt -m -s /sbin/nologin dnscrypt<br />
<br />
[[Systemd#Editing_provided_units|Edit]] {{ic|dnscrypt-proxy.service}}, pointing {{ic|--user}} to the new user:<br />
<br />
[Service]<br />
ExecStart=<br />
ExecStart=/usr/bin/dnscrypt-proxy -R dnscrypt.eu-nl --user=dnscrypt</div>Qguvhttps://wiki.archlinux.org/index.php?title=Kernel/Traditional_compilation&diff=449204Kernel/Traditional compilation2016-09-03T15:47:20Z<p>Qguv: /* Compile the modules */ fix broken link</p>
<hr />
<div>[[Category:Kernel]]<br />
[[fr:Compiler un nouveau noyau]]<br />
[[it:Kernels/Compilation/Traditional]]<br />
[[ja:カーネル/コンパイル/伝統的な方法]]<br />
[[ru:Kernels/Compilation/Traditional]]<br />
[[zh-CN:Kernels/Compilation/Traditional]]<br />
This article is an introduction to building custom kernels from '''kernel.org sources'''. This method of compiling kernels is the traditional method common to all distributions. It can be, depending on your background, more complicated than using the [[Kernels/Arch Build System]]. Consider the [[Arch Build System]] tools are developed and maintained to make repeatable compilation tasks efficient and safe.<br />
<br />
== Preparation ==<br />
<br />
It is not necessary (or recommended) to use the root account or root privileges (i.e. via [[Sudo]]) for kernel preparation.<br />
<br />
=== Install the core packages ===<br />
<br />
Install the {{Grp|base-devel}} package group, which contains necessary packages such as {{Pkg|make}} and {{Pkg|gcc}}. It is also recommended to install the following packages, as listed in the default Arch kernel [https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/linux PKGBUILD]: {{Pkg|xmlto}}, {{Pkg|docbook-xsl}}, {{Pkg|kmod}}, {{Pkg|inetutils}}, {{Pkg|bc}}<br />
<br />
=== Create a kernel compilation directory ===<br />
<br />
It is recommended to create a separate build directory for your kernel(s). In this example, the directory {{ic|kernelbuild}} will be created in the {{ic|home}} directory:<br />
<br />
$ mkdir ~/kernelbuild<br />
<br />
=== Download the kernel source ===<br />
<br />
{{Warning| [[systemd]] requires kernel version 3.11 and above (4.2 and above for unified [[cgroups]] hierarchy support). See {{ic|/usr/share/systemd/README}} for more information.}}<br />
<br />
Download the kernel source from http://www.kernel.org. This should be the [[wikipedia:Tar (computing)|tarball]] ({{ic|tar.xz}}) file for your chosen kernel. <br />
<br />
It can be downloaded by simply right-clicking the {{ic|tar.xz}} link in your browser and selecting {{ic|Save Link As...}}, or any other number of ways via alternative graphical or command-line tools that utilise HTTP, [[Ftp#FTP|FTP]], [[Rsync|RSYNC]], or [[Git]]. <br />
<br />
{{Note| It is a good idea to verify the PGP signature of any downloaded kernel tarball. This ensures that it is legitimate and helps to build the Web of Trust. See [http://kernel.org/signature.html#using-gnupg-to-verify-kernel-signatures kernel.org/signature].}}<br />
<br />
In the following command-line example, {{Pkg|wget}} has been installed and is used inside the {{ic|~/kernelbuild}} directory to obtain kernel 4.7.2:<br />
<br />
$ cd ~/kernelbuild<br />
$ wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.7.2.tar.xz<br />
<br />
If {{ic|wget}} was not used inside the build directory, it will be necessary to move the tarball into it, e.g.<br />
<br />
$ mv /path/to/linux-4.7.2.tar.xz ~/kernelbuild/<br />
<br />
=== Unpack the kernel source ===<br />
<br />
Within the build directory, unpack the kernel tarball:<br />
<br />
$ tar -xvJf linux-4.7.2.tar.xz<br />
<br />
To finalise the preparation, ensure that the kernel tree is absolutely clean; do not rely on the source tree being clean after unpacking. To do so, first change into the new kernel source directory created, and then run the {{ic|make mrproper}} command:<br />
<br />
$ cd linux-4.7.2/<br />
$ make clean && make mrproper<br />
<br />
== Configuration ==<br />
<br />
This is the most crucial step in customizing the default kernel to reflect your computer's precise specifications. Kernel configuration is set in its {{ic|.config}} file, which includes the use of [[Kernel modules]]. <br />
<br />
{{Note| It is not necessary to use the root account or root privileges at this stage.}}<br />
<br />
By setting the options in {{ic|.config}} properly, your kernel and computer will function most efficiently. <br />
<br />
=== Kernel configuration ===<br />
<br />
You can choose from two options to set your kernel configuration:<br />
* A. Use the default Arch settings from an official kernel (recommended)<br />
* B. Generate a configuration file which matches the currently running kernel's configuration. (useful if you want to customize your kernel settings further)<br />
<br />
{{Note| Especially if you choose option **B**, you will be prompted to manually configure your kernel with tools described in {{ic|Advanced Configuration}}.}} <br />
<br />
==== A. Default Arch configuration ====<br />
<br />
This method will create a {{ic|.config}} file for the custom kernel using the default Arch kernel settings. Ensure that a stock Arch kernel is running and use the following command inside the custom kernel source directory:<br />
<br />
$ zcat /proc/config.gz > .config<br />
<br />
{{Warning|If you are compiling a kernel using your current {{ic|.config}} file, do not forget to rename your kernel version in the {{ic| General Setup --->}} option using one of the user interfaces listed later. If you skip this, there is the risk of overwriting one of your existing kernels by mistake.}}<br />
<br />
==== B. Generated configuration ====<br />
<br />
{{tip|Plug in all devices that you expect to use on the system if using this method.}}<br />
<br />
Since kernel 2.6.32, the {{ic|localmodconfig}} command will create a {{ic|.config}} file for the custom kernel by disabling any and all options not currently in use by the running kernel ''at the time''. In other words, it will only enable the options currently being used.<br />
<br />
While this minimalist approach will result in a highly streamlined and efficient configuration tailored specifically for your system, there are drawbacks, such as the potential inability of the kernel to support newer hardware, peripherals, or other features. <br />
<br />
{{Note|Again, ensure that all devices you expect to use have been connected to (and detected by) your system before running the following command}}<br />
<br />
$ make localmodconfig<br />
<br />
=== Advanced configuration ===<br />
<br />
{{Tip|Unless you want to see a lot of extra messages when booting and shutting down with the custom kernel, it is a good idea to deactivate the relevant debugging options.}}<br />
<br />
There are several tools available to fine-tune the kernel configuration, which provide an alternative to otherwise spending hours manually configuring each and every one of the options available during compilation. <br />
<br />
{{Note| Those tools listed below will provide you with three configuration options for each kernel feature: {{ic|y}} for enabled, {{ic|n}} for disabled, and {{ic|m}} for enabled as kernel module (loaded when necessary).}}<br />
<br />
Those tools are:<br />
* {{ic|make menuconfig}}: Command-line ncurses interface superseded by {{ic|nconfig}}<br />
* {{ic|make nconfig}}: Newer ncurses interface for the command-line<br />
* {{ic|make xconfig}}: User-friendly graphical interface that requires {{Pkg|packagekit-qt4}} to be installed as a dependency. This is the recommended method - especially for less experienced users - as it is easier to navigate, and information about each option is also displayed.<br />
* {{ic|make gconfig}}: Graphical configuration similar to xconfig but using gtk.<br />
<br />
The chosen method should be run inside the kernel source directory, and all will either create a new {{ic|.config}} file, or overwrite an existing one where present. All optional configurations will be automatically enabled, although any newer configuration options (i.e. with an older kernel {{ic|.config}}) may not be automatically selected.<br />
<br />
Once the changes have been made save the {{ic|.config}} file. It is a good idea to make a backup copy outside the source directory. You may need to do this multiple times before you get all the options right. <br />
<br />
If unsure, only change a few options between compilations. If you cannot boot your newly built kernel, see the list of necessary config items [https://www.archlinux.org/news/users-of-unofficial-kernels-must-enable-devtmpfs-support/ here]. <br />
<br />
Running {{ic|$ lspci -k #}} from liveCD lists names of kernel modules in use. Most importantly, you must maintain CGROUPS support. This is necessary for [[systemd]].<br />
<br />
== Compilation and installation ==<br />
{{Tip|If you want to have {{Pkg|gcc}} optimize for your processor's instruction sets, edit {{ic|arch/x86/Makefile}} (i686) or {{ic|arch/x86_64/Makefile}} (86_64) within the kernel source directory:<br />
* Look for {{ic|CONFIG_MK8,CONFIG_MPSC,CONFIG_MCORE2,CONFIG_MATOM,CONFIG_GENERIC_CPU}} that you have chosen in {{ic|Processor type and features > Processor Family}}<br />
* Change the call cc-options flag to {{ic|-march<nowiki>=</nowiki>native}} to the one that you have selected in Processor Family, e.g. {{ic|cflags-$(CONFIG_MK8) +<nowiki>=</nowiki> $(call cc-option,-march<nowiki>=</nowiki>native)}}. This is probably the best way to compile with {{ic|-march<nowiki>=</nowiki>native}} as it works.<br />
<br />
* Note: For 32bit Kernels, you need to edit {{ic|arch/x86/Makefile_32.cpu}} instead and set {{ic|-march<nowiki>=</nowiki>native}} for your processor.}}<br />
<br />
=== Compile the kernel ===<br />
Compilation time will vary from as little as fifteen minutes to over an hour, depending on your kernel configuration and processor capability. See [[Makepkg#MAKEFLAGS|Makeflags]] for details. Once the {{ic|.config}} file has been set for the custom kernel, within the source directory run the following command to compile:<br />
<br />
$ make<br />
<br />
=== Compile the modules ===<br />
{{warning|From this step onwards, commands must be either run as root or with root privileges. If not, they will fail.}}<br />
<br />
Once the kernel has been compiled, the modules for it must follow. As root or with root privileges, run the following command to do so:<br />
<br />
# make modules_install<br />
<br />
This will copy the compiled modules into {{ic|/lib/modules/<kernel version>-<config local version>}}. For example, for kernel version 3.18 installed above, they would be copied to {{ic|/lib/modules/3.18.28-ARCH}}. This keeps the modules for individual kernels used separated.<br />
<br />
{{Tip|If your system requires modules which are not distributed with the regular Linux kernel, you need to compile them for your custom kernel when it is finished. Such modules are typically those which you explicitly installed seperately for your running system. See [[NVIDIA#Custom kernel]] for an example.}}<br />
<br />
=== Copy the kernel to /boot directory ===<br />
{{Note|Ensure that the {{ic|bzImage}} kernel file has been copied from the appropriate directory for your system architecture. See below.}}<br />
<br />
The kernel compilation process will generate a compressed {{ic|bzImage}} (big zImage) of that kernel, which must be copied to the {{ic|/boot}} directory and renamed in the process. Provided the name is prefixed with {{ic|vmlinuz-}}, you may name the kernel as you wish. In the examples below, the installed and compiled 3.18 kernel has been copied over and renamed to {{ic|vmlinuz-linux318}}:<br />
<br />
* 32-bit (i686) kernel:<br />
# cp -v arch/x86/boot/bzImage /boot/vmlinuz-linux318<br />
<br />
* 64-bit (x86_64) kernel:<br />
# cp -v arch/x86_64/boot/bzImage /boot/vmlinuz-linux318<br />
<br />
=== Make initial RAM disk ===<br />
{{Note|You are free to name the initramfs image file whatever you wish when generating it. However, it is recommended to use the {{ic|linux<major revision><minor revision>}} convention. For example, the name 'linux318' was given as '3' is the major revision and '18' is the minor revision of the 3.18 kernel. This convention will make it easier to maintain multiple kernels, regularly use mkinitcpio, and build third-party modules.}}<br />
<br />
{{Tip|If you are using the LILO bootloader and it cannot communicate with the kernel device-mapper driver, you have to run {{ic|modprobe dm-mod}} first.}}<br />
<br />
If you do not know what making an initial RAM disk is, see [[wikipedia:Initrd|Initramfs on Wikipedia]] and [[mkinitcpio]]. <br />
<br />
==== Automated preset method ====<br />
An existing [[Mkinitcpio#Image_creation_and_activation|mkinitcpio preset]] can be copied and modified so that the custom kernel initramfs images can be generated in the same way as for an official kernel. This is useful where intending to recompile the kernel (e.g. where updated). In the example below, the preset file for the stock Arch kernel will be copied and modified for kernel 3.18, installed above.<br />
<br />
First, copy the existing preset file, renaming it to match the name of the custom kernel specified as a suffix to {{ic|/boot/vmlinuz-}} when copying the {{ic|bzImage}} (in this case, {{ic|linux318}}):<br />
<br />
# cp /etc/mkinitcpio.d/linux.preset /etc/mkinitcpio.d/linux318.preset<br />
<br />
Second, edit the file and amend for the custom kernel. Note (again) that the {{ic|ALL_kver<nowiki>=</nowiki>}} parameter also matches the name of the custom kernel specified when copying the {{ic|bzImage}}:<br />
<br />
{{hc|/etc/mkinitcpio.d/linux318.preset|<br />
...<br />
ALL_kver<nowiki>=</nowiki>"/boot/vmlinuz-linux318"<br />
...<br />
default_image<nowiki>=</nowiki>"/boot/initramfs-linux318.img"<br />
...<br />
fallback_image<nowiki>=</nowiki>"/boot/initramfs-linux318-fallback.img"}}<br />
<br />
Finally, generate the initramfs images for the custom kernel in the same way as for an official kernel:<br />
<br />
# mkinitcpio -p linux318<br />
<br />
==== Manual method ====<br />
Rather than use a preset file, mkinitcpio can also be used to generate an initramfs file manually. The syntax of the command is:<br />
<br />
# mkinitcpio -k <kernelversion> -g /boot/initramfs-<file name>.img<br />
<br />
* {{ic|-k}} (--kernel <kernelversion>): Specifies the modules to use when generating the initramfs image. The {{ic|<kernelversion>}} name will be the same as the name of the custom kernel source directory (and the modules directory for it, located in {{ic|/usr/lib/modules/}}).<br />
* {{ic|-g}} (--generate <filename>): Specifies the name of the initramfs file to generate in the {{ic|/boot}} directory. Again, using the naming convention mentioned above is recommended.<br />
<br />
For example, the command for the 3.18 custom kernel installed above would be:<br />
<br />
# mkinitcpio -k linux-3.18.28 -g /boot/initramfs-linux318.img<br />
<br />
=== Copy System.map ===<br />
The {{ic|System.map}} file is not required for booting Linux. It is a type of "phone directory" list of functions in a particular build of a kernel. The {{ic|System.map}} contains a list of kernel symbols (i.e function names, variable names etc) and their corresponding addresses. This "symbol-name to address mapping" is used by:<br />
<br />
* Some processes like klogd, ksymoops etc<br />
* By OOPS handler when information has to be dumped to the screen during a kernel crash (i.e info like in which function it has crashed).<br />
<br />
{{Tip| UEFI partitions are formatted using FAT32, which does not support symlinks.}}<br />
<br />
If your {{ic|/boot}} is on a filesystem which supports symlinks (i.e., not FAT32), copy {{ic|System.map}} to {{ic|/boot}}, appending your kernel's name to the destination file. Then create a symlink from {{ic|/boot/System.map}} to point to {{ic|/boot/System.map-YourKernelName}}:<br />
# cp System.map /boot/System.map-YourKernelName<br />
# ln -sf /boot/System.map-YourKernelName /boot/System.map<br />
<br />
After completing all steps above, you should have the following 3 files and 1 soft symlink in your {{ic|/boot}} directory along with any other previously existing files:<br />
* Kernel: {{ic|vmlinuz-YourKernelName}}<br />
* Initramfs: {{ic|Initramfs-YourKernelName.img}}<br />
* System Map: {{ic|System.map-YourKernelName}}<br />
* System Map kernel symlink<br />
<br />
== Bootloader configuration ==<br />
<br />
Add an entry for your new kernel in your bootloader's configuration file - see [[GRUB]], [[LILO]], [[GRUB2]], [[Syslinux]], [[Gummiboot]] or [[REFInd]] for examples. <br />
<br />
{{Tip| Kernel sources include a script to automate the process for LILO: {{ic|$ arch/x86/boot/install.sh}}. Remember to type {{ic|lilo}} as root at the prompt to update it.}}</div>Qguvhttps://wiki.archlinux.org/index.php?title=ZNC&diff=447487ZNC2016-08-23T02:41:06Z<p>Qguv: /* Installation */ no need to give znc a login shell and increase the attack vector.</p>
<hr />
<div>[[Category:Internet Relay Chat]]<br />
{{Related articles start}}<br />
{{Related|PsyBNC}}<br />
{{Related articles end}}<br />
'''ZNC''' is an advanced IRC bouncer that is left connected so an IRC client can disconnect/reconnect without losing the chat session.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{pkg|znc}} package. The installation script will create a group and user '''znc'''. The default home directory for this user is {{ic|/var/lib/znc}}.<br />
<br />
Generate ZNC config as user '''znc'''.<br />
$ sudo -u znc znc --makeconf<br />
Go through the wizard and setup your preferences.<br />
{{warning|Do not edit configuration files manually in a text editor while ZNC is running. There is a very good chance you will lose your configuration. Use the webadmin or controlpanel modules to change settings on-the-fly. They are both included in the package.}}<br />
<br />
[[Enable]] {{ic|znc.service}} to make it start on boot. Start and stop the ZNC daemon as usual with [[systemd]].<br />
<br />
== Configuration ==<br />
Though you can choose to modify your configuration files manually, this requires shutting down the server first. '''Do not edit configuration files while ZNC is running'''.<br />
<br />
=== Webadmin Module ===<br />
If you enabled the web admin module, you can access it at {{ic|http://''yourhostname'':port''}}, the znc port number is the same as you defined for connecting to the bouncer.<br />
<br />
=== Control Panel Module ===<br />
If you enabled the control panel module, {{ic|/msg *controlpanel help}} for a list of settings while you are connected to the server.<br />
<br />
== See also ==<br />
* [http://wiki.znc.in/ZNC ZNC's website]</div>Qguvhttps://wiki.archlinux.org/index.php?title=Tomcat&diff=438227Tomcat2016-06-15T21:22:55Z<p>Qguv: /* Installation */ reworded motivation for and description of tomcat-native</p>
<hr />
<div>[[Category:Web server]]<br />
[[de:Apache Tomcat]]<br />
Tomcat is an open source Java [[wikipedia:Java_Servlet#Servlet_containers|Servlet container]] developed by the Apache Software Foundation. For more information about basic configuration, see:[[Tomcat and Apache]]<br />
<br />
{{Note|Tomcat currently exists under three stable branches: [http://tomcat.apache.org/download-60.cgi 6], [http://tomcat.apache.org/download-70.cgi 7] and [https://tomcat.apache.org/download-80.cgi 8]. None of these version deprecates the preceding. Instead, [http://tomcat.apache.org/whichversion.html#Apache_Tomcat_Versions each branch is the implementation of a couple of the "Servlet" and "JSP" Java standards]. All versions are officially supported in Arch Linux: {{Pkg|tomcat6}}, {{Pkg|tomcat7}} and {{Pkg|tomcat8}}. Check the version you need depending on your web applications requirements. If you just want to try out tomcat or just do not want to spend more time figuring out, there are good chances you will want to try tomcat7. This wiki page refers to tomcat7 but most of its content can be applied to tomcat6 and tomcat8.}}<br />
<br />
== Installation ==<br />
Install one of {{Pkg|tomcat6}}, {{Pkg|tomcat7}}, or {{Pkg|tomcat8}}.<br />
<br />
If deploying Tomcat onto a production environment, consider installing {{Pkg|tomcat-native}}. The native library for Tomcat configures the server to use the Apache Portable Runtime (APR) library's network connection (socket) and RNG implementations. It uses native 32- or 64-bit code to enhance performance and is sometimes used in production environments where speed is crucial. No configuration is necessary for default Tomcat installations. More information is availble in the [http://tomcat.apache.org/native-doc/ official Tomcat docs].<br />
<br />
Using tomcat-native will remove the following warning in {{Ic|catalina.err}}:<br />
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path [...]<br />
<br />
=== Filesystem hierarchy ===<br />
{| class="wikitable"<br />
! Pathname !! Use<br />
|-<br />
|{{ic|/usr/share/tomcat7}} ||Main Tomcat folder containing scripts and links to other directories<br />
|-<br />
|{{ic|/usr/share/java/tomcat7}} ||Tomcat Java libraries (jars)<br />
|-<br />
|{{ic|/etc/tomcat7}} || Configuration files. Among some: {{ic|tomcat-users.xml}} (defines users allowed to use administration tools and their roles), {{ic|server.xml}} (Main Tomcat configuration file), {{ic|catalina.policy}} (security policies configuration file)<br />
|-<br />
||{{ic|/var/log/tomcat7}} ||Log files '''not''' handled by {{Ic|systemd}} (see [[#Logging]])<br />
|-<br />
|{{ic|/var/lib/tomcat7/webapps}}||Where Tomcat deploys your web applications<br />
|-<br />
|{{ic|/var/tmp/tomcat7}} ||Where Tomcat store your webapps' data<br />
|}<br />
<br />
== Initial configuration ==<br />
In order to be able to use the manager webapp and the admin webapp you need to edit the following file:<br />
{{ic|/etc/tomcat7/tomcat-users.xml}}<br />
<br />
Uncomment the "role and user" XML declaration and modify it to enable roles {{Ic|tomcat}}, {{Ic|admin-{gui,script} }} and/or {{Ic|manager-{gui,script,jmx,status} }} depending on your needs (see [http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#Configuring_Manager_Application_Access Configuring Manager Application Access]).<br />
To keep it short, {{Ic|tomcat}} is the mandatory role used to run, {{Ic|manager-*}} are roles able to administer web applications and {{Ic|admin-*}} are full right administrator roles on the Tomcat server.<br />
<br />
Here is a bare configuration file that declares some of these roles along with usernames and passwords (Be sure to change the following [CHANGE_ME] passwords to something secure):<br />
<br />
{{hc|/etc/tomcat7/tomcat-users.xml|2=<br />
<?xml version='1.0' encoding='utf-8'?><br />
<tomcat-users><br />
<role rolename="tomcat"/><br />
<role rolename="manager-gui"/><br />
<role rolename="manager-script"/><br />
<role rolename="manager-jmx"/><br />
<role rolename="manager-status"/><br />
<role rolename="admin-gui"/><br />
<role rolename="admin-script"/><br />
<user username="tomcat" password="'''[CHANGE_ME]'''" roles="tomcat"/><br />
<user username="manager" password="'''[CHANGE_ME]'''" roles="manager-gui,manager-script,manager-jmx,manager-status"/><br />
<user username="admin" password="'''[CHANGE_ME]'''" roles="admin-gui"/><br />
</tomcat-users><br />
}}<br />
<br />
Keep in mind that Tomcat must be restarted each time a modification is made to this file.<br />
<br />
This [http://blog.techstacks.com/2010/07/new-manager-roles-in-tomcat-7-are-wonderful.html blog post] gives a good description of these roles.<br />
<br />
To have read permissions on the configuration files and work well with some IDEs, you must add your user to the tomcat (tomcat6,tomcat7 or tomcat8 depending on your version) group:<br />
gpasswd -a <user> tomcat<number><br />
<br />
== Start/stop Tomcat ==<br />
<br />
You can start Tomcat by running:<br />
systemctl start tomcat7<br />
<br />
Once Tomcat is started, you can visit this page to see the result: [http://localhost:8080 http://localhost:8080]. If a nice Tomcat local home page is displayed this means your Servlet container is up and running and ready to host you web apps. If the startup script failed or you can only see a Java error displayed in you browser, have a look at startup logs using [[Systemd#Journal|systemd's journalctl]]. Google is full of answers on recurrent issues found in Tomcat logs.<br />
<br />
{{Note|To improve security, Arch Linux's Tomcat packages use the [http://commons.apache.org/daemon/jsvc.html jsvc] binary from Apache's [http://commons.apache.org/daemon/ common-daemons]. Tomcat's {{Ic|systemd}} service runs this Apache binary with root privileges which itself starts Tomcat with an underprivileged user ({{Ic|tomcat7:tomcat7}} in Arch Linux). This prevents malicious code that could be executed in a bad web application from causing too much damage. This also enables the use of ports under 1024 if needed. See {{Ic|man jsvc}} for options available and pass them through the {{Ic|CATALINA_OPTS}} environment variable declared in {{ic|/etc/conf.d/tomcat7}}.}}<br />
<br />
<br />
=== Alternate "manual" way ===<br />
<br />
Tomcat can also be controlled directly using upstream scripts:<br />
/usr/share/tomcat/bin/{startup.sh,shutdown.sh,..}<br />
This can be useful to debug applications or even debug Tomcat, but do not use it to start Tomcat for the first time as doing so can set some permissions wrongly and stop web apps from working. In order to be able to use these scripts, some further configuration may be needed. Be aware that using these scripts prevents the jsvc security advantage described above.<br />
<br />
== Deploy and handle web applications ==<br />
<br />
Tomcat 7 is bundled with 5 already deployed web applications (change localhost with your server's FQDN if needed):<br />
* The default home page: [http://localhost:8080/ http://localhost:8080/]<br />
* Tomcat 7's local documentation: [http://localhost:8080/docs/ http://localhost:8080/docs/]<br />
* Examples of Servlets and JSP: [http://localhost:8080/examples/ http://localhost:8080/examples/]<br />
* The host-manager to handle virtual hosts: [http://localhost:8080/host-manager http://localhost:8080/host-manager/]<br />
* The manager to administer web applications: [http://localhost:8080/manager/html http://localhost:8080/manager/html/]<br />
<br />
=== The GUI way ===<br />
Probably the easiest way is to use the manager webapp [http://localhost:8080/manager/html http://localhost:8080/manager/html]. Use the username/password you defined as {{Ic|manager}} in {{ic|tomcat-users.xml}}. Once logged in you can see five already deployed web applications. Add yours through the "Deploy" area and then stop/start/undeploy it with the "Applications" area.<br />
<br />
=== The CLI way ===<br />
One can also just copy the WAR file of the application to directory {{ic|/usr/share/tomcat7/webapps}}. For that later, be sure that the {{Ic|autoDeploy}} option is still set for the right host as shown here:<br />
{{hc|/etc/tomcat7/server.xml|2=<br />
...<br />
<Host name="localhost" appBase="webapps"<br />
unpackWARs="true" '''autoDeploy="true"'''><br />
...<br />
}}<br />
<br />
=== Hosting files outside the webapps folder ===<br />
If you want to keep your project outside the webapps folder this is possible by creating a {{ic|Context}}. <br />
Go to {{ic|/etc/tomcat<number>/Catalina/localhost/}} and create your context. A context is a simple xml file which specifies where tomcat should look for the project. The basic format of the file is<br />
{{hc|/etc/tomcat7/Catalina/localhost/whatShouldFollowLocalhost.xml|2=<br />
<Context path="/whatSholdFollwLocalhost" docBase="/where/your/project/is/" reloadable="true"/><br />
}}<br />
<br />
A working example is as follows. This assumes that the project is hosted somewhere in the users /home-folder.<br />
{{hc|/etc/tomcat7/Catalina/localhost/myProject.xml|2=<br />
<Context path="/myProject" docBase="/home/archie/code/jsp/myProject" reloadable="true"/><br />
}}<br />
The files can now be hosted in {{ic|/home/archie/code/jsp/myProject/}}. To see the project in your webbrowser, go to [http://localhost:8080/myProject http://localhost:8080/myProject].<br />
If tomcat is unable to load the files, it might be an issue with permissions. {{ic|chmod o+x /home/archie/code/jsp/myProject}} should fix the issue.<br />
<br />
== Logging ==<br />
Tomcat when used with official Arch Linux packages uses [[Systemd#Journal|systemd's journalctl]] '''for startup log'''. This means that files {{ic|/var/log/tomcat7/catalina.err}} and {{ic|/var/log/tomcat7/catalina.out}} are '''not''' used. Other logs such as access logs and business logs defined in {{ic|/etc/tomcat7/server.xml}} as {{Ic|Valve}} will still by default end up in {{ic|/var/log/tomcat7/}}.<br />
<br />
To restore upstream style logging, copy systemd file {{ic|/lib/systemd/system/tomcat7.service}} to {{ic|/etc/systemd/system/tomcat7.service}} and change both {{ic|SYSLOG}} for the absolute paths of log files.<br />
<br />
== Further setup ==<br />
Basic configuration can be made through the virtual host manager web application: http://localhost:8080/host-manager/html. Provide the username/password you set in {{ic|tomcat-users.xml}}. Other options are tweaked in configuration files in {{ic|/etc/tomcat7}}, the most important being {{ic|server.xml}}. Using these files is out of the scope of this 101 wiki page. Please have a look at the [http://tomcat.apache.org/tomcat-7.0-doc/index.html official Tomcat 7 documentation] for more details.<br />
<br />
=== Migrating from previous versions of Tomcat ===<br />
As said in the introduction, '''Tomcat 7 does not deprecate Tomcat 6'''. They are all three, implementations of Servlet/JSP standards. Hence you must first determine [http://tomcat.apache.org/whichversion.html#Apache_Tomcat_Versions which version] of Tomcat you need depending on the versions of Servlet/JSP your application uses. If you need to migrate, the official website gives [http://tomcat.apache.org/migration.html instructions on how to handle such a process].<br />
<br />
=== Using Tomcat with a different JRE/JDK ===<br />
Apart from installing the desired JRE/JDK, the only requirement is to set the TOMCAT_JAVA_HOME variable in Tomcat's {{Ic|systemd}} service file.<br />
<br />
The variable can be overridden by a custom configuration, as described in [[Systemd#Editing provided units]]:<br />
# create the directory ''/etc/systemd/system/tomcat7.service.d''<br />
# in that directory, save a ''start.conf'' file with this content (for the Oracle JDK package {{AUR|jdk}}, use instead ''/usr/lib/jvm/java-8-jdk''):<br />
[Service]<br />
Environment=TOMCAT_JAVA_HOME=/usr/lib/jvm/java-8-openjdk<br />
<br />
Alternatively, copy the service file ''/usr/lib/systemd/system/tomcat7.service'', to ''/etc/systemd/system/'' and replace this line:<br />
Environment=TOMCAT_JAVA_HOME=/usr/lib/jvm/java-7-openjdk<br />
by (e.g. for Oracle JDK)<br />
Environment=TOMCAT_JAVA_HOME=/opt/java<br />
<br />
=== Security configuration ===<br />
This page gives the bare minimum to get your first web application to run on Tomcat. It is not intended to be the definitive guide to administering Tomcat (it is a job of its own). The official Tomcat website will provide all necessary official matter. One could also refer to [http://oreilly.com/java/archive/tomcat-tips.html this O'Reilly page] and this [http://www.unidata.ucar.edu/projects/THREDDS/tech/reference/TomcatSecurity.html last one]. <br />
Still, here are some security tips to get you started:<br />
<br />
* Keep your Tomcat installation up to date to get the latest fixes to security issues<br />
* Remove unwanted default applications such as {{Ic|examples}}, {{Ic|docs}}, default home page {{Ic|ROOT}} ("_" in the {{Ic|manager}} webapp). This prevents potential security holes to be exploited. Use the {{Ic|manager}} for that.<br />
<br />
For more security you could even remove the host-manager and manager web applications. Keep in mind that the later is useful to deploy web applications.<br />
<br />
* Disable the WAR auto-deploy option. This would prevent someone who gained restricted access to the server to copy a WAR into the {{ic|/usr/share/java/webapps}} directory to get it running. Edit {{ic|server.xml}} and set the {{Ic|autoDeploy}} to {{Ic|false}}:<br />
{{hc|/etc/tomcat7/server.xml|2=<br />
...<br />
<Host name="localhost" appBase="webapps"<br />
unpackWARs="true" '''autoDeploy="false"'''><br />
...<br />
}}<br />
* Anonymize Tomcat's default error page to prevent potential attackers to retrieve Tomcat's version. To see what Tomcat says by default, just visit an nonexistent page such as [http://localhost:8080/I_dont_exist http://localhost:8080/I_dont_exist]. You get a 404 error page with Tomcat's version at the bottom.<br />
<br />
To anonymize this, edit/open the following JAR (Editors like {{Ic|vim}} can edit zips directly)<br />
/usr/share/tomcat7/lib/catalina.jar<br />
And edit the following file<br />
{{hc|org/apache/catalina/util/ServerInfo.properties|2=<br />
...<br />
server.info=<br />
server.number=<br />
server.built=<br />
...<br />
}}<br />
<br />
* Disable unused {{Ic|connectors}} in {{ic|server.xml}}<br />
* Keep restricted access to {{ic|/etc/tomcat7/server.xml}}. Only {{Ic|tomcat}} user and/or {{Ic|root}} should be able to read and write this.<br />
* Keep {{Ic|jsvc}} usage. Do not use upstream startup scripts unless particular reason as explained in the security note above.<br />
* Use strong different passwords for each user in {{Ic|tomcat-users.xml}}, give roles to users who really need them and even disable usernames/roles you do not use/need.<br />
<br />
One can even crypt {{ic|tomcat-users.xml}} passwords using the following upstream script:<br />
/usr/share/tomcat7/bin/digest.sh -a SHA NEW_PASSWORD<br />
This will output something like:<br />
NEW_PASSWORD:b7bbb48a5b7749f1f908eb3c0c021200c72738ce<br />
Paste the hashed part in place of the clear password in {{ic|tomcat-users.xml}} and add the following to {{ic|server.xml}}:<br />
{{hc|/etc/tomcat7/server.xml|2=<br />
<Host<br />
...<br />
<Realm<br />
...<br />
'''className="org.apache.catalina.realm.MemoryRealm" digest="SHA"'''<br />
...<br />
/><br />
...<br />
/><br />
}}<br />
<br />
Note that this may not be relevant because only root and/or tomcat is supposed to have read/write access to that file. If an intruder manages to gain root access then he would not need such passwords to mess with your applications/data anyway. Be sure to keep restricted RW access to that file!<br />
* Always know what you are deploying</div>Qguvhttps://wiki.archlinux.org/index.php?title=Fonts&diff=432826Fonts2016-04-25T17:05:35Z<p>Qguv: /* Emoji */ add AUR fonts and descriptions</p>
<hr />
<div>[[Category:Fonts]]<br />
[[cs:Fonts]]<br />
[[de:Schriftarten]]<br />
[[es:Fonts]]<br />
[[it:Fonts]]<br />
[[ja:フォント]]<br />
[[ru:Fonts]]<br />
[[tr:Yazıtipleri]]<br />
[[zh-CN:Fonts]]<br />
[[zh-TW:Fonts]]<br />
{{Related articles start}}<br />
{{Related|Font configuration}}<br />
{{Related|Infinality}}<br />
{{Related|Java Runtime Environment Fonts}}<br />
{{Related|Microsoft fonts}}<br />
{{Related articles end}}<br />
<br />
From [[Wikipedia:Computer font|Wikipedia]]:<br />
:''A computer font (or font) is an electronic data file containing a set of glyphs, characters, or symbols such as dingbats.''<br />
<br />
Note that certain font licenses may impose some legal limitations.<br />
<br />
== Font formats ==<br />
<br />
Most computer fonts used today are in either ''bitmap'' or ''outline'' data formats. <br />
;Bitmap fonts: Consist of a matrix of dots or pixels representing the image of each glyph in each face and size.<br />
;Outline or ''vector'' fonts: Use Bézier curves, drawing instructions and mathematical formulae to describe each glyph, which make the character outlines scalable to any size.<br />
<br />
=== Common extensions ===<br />
<br />
* {{ic|bdf}} and {{ic|bdf.gz}} – bitmap fonts, ''b''itmap ''d''istribution ''f''ormat and gzip compressed {{ic|bdf}}<br />
* {{ic|pcf}} and {{ic|pcf.gz}} – bitmaps, ''p''ortable ''c''ompiled ''f''ont and gzip compressed {{ic|pcf}}<br />
* {{ic|psf}}, {{ic|psfu}}, {{ic|psf.gz}} and {{ic|psfu.gz}} – bitmaps, ''P''C ''s''creen ''f''ont, ''P''C ''s''creen ''f''ont ''U''nicode and the gzipped versions (not compatible with X.Org)<br />
* {{ic|pfa}} and {{ic|pfb}} – outline fonts, ''P''ostScript ''f''ont ''A''SCII and ''P''ostScript ''f''ont ''b''inary. PostScript fonts carry built-in printer instructions.<br />
* {{ic|ttf}} – outline, ''T''rue''T''ype ''f''ont. Originally designed as a replacement for the PostScript fonts.<br />
* {{ic|otf}} – outline, ''O''pen''T''ype ''f''ont. TrueType with PostScript typographic instructions.<br />
<br />
For most purposes, the technical differences between TrueType and OpenType can be ignored, some fonts with a {{ic|ttf}} extension are actually OpenType fonts.<br />
<br />
=== Other formats ===<br />
<br />
The typesetting application, ''TeX,'' and its companion font software, ''Metafont,'' render characters using their own methods. Some of the file extensions used for fonts by these two programs are {{ic|*pk}}, {{ic|*gf}}, {{ic|mf}} and {{ic|vf}}.<br />
<br />
''FontForge,'' a font editing application, can store fonts in its native text-based format, {{ic|sfd}}, ''s''pline ''f''ont ''d''atabase.<br />
<br />
The [http://www.w3.org/TR/SVG/fonts.html SVG] format also has its own font description method.<br />
<br />
== Installation ==<br />
<br />
There are various methods for installing fonts.<br />
<br />
=== Pacman ===<br />
<br />
Fonts and font collections in the enabled repositories can be installed using [[pacman]]. Available fonts may be found by using:<br />
$ pacman -Ss font<br />
<br />
Or to search for {{ic|ttf}} fonts only:<br />
$ pacman -Ss ttf<br />
<br />
=== Creating a package ===<br />
<br />
You should give pacman the ability to manage your fonts, which is done by creating an Arch package. These can also be shared with the community in the [[AUR]]. Here is an example of how to create a basic package. To learn more about building packages, read [[PKGBUILD]].<br />
<br />
The family name of a font file can be aquired with the use of {{ic|fc-query}} for example: {{ic|fc-query -f '%{family[0]}\n' /path/to/file}}. The formatting is described in the FcPatternFormat(3) manual.<br />
<br />
{{hc|PKGBUILD|<nowiki><br />
pkgname=fontname-fonts<br />
pkgver=1.0<br />
pkgrel=1<br />
pkgdesc="Some description"<br />
arch=(any)<br />
depends=(fontconfig xorg-font-utils)<br />
source=("http://someurl.org/$pkgname.tar.bz2")<br />
install=$pkgname.install<br />
<br />
package() {<br />
install -Dm644 $pkgname/font.otf "$pkgdir"/usr/share/fonts/family_name/font.otf<br />
install -Dm644 $pkgname/font_bold.otf "$pkgdir"/usr/share/fonts/family_name/font_bold.otf<br />
}<br />
</nowiki>}}<br />
<br />
{{hc|fontname-fonts.install|<nowiki><br />
post_install() {<br />
fc-cache -s<br />
}<br />
<br />
post_upgrade() {<br />
post_install<br />
}<br />
<br />
post_remove() {<br />
post_install<br />
}<br />
</nowiki>}}<br />
<br />
=== Manual installation ===<br />
<br />
The recommended way of adding fonts that are not in the repositories to your system is described in [[#Creating a package]]. This gives pacman the ability to remove or update them at a later time. Fonts can alternately be installed manually as well.<br />
<br />
To install fonts system-wide (available for all users), move the folder to the {{ic|/usr/share/fonts/}} directory. The files need to be readable by every user, use [[chmod]] to set the correct permissions (i.e. at least {{ic|0444}} for files and {{ic|0555}} for directories). To install fonts for only a single user, use {{ic|~/.local/share/fonts}} ({{ic|~/.fonts/}} is now deprecated).<br />
<br />
For Xserver to load fonts directly (as opposed to the use of a ''font server'') the directory for your newly added font must be added with a FontPath entry. This entry is located in the ''Files'' section [[Xorg#Configuration|of your Xorg configuration file]] (e.g. {{ic|/etc/X11/xorg.conf}} or {{ic|/etc/xorg.conf}}). See [[#Older applications]] for more detail.<br />
<br />
Then update the fontconfig font cache: (usually unnecessary as software using the fontconfig library do this.)<br />
<br />
$ fc-cache<br />
<br />
=== Older applications ===<br />
<br />
With older applications that do not support fontconfig (e.g. GTK+ 1.x applications, and {{ic|xfontsel}}) the index will need to be created in the font directory:<br />
<br />
$ mkfontscale<br />
$ mkfontdir<br />
<br />
Or to include more than one folder with one command:<br />
<br />
$ for dir in /font/dir1/ /font/dir2/; do xset +fp $dir; done && xset fp rehash<br />
<br />
Or if fonts were installed in a different sub-folders under the e.g. {{ic|/usr/share/fonts}}:<br />
<br />
$ for dir in * ; do if [ -d "$dir" ]; then cd "$dir";xset +fp "$PWD" ;mkfontscale; mkfontdir;cd .. ;fi; done && xset fp rehash<br />
<br />
At times the X server may fail to load the fonts directory and you will need to rescan all the {{ic|fonts.dir}} files:<br />
<br />
# xset +fp /usr/share/fonts/misc # Inform the X server of new directories<br />
# xset fp rehash # Forces a new rescan<br />
<br />
To check that the font(s) is included:<br />
<br />
$ xlsfonts | grep fontname<br />
<br />
{{note|Many packages will automatically configure Xorg to use the font upon installation. If that is the case with your font, this step is not necessary.}}<br />
<br />
This can also be set globally in {{ic|/etc/X11/xorg.conf}} or {{ic|/etc/X11/xorg.conf.d}}.<br />
<br />
Here is an example of the section that must be added to {{ic|/etc/X11/xorg.conf}}. Add or remove paths based on your particular font requirements.<br />
<br />
# Let X.Org know about the custom font directories<br />
Section "Files"<br />
FontPath "/usr/share/fonts/100dpi"<br />
FontPath "/usr/share/fonts/75dpi"<br />
FontPath "/usr/share/fonts/cantarell"<br />
FontPath "/usr/share/fonts/cyrillic"<br />
FontPath "/usr/share/fonts/encodings"<br />
FontPath "/usr/share/fonts/misc"<br />
FontPath "/usr/share/fonts/truetype"<br />
FontPath "/usr/share/fonts/TTF"<br />
FontPath "/usr/share/fonts/util"<br />
EndSection<br />
<br />
=== Pango Warnings ===<br />
<br />
When [http://www.pango.org/ Pango] is in use on your system it will read from [http://www.freedesktop.org/wiki/Software/fontconfig fontconfig] to sort out where to source fonts.<br />
<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='common'<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='latin'<br />
<br />
If you are seeing errors similar to this and/or seeing blocks instead of characters in your application then you need to add fonts and update the font cache. This example uses the {{Pkg|ttf-liberation}} fonts to illustrate the solution (after successful installation of the package) and runs as root to enable them system-wide.<br />
<br />
# fc-cache<br />
/usr/share/fonts: caching, new cache contents: 0 fonts, 3 dirs<br />
/usr/share/fonts/TTF: caching, new cache contents: 16 fonts, 0 dirs<br />
/usr/share/fonts/encodings: caching, new cache contents: 0 fonts, 1 dirs<br />
/usr/share/fonts/encodings/large: caching, new cache contents: 0 fonts, 0 dirs<br />
/usr/share/fonts/util: caching, new cache contents: 0 fonts, 0 dirs<br />
/var/cache/fontconfig: cleaning cache directory<br />
fc-cache: succeeded<br />
<br />
You can test for a default font being set like so:<br />
<br />
# fc-match<br />
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"<br />
<br />
== Console fonts ==<br />
<br />
{{Note|This section is about the [[Wikipedia:Linux console|Linux console]]. For alternative console solutions offering more features (full Unicode fonts, modern graphics adapters etc.), see [[fbterm]], [[KMSCON]] or similar projects.}}<br />
<br />
By default, the [[Wikipedia:Virtual console|virtual console]] uses the kernel built-in font with a [[Wikipedia:CP437|CP437]] character set,<sup>[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/vt/Makefile#n4]</sup> but this can be easily changed.<br />
<br />
The [[Wikipedia:Linux console|Linux console]] uses UTF-8 encoding by default, but because the standard VGA-compatible framebuffer is used, a console font is limited to either a standard 256, or 512 glyphs. If the font has more than 256 glyphs, the number of colours is reduced from 16 to 8. In order to assign correct symbol to be displayed to the given Unicode value, a special translation map, often called ''unimap'', is needed. Nowadays most of the console fonts have the ''unimap'' built-in, historically it had to be loaded separately.<br />
<br />
The {{Pkg|kbd}} package provides tools to change virtual console font and font mapping. Available fonts are saved in the {{ic|/usr/share/kbd/consolefonts/}} directory, those ending with ''.psfu'' or ''.psfu.gz'' have a Unicode translation map built-in.<br />
<br />
Keymaps, the connection between the key pressed and the character used by the computer, are found in the subdirectories of {{ic|/usr/share/kbd/keymaps/}}, see [[Keyboard configuration in console]] for details.<br />
<br />
{{Note|Replacing the font can cause issues with programs that expect a standard VGA-style font, such as those using line drawing graphics.}}<br />
<br />
=== Previewing and testing ===<br />
<br />
{{Tip|An organized library of images for previewing is available: [http://alexandre.deverteuil.net/pages/consolefonts/ Linux console fonts screenshots].}}<br />
<br />
The available glyphs or letters in the font can also be viewed as a table with using ''showconsolefont'':<br />
<br />
$ showconsolefont<br />
<br />
The ''setfont'' utility may be used to temporarily change the font, so that the user can consider its permanent use. Just pass the name of the font (they are located in {{ic|/usr/share/kbd/consolefonts/}}). For example:<br />
<br />
$ setfont lat2-16 -m 8859-2<br />
<br />
Note that the font name is case-sensitive, so type it ''exactly'' as you see it. If the newly changed font is not suitable, a return to the default font with the following command (even if the console display is totally unreadable, this command will still work, just type the command "blindly"):<br />
<br />
$ setfont<br />
<br />
{{Note|''setfont'' only works on the console currently being used. Any other consoles, active or inactive, remain unaffected.}}<br />
<br />
=== Persistent configuration ===<br />
<br />
The {{ic|FONT}} variable in {{ic|/etc/vconsole.conf}} is used to set the font at boot, persistently for all consoles. See {{ic|man 5 vconsole.conf}} for details.<br />
<br />
For displaying characters such as ''Č, ž, đ, š'' or ''Ł, ę, ą, ś'' using the font {{ic|lat2-16.psfu.gz}}:<br />
<br />
{{hc|/etc/vconsole.conf|2=<br />
...<br />
FONT=lat2-16<br />
FONT_MAP=8859-2<br />
}}<br />
<br />
It means that second part of ISO/IEC 8859 characters are used with size 16. You can change font size using other values (e.g. {{ic|lat2-08}}). For the regions determined by 8859 specification, look at the [[wikipedia:ISO/IEC_8859#The_Parts_of_ISO.2FIEC_8859|Wikipedia table]].<br />
<br />
To use the specified font in early userspace, use the {{ic|consolefont}} hook in {{ic|/etc/mkinitcpio.conf}}. See [[Mkinitcpio#HOOKS]] for more information. <br />
<br />
If the fonts seems to not change on boot, or change only temporarily, it is most likely that they got reset when graphics driver was initialized and console was switched to framebuffer. To avoid this, load your graphics driver earlier. See for example [[Kernel mode setting#Early KMS start]], [https://bbs.archlinux.org/viewtopic.php?id=145765] or other ways to setup your framebuffer before {{ic|/etc/vconsole.conf}} is applied.<br />
<br />
== Font packages ==<br />
<br />
This is a selective list that includes many font packages from the [[AUR]] along with those in the official repositories. Fonts are tagged "Unicode" if they have wide Unicode support, see the project or Wikipedia pages for detail.<br />
<br />
Github user Ternstor has created a python script that generates HTML documents with PNG images of all the fonts in the AUR and the official repositories: [https://github.com/ternstor/distrofonts/blob/master/archfonts.py].<br />
<br />
=== Ancient Scripts ===<br />
<br />
*{{AUR|ttf-ancient-fonts}} - Font containing Unicode symbols for Aegean, Egyptian, Cuneiform, Anatolian, Maya, and Analecta scripts<br />
<br />
=== Braille ===<br />
<br />
*{{Pkg|ttf-ubraille}} - Font containing Unicode symbols for ''braille''<br />
<br />
=== Emoji ===<br />
<br />
A section of the Unicode standard is designated for picotographic characters called "emoji".<br />
<br />
* {{AUR|emojione-color-font}} - a complete, independent, open-source emoji set focused on design correctness<br />
* {{AUR|twemoji-color-font}} - Twitter's open-sourced emoji glyphs<br />
* {{Pkg|ttf-symbola}} - provides many Unicode symbols, including emoji, in outline style<br />
* {{Pkg|noto-fonts-emoji}} - Google's own emoji font, like on Android or Google Hangouts<br />
<br />
Some newer additions to Unicode appear to render poorly with Noto fonts.<br />
<br />
=== International users ===<br />
<br />
Applications and browsers select and display fonts depending upon fontconfig preferences and available font glyph for Unicode text. To list installed fonts for a particular language, issue a command {{ic|<nowiki>fc-list :lang="two letter language code"</nowiki>}}. For instance, to list installed Arabic fonts or fonts supporting Arabic glyph:<br />
{{hc|$ fc-list -f '%{file}\n' :lang&#61;ar|2=<br />
<nowiki><br />
/usr/share/fonts/TTF/FreeMono.ttf<br />
/usr/share/fonts/TTF/DejaVuSansCondensed.ttf<br />
/usr/share/fonts/truetype/custom/DroidKufi-Bold.ttf<br />
/usr/share/fonts/TTF/DejaVuSansMono.ttf<br />
/usr/share/fonts/TTF/FreeSerif.ttf<br />
</nowiki><br />
}}<br />
<br />
To properly render fonts for multilingual websites like Wikipedia or this Arch Linux wiki, install one of the following sets of packages:<br />
* Google's [http://www.google.com/get/noto/ Noto] is a font family that aims to support all languages. [[Install]] it with the {{Pkg|noto-fonts}}, {{Pkg|noto-fonts-cjk}} and {{Pkg|noto-fonts-emoji}} packages.<br />
* An alternative set of fonts which has a good coverage of languages is {{Pkg|ttf-freefont}} with {{Pkg|ttf-arphic-uming}} and {{Pkg|ttf-baekmuk}}.<br />
<br />
==== Arabic & Urdu ====<br />
<br />
* {{AUR|ttf-qurancomplex-fonts}} - Fonts by King Fahd Glorious Quran Printing Complex in al-Madinah al-Munawwarah<br />
* {{AUR|ttf-amiri}} - A classical Arabic typeface in Naskh style poineered by Amiria Press<br />
* {{AUR|ttf-sil-lateef}} - Unicode Arabic font from SIL<br />
* {{AUR|ttf-sil-scheherazade}} - Unicode Arabic font from SIL<br />
* {{AUR|ttf-arabeyes-fonts}} - Collection of free Arabic fonts<br />
* {{AUR|ttf-urdufonts}} - Urdu fonts (Jameel Noori Nastaleeq (+kasheeda), Nafees Web Naskh, PDMS Saleem Quran Font) and font configuration to set Jameel Noori Nastaleeq as default font for Urdu<br />
<br />
==== Persian ====<br />
<br />
* {{AUR|ttf-irfonts}} - Iran Supreme Council of Information and Communication Technology (SCICT) standard Persian fonts series.<br />
* {{AUR|ttf-borna}} - Borna Rayaneh Persian B font series.<br />
* {{AUR|ttf-sina}} - Sina Pardazesh Persian font series.<br />
* {{AUR|ttf-x2}} - Free fonts with support for Persian, Arabic, Urdu, Pashto, Dari, Uzbek, Kurdish, Uighur, old Turkish (Ottoman) and modern Turkish (Roman).<br />
* {{AUR|ttf-iran-nastaliq}} - A free Unicode calligraphic Persian font created by Iran Supreme Council of Information and Communication Technology (SCICT).<br />
<br />
==== Burmese ====<br />
<br />
* {{AUR|ttf-my-paduk}} - Padauk font for Myanmar/Birmania<br />
* {{AUR|ttf-myanmar-fonts}} - 121 Fonts from myordbok.com<br />
<br />
==== Chinese, Japanese, Korean, Vietnamese ====<br />
<br />
===== Pan-CJK =====<br />
* {{Pkg|noto-fonts-cjk}} - Large collection of fonts which comprehensively support Simplified Chinese, Traditional Chinese, Japanese, and Korean, with a consistent design and look. It is currently a rebadged version of {{Pkg|adobe-source-han-sans-otc-fonts}}.<br />
* {{Pkg|adobe-source-han-sans-otc-fonts}} - Large collection of fonts which comprehensively support Simplified Chinese, Traditional Chinese, Japanese, and Korean, with a consistent design and look.<br />
<br />
===== (Mainly) Chinese =====<br />
<br />
* {{Pkg|adobe-source-han-sans-cn-fonts}} - Simplified Chinese OpenType/CFF fonts<br />
* {{Pkg|adobe-source-han-sans-tw-fonts}} - Traditional Chinese OpenType/CFF fonts<br />
* {{Pkg|wqy-microhei}} - A Sans-Serif style high quality CJKV outline font.<br />
* {{Pkg|wqy-zenhei}} - Hei Ti Style (sans-serif) Chinese Outline font embedded with bitmapped Song Ti (also supporting Japanese (partial) and Korean characters).<br />
* {{Pkg|ttf-arphic-ukai}} - ''Kaiti'' (brush stroke) Unicode font (enabling anti-aliasing is suggested)<br />
* {{Pkg|ttf-arphic-uming}} - ''Mingti'' (printed) Unicode font<br />
* {{Pkg|opendesktop-fonts}} - ''New Sung'' font, previously is ttf-fireflysung package<br />
* {{Pkg|wqy-bitmapfont}} - Bitmapped Song Ti (serif) Chinese font<br />
* {{Pkg|ttf-hannom}} - Chinese and Vietnamese TrueType font<br />
* {{AUR|ttf-i.bming}} - CJK serif font that emphasis on an old-style typeface<br />
* {{AUR|ttf-tw}} - Kai and Song traditional Chinese font from the Ministry of Education of Taiwan<br />
<br />
===== Japanese =====<br />
<br />
* {{Pkg|adobe-source-han-sans-jp-fonts}} - Japanese OpenType/CFF fonts<br />
* {{Pkg|otf-ipafont}} - Formal style Japanese Gothic (sans-serif) and Mincho (serif) fonts set; one of the highest quality open source font. Default of openSUSE-ja.<br />
* {{Pkg|ttf-sazanami}} - Japanese free TrueType font. This is outdated and not maintained any more, but may be defined as a fallback font on several environments.<br />
* {{Pkg|ttf-hanazono}} - A free Japanese kanji font, style Mincho (serif).<br />
* {{AUR|ttf-vlgothic}} - Japanese Gothic fonts. Default of Debian/Fedora/Vine Linux<br />
* {{AUR|ttf-mplus}} - Modern Gothic style Japanese outline fonts. It includes all of Japanese Hiragana/Katakana, Basic Latin, Latin-1 Supplement, Latin Extended-A, IPA Extensions and most of Japanese Kanji, Greek, Cyrillic, Vietnamese with 7 weights (proportional) or 5 weights (monospace).<br />
* {{AUR|ttf-koruri}} - Japanese TrueType font obtained by mixing {{AUR|ttf-mplus}} and Open Sans<br />
* {{AUR|ttf-monapo}} - Japanese fonts to show [[wikipedia:2channel_Shift_JIS_art|2channel Shift JIS art]] properly.<br />
<br />
===== Korean =====<br />
<br />
* {{Pkg|adobe-source-han-sans-kr-fonts}} - Korean OpenType/CFF fonts<br />
* {{Pkg|ttf-baekmuk}} - Collection of Korean TrueType fonts<br />
* {{AUR|ttf-nanum}} - Nanum series TrueType fonts<br />
* {{AUR|ttf-nanumgothic_coding}} - Nanum series fixed width TrueType fonts<br />
* {{AUR|ttf-d2coding}} - D2Coding fixed width TrueType font made by Naver<br />
* {{AUR|spoqa-han-sans}} - Source Han Sans customized by Spoqa<br />
<br />
==== Cyrillic ====<br />
<br />
See also [[#Monospaced]], [[#Sans-serif]] and [[#Serif]].<br />
<br />
* {{AUR|otf-russkopis}} - A free OpenType cursive font for Cyrillic script<br />
* {{AUR|ttf-paratype}} - Font family by ParaType: sans, serif, mono, extended cyrillic and latin, OFL license<br />
<br />
==== Greek ====<br />
<br />
Almost all Unicode fonts contain the Greek character set (polytonic included). Some additional font packages, which might not contain the complete Unicode set but utilize high quality Greek (and Latin, of course) typefaces are:<br />
<br />
* {{AUR|otf-gfs}} - Selection of OpenType fonts from the Greek Font Society<br />
* {{AUR|ttf-mgopen}} - Professional TrueType fonts from Magenta<br />
<br />
==== Hebrew ====<br />
<br />
* {{AUR|culmus}} - Nice collection of free Hebrew fonts<br />
<br />
==== Indic ====<br />
<br />
* {{Pkg|ttf-freebanglafont}} - Font for Bangla<br />
* {{Pkg|ttf-indic-otf}} - Indic OpenType Fonts collection (containing ttf-freebanglafont)<br />
: (This one contains a "look of disapproval" that might be more to your liking than the {{Pkg|bdf-unifont}} one mentioned elsewhere in this document)<br />
* {{AUR|lohit-fonts}} - Indic TrueType fonts from Fedora Project (containing Oriya Fonts and more)<br />
* {{AUR|ttf-devanagarifonts}} - Devanagari TrueType fonts (contains 283 fonts)<br />
* {{AUR|ttf-gujrati-fonts}} - TTF Gujarati fonts (Avantika,Gopika,Shree768)<br />
* {{AUR|ttf-gurmukhi-fonts_sikhnet}} - TrueType Gurmukhi fonts (gurbaniwebthick,prabhki)<br />
* {{AUR|ttf-gurmukhi_punjabi}} - TTF Gurmukhi / Punjabi (contains 252 fonts)<br />
* {{AUR|ttf-kannada-font}} - Kannada, the language of Karnataka state in India<br />
* {{AUR|ttf-tamil}} - Tamil Unicode fonts<br />
<br />
==== Khmer ====<br />
<br />
* {{Pkg|ttf-khmer}} - Font covering glyphs for Khmer language<br />
* [https://www.google.com/fonts/specimen/Hanuman Hanuman] ({{AUR|ttf-google-fonts-git}})<br />
<br />
==== Lao ====<br />
<br />
* {{AUR|ttf-lao}} - Lao TTF font (Phetsarath_OT)<br />
* {{AUR|ttf-lao-fonts}} - Lao TTF fonts, both Unicode and non-Unicode for Windows<br />
<br />
==== Sinhala ====<br />
<br />
* {{AUR|ttf-lklug}} - Sinhala Unicode font<br />
<br />
==== Thai ====<br />
<br />
* {{Pkg|ttf-tlwg}} - Collection of scalable Thai fonts<br />
<br />
==== Tibetan ====<br />
<br />
* {{Pkg|ttf-tibetan-machine}} - Tibetan Machine TTFont<br />
<br />
=== Math ===<br />
<br />
* {{Pkg|font-mathematica}} - Mathematica fonts by Wolfram Research, Inc.<br />
* {{AUR|ttf-mathtype}} - MathType fonts<br />
* {{AUR|ttf-computer-modern-fonts}}, {{AUR|otf-cm-unicode}} - [[wikipedia:Computer Modern|Computer Modern]] (of TeX fame)<br />
* {{AUR|otf-xits}} - An OpenType implementation of [[Wikipedia:STIX Fonts project|STIX Fonts]] with math support<br />
<br />
=== Microsoft fonts ===<br />
<br />
See [[Microsoft fonts]].<br />
<br />
=== Apple OS X fonts ===<br />
<br />
* {{AUR|ttf-mac-fonts}} - Mac OS X TrueType fonts<br />
<br />
=== Monospaced ===<br />
<br />
Here are some suggestions. Every user has their own favorite, so experiment to find yours. <br />
If you are in a hurry, you read Dan Benjamin's blog post: [http://hivelogic.com/articles/top-10-programming-fonts ''Top 10 Programming Fonts''].<br />
<br />
Here is a long list of fonts by Trevor Lowing: http://www.lowing.org/fonts/.<br />
<br />
A comparison with images on Slant: [http://www.slant.co/topics/67/~what-are-the-best-programming-fonts What are the best programming fonts?]<br />
<br />
And a Stack Overflow question with some images: [http://stackoverflow.com/questions/4689/recommended-fonts-for-programming Recommended fonts for programming]<br />
<br />
==== TrueType ====<br />
<br />
* [[Wikipedia:Andalé Mono|Andalé Mono]] ({{AUR|ttf-ms-fonts}})<br />
* [http://www.marksimonson.com/fonts/view/anonymous-pro Anonymous Pro] ({{pkg|ttf-anonymous-pro}}, included in {{AUR|ttf-google-fonts-git}})<br />
* [[Wikipedia:Bitstream Vera|Bitstream Vera Mono]] ({{Pkg|ttf-bitstream-vera}})<br />
* [[Wikipedia:Consolas|Consolas]] ({{AUR|ttf-vista-fonts}}) - Windows programming font<br />
* [[Wikipedia:Courier New|Courier New]] ({{AUR|ttf-ms-fonts}})<br />
* Cousine ({{AUR|ttf-chromeos-fonts}} or {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS replacement for Courier New (metric-compatible)<br />
* [[Wikipedia:DejaVu fonts|DejaVu Sans Mono]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
* [[Wikipedia:Droid (font)|Droid Sans Mono]] ({{Pkg|ttf-droid}}, included in {{AUR|ttf-google-fonts-git}})<br />
* [https://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released Envy Code R] ({{AUR|ttf-envy-code-r}})<br />
* Fantasque Sans Mono ({{AUR|ttf-fantasque-sans}} or {{AUR|ttf-fantasque-sans-git}})<br />
* [[Wikipedia:GNU FreeFont|FreeMono]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [[Wikipedia:Inconsolata|Inconsolata]] ({{Pkg|ttf-inconsolata}}, included in {{AUR|ttf-google-fonts-git}}) - Excellent programming font<br />
* [[Wikipedia:Inconsolata|Inconsolata-g]] ({{AUR|ttf-inconsolata-g}}) - adds some programmer-friendly modifications<br />
* [[Wikipedia:Liberation fonts|Liberation Mono]] ({{Pkg|ttf-liberation}}) - Replacement for Courier New, based on Cousine (metric-compatible)<br />
* [[Wikipedia:Lucida Typewriter|Lucida Typewriter]] (included in package {{AUR|jre}})<br />
* [[Wikipedia:Monaco (typeface)|Monaco]] ({{AUR|ttf-monaco}}) - Popular programming font on OSX/Textmate<br />
* Monofur ({{AUR|ttf-monofur}})<br />
* [[Wikipedia:Source_Code_Pro|Source Code Pro]] ({{pkg|adobe-source-code-pro-fonts}})<br />
<br />
==== Bitmap ====<br />
<br />
* Default 8x16<br />
* Dina ({{Pkg|dina-font}})<br />
* [http://font.gohu.org/ Gohu] ({{AUR|gohufont}})<br />
* Lime ({{Pkg|artwiz-fonts}})<br />
* [[Wikipedia:ProFont|ProFont]] ({{Pkg|profont}})<br />
* [[Wikipedia:Proggy Programming Fonts|Proggy Programming Fonts]] ({{AUR|proggyfonts}})<br />
* Tamsyn ({{Pkg|tamsyn-font}})<br />
* [http://terminus-font.sourceforge.net/ Terminus] ({{Pkg|terminus-font}})<br />
* [https://github.com/lucy/tewi-font Tewi] ({{AUR|bdf-tewi-git}})<br />
* Unifont (glyphs like (look of disapproval)) ({{Pkg|bdf-unifont}})<br />
<br />
=== Sans-serif ===<br />
<br />
* [http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=andika Andika] ({{AUR|ttf-andika}})<br />
* [[Wikipedia:Arial|Arial]] ({{AUR|ttf-ms-fonts}})<br />
* [[Wikipedia:Arial Black|Arial Black]] ({{AUR|ttf-ms-fonts}})<br />
* Arimo ({{AUR|ttf-chromeos-fonts}} or {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS replacement for Arial (metric-compatible)<br />
* [[Wikipedia:Calibri|Calibri]] ({{AUR|ttf-vista-fonts}})<br />
* [[Wikipedia:Candara|Candara]] ({{AUR|ttf-vista-fonts}})<br />
* [[Wikipedia:Corbel (typeface)|Corbel]] ({{AUR|ttf-vista-fonts}})<br />
* [[Wikipedia:DejaVu fonts|DejaVu Sans]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
* [[Wikipedia:Droid (font)|Droid Sans]] ({{Pkg|ttf-droid}}, included in {{AUR|ttf-google-fonts-git}})<br />
* [[Wikipedia:GNU FreeFont|FreeSans]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [[Wikipedia:Impact (typeface)|Impact]] ({{AUR|ttf-ms-fonts}})<br />
* [[Wikipedia:Liberation fonts|Liberation Sans]] ({{Pkg|ttf-liberation}}) Replacement for Arial, based on Arimo (metric-compatible)<br />
* [[Wikipedia:Linux Libertine|Linux Biolinum]] ({{Pkg|ttf-linux-libertine}})<br />
* [[Wikipedia:Lucida Sans|Lucida Sans]] ({{AUR|ttf-ms-fonts}})<br />
* [[Wikipedia:Microsoft Sans Serif|Microsoft Sans Serif]] ({{AUR|ttf-ms-fonts}})<br />
* [[Wikipedia:PT Sans|PT Sans]] ({{AUR|ttf-google-fonts-git}}) - 3 major variations: normal, narrow, and caption - Unicode: Latin, Cyrillic<br />
* [[Wikipedia:Source Sans Pro|Source Sans Pro]] ({{pkg|adobe-source-sans-pro-fonts}})<br />
* [[Wikipedia:Tahoma (typeface)|Tahoma]] ({{AUR|ttf-tahoma}})<br />
* [[Wikipedia:Trebuchet MS|Trebuchet]] ({{AUR|ttf-ms-fonts}})<br />
* [[Wikipedia:Ubuntu Font Family|Ubuntu Font Family]] ({{Pkg|ttf-ubuntu-font-family}})<br />
* [[Wikipedia:Verdana|Verdana]] ({{AUR|ttf-ms-fonts}})<br />
<br />
=== Script ===<br />
<br />
* [[Wikipedia:Comic Sans|Comic Sans]] ({{AUR|ttf-ms-fonts}})<br />
<br />
=== Serif ===<br />
<br />
* [[Wikipedia:Cambria (typeface)|Cambria]] ({{AUR|ttf-vista-fonts}})<br />
* [[Wikipedia:Constantia (typeface)|Constantia]] ({{AUR|ttf-vista-fonts}})<br />
* [[Wikipedia:DejaVu fonts|DejaVu Serif]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
* [[Wikipedia:Droid (font)|Droid Serif]] ({{Pkg|ttf-droid}}, included in {{AUR|ttf-google-fonts-git}})<br />
* [[Wikipedia:GNU FreeFont|FreeSerif]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [[Wikipedia:Gentium|Gentium]] ({{Pkg|ttf-gentium}}) - Unicode: Latin, Greek, Cyrillic, Phonetic Alphabet<br />
* [[Wikipedia:Georgia (typeface)|Georgia]] ({{AUR|ttf-ms-fonts}})<br />
* [[Wikipedia:Liberation fonts|Liberation Serif]] ({{Pkg|ttf-liberation}}) - Replacement for Times New Roman, based on Tinos (metric-compatible)<br />
* [[Wikipedia:Linux Libertine|Linux Libertine]] ({{Pkg|ttf-linux-libertine}}) - Unicode: Latin, Greek, Cyrillic, Hebrew<br />
* [[Wikipedia:Times New Roman|Times New Roman]] ({{AUR|ttf-ms-fonts}})<br />
* Tinos ({{AUR|ttf-chromeos-fonts}} or {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS replacement for Times New Roman (metric-compatible)<br />
<br />
=== Unsorted ===<br />
<br />
{{Style|This section should be absorbed into the Monospace/Serif/Sans-Serif structure}}<br />
<br />
* {{AUR|ttf-google-fonts-git}} - a huge collection of free fonts (including ubuntu, inconsolata, droid, etc.) - Note: Your font dialog might get very long as >100 fonts will be added.<br />
* {{Pkg|ttf-mph-2b-damase}} - Covers full plane 1 and several scripts<br />
* {{Pkg|ttf-symbola}} - Provides emoji and many many other symbols<br />
* {{Pkg|font-bh-ttf}} - X.Org Luxi fonts<br />
* {{Pkg|ttf-cheapskate}} - Font collection from ''dustismo.com''<br />
* {{Pkg|ttf-junicode}} - Junius font containing almost complete medieval latin script glyphs<br />
* {{Pkg|xorg-fonts-type1}} - IBM Courier and Adobe Utopia sets of [[Wikipedia:PostScript fonts|PostScript fonts]]<br />
* {{AUR|all-repository-fonts}} - Meta package for all fonts in the official repositories.<br />
<br />
== Fallback font order with X11 ==<br />
<br />
Fontconfig automatically chooses a font that matches the current requirement. That is to say, if one is looking at a window containing English and Chinese for example, it will switch to another font for the Chinese text if the default one does not support it.<br />
<br />
Fontconfig lets every user configure the order they want via {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}.<br />
If you want a particular Chinese font to be selected after your favorite Serif font, your file would look like this:<br />
<br />
<?xml version="1.0"?><br />
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"><br />
<fontconfig><br />
<alias><br />
<family>serif</family><br />
<prefer><br />
<family>Your favorite Latin Serif font name</family><br />
<family>Your Chinese font name</family><br />
</prefer><br />
</alias><br />
</fontconfig><br />
<br />
{{Tip|If you use a Chinese locale, set {{ic|LC_LANG}} to {{ic|und}} to make this work. Otherwise both English and Chinese text will be rendered in the Chinese font.}}<br />
<br />
You can add a section for sans-serif and monospace as well. For more informations, have a look at the fontconfig manual.<br />
<br />
See also: [[Font_configuration|Replace_or_set_default_fonts]]<br />
<br />
== Font alias ==<br />
<br />
There are several font aliases which represent other fonts in order that applications may use similar fonts. The most common aliases are: {{ic|serif}} for a font of the serif type (e.g. DejaVu Serif); {{ic|sans-serif}} for a font of the sans-serif type (e.g. DejaVu Sans); and {{ic|monospace}} for a monospaced font (e.g. DejaVu Sans Mono). However, the fonts which these aliases represent may vary and the relationship is often not shown in font management tools, such as those found in [[KDE]] and other [[desktop environments]].<br />
<br />
To reverse an alias and find which font it is representing, run:<br />
<br />
{{hc|$ fc-match monospace|<br />
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"<br />
}}<br />
<br />
In this case, {{ic|DejaVuSansMono.ttf}} is the font represented by the monospace alias.<br />
<br />
== Tips and tricks ==<br />
<br />
=== List all installed fonts ===<br />
<br />
You can use the following command to list all installed fonts that are available on your system. <br />
<br />
$ fc-list<br />
<br />
=== Set terminal font on-the-fly ===<br />
<br />
{{Expansion|Which terminals specifically support this method? Where is the documentation for the escape codes?}}<br />
<br />
For terminal emulators that use {{ic|Xresources}}, fonts can be set by using escape sequences. Specifically, echo {{ic|\033]710;$font\007}} to change the normal font ({{ic|*font}} in {{ic|~/.Xresources}}), and replace {{ic|710}} with {{ic|711}}, {{ic|712}}, and {{ic|713}} to change the {{ic|*boldFont}}, {{ic|*italicFont}}, and {{ic|*boldItalicFont}}, respectively.<br />
<br />
{{ic|$font}} can be anything the terminal emulator will support.<br />
<br />
=== Application-specific font cache ===<br />
<br />
Matplotlib ({{pkg|python-matplotlib}} or {{pkg|python2-matplotlib}}) uses its own font cache, so after updating fonts, be sure to remove {{ic|$HOME/.matplotlib/fontList.cache}}, <br />
{{ic|$HOME/.cache/matplotlib/fontList.cache}}, {{ic|$HOME/.sage/matplotlib-1.2.1/fontList.cache}}, etc. so it will regenerate its cache and find the new fonts [http://matplotlib.1069221.n5.nabble.com/getting-matplotlib-to-recognize-a-new-font-td40500.html].<br />
<br />
== See also ==<br />
<br />
* [http://behdad.org/text/ State of Text Rendering]</div>Qguvhttps://wiki.archlinux.org/index.php?title=Fonts&diff=432824Fonts2016-04-25T16:56:40Z<p>Qguv: /* Emoji */ format emoji fonts as a list to match the rest of the page</p>
<hr />
<div>[[Category:Fonts]]<br />
[[cs:Fonts]]<br />
[[de:Schriftarten]]<br />
[[es:Fonts]]<br />
[[it:Fonts]]<br />
[[ja:フォント]]<br />
[[ru:Fonts]]<br />
[[tr:Yazıtipleri]]<br />
[[zh-CN:Fonts]]<br />
[[zh-TW:Fonts]]<br />
{{Related articles start}}<br />
{{Related|Font configuration}}<br />
{{Related|Infinality}}<br />
{{Related|Java Runtime Environment Fonts}}<br />
{{Related|Microsoft fonts}}<br />
{{Related articles end}}<br />
<br />
From [[Wikipedia:Computer font|Wikipedia]]:<br />
:''A computer font (or font) is an electronic data file containing a set of glyphs, characters, or symbols such as dingbats.''<br />
<br />
Note that certain font licenses may impose some legal limitations.<br />
<br />
== Font formats ==<br />
<br />
Most computer fonts used today are in either ''bitmap'' or ''outline'' data formats. <br />
;Bitmap fonts: Consist of a matrix of dots or pixels representing the image of each glyph in each face and size.<br />
;Outline or ''vector'' fonts: Use Bézier curves, drawing instructions and mathematical formulae to describe each glyph, which make the character outlines scalable to any size.<br />
<br />
=== Common extensions ===<br />
<br />
* {{ic|bdf}} and {{ic|bdf.gz}} – bitmap fonts, ''b''itmap ''d''istribution ''f''ormat and gzip compressed {{ic|bdf}}<br />
* {{ic|pcf}} and {{ic|pcf.gz}} – bitmaps, ''p''ortable ''c''ompiled ''f''ont and gzip compressed {{ic|pcf}}<br />
* {{ic|psf}}, {{ic|psfu}}, {{ic|psf.gz}} and {{ic|psfu.gz}} – bitmaps, ''P''C ''s''creen ''f''ont, ''P''C ''s''creen ''f''ont ''U''nicode and the gzipped versions (not compatible with X.Org)<br />
* {{ic|pfa}} and {{ic|pfb}} – outline fonts, ''P''ostScript ''f''ont ''A''SCII and ''P''ostScript ''f''ont ''b''inary. PostScript fonts carry built-in printer instructions.<br />
* {{ic|ttf}} – outline, ''T''rue''T''ype ''f''ont. Originally designed as a replacement for the PostScript fonts.<br />
* {{ic|otf}} – outline, ''O''pen''T''ype ''f''ont. TrueType with PostScript typographic instructions.<br />
<br />
For most purposes, the technical differences between TrueType and OpenType can be ignored, some fonts with a {{ic|ttf}} extension are actually OpenType fonts.<br />
<br />
=== Other formats ===<br />
<br />
The typesetting application, ''TeX,'' and its companion font software, ''Metafont,'' render characters using their own methods. Some of the file extensions used for fonts by these two programs are {{ic|*pk}}, {{ic|*gf}}, {{ic|mf}} and {{ic|vf}}.<br />
<br />
''FontForge,'' a font editing application, can store fonts in its native text-based format, {{ic|sfd}}, ''s''pline ''f''ont ''d''atabase.<br />
<br />
The [http://www.w3.org/TR/SVG/fonts.html SVG] format also has its own font description method.<br />
<br />
== Installation ==<br />
<br />
There are various methods for installing fonts.<br />
<br />
=== Pacman ===<br />
<br />
Fonts and font collections in the enabled repositories can be installed using [[pacman]]. Available fonts may be found by using:<br />
$ pacman -Ss font<br />
<br />
Or to search for {{ic|ttf}} fonts only:<br />
$ pacman -Ss ttf<br />
<br />
=== Creating a package ===<br />
<br />
You should give pacman the ability to manage your fonts, which is done by creating an Arch package. These can also be shared with the community in the [[AUR]]. Here is an example of how to create a basic package. To learn more about building packages, read [[PKGBUILD]].<br />
<br />
The family name of a font file can be aquired with the use of {{ic|fc-query}} for example: {{ic|fc-query -f '%{family[0]}\n' /path/to/file}}. The formatting is described in the FcPatternFormat(3) manual.<br />
<br />
{{hc|PKGBUILD|<nowiki><br />
pkgname=fontname-fonts<br />
pkgver=1.0<br />
pkgrel=1<br />
pkgdesc="Some description"<br />
arch=(any)<br />
depends=(fontconfig xorg-font-utils)<br />
source=("http://someurl.org/$pkgname.tar.bz2")<br />
install=$pkgname.install<br />
<br />
package() {<br />
install -Dm644 $pkgname/font.otf "$pkgdir"/usr/share/fonts/family_name/font.otf<br />
install -Dm644 $pkgname/font_bold.otf "$pkgdir"/usr/share/fonts/family_name/font_bold.otf<br />
}<br />
</nowiki>}}<br />
<br />
{{hc|fontname-fonts.install|<nowiki><br />
post_install() {<br />
fc-cache -s<br />
}<br />
<br />
post_upgrade() {<br />
post_install<br />
}<br />
<br />
post_remove() {<br />
post_install<br />
}<br />
</nowiki>}}<br />
<br />
=== Manual installation ===<br />
<br />
The recommended way of adding fonts that are not in the repositories to your system is described in [[#Creating a package]]. This gives pacman the ability to remove or update them at a later time. Fonts can alternately be installed manually as well.<br />
<br />
To install fonts system-wide (available for all users), move the folder to the {{ic|/usr/share/fonts/}} directory. The files need to be readable by every user, use [[chmod]] to set the correct permissions (i.e. at least {{ic|0444}} for files and {{ic|0555}} for directories). To install fonts for only a single user, use {{ic|~/.local/share/fonts}} ({{ic|~/.fonts/}} is now deprecated).<br />
<br />
For Xserver to load fonts directly (as opposed to the use of a ''font server'') the directory for your newly added font must be added with a FontPath entry. This entry is located in the ''Files'' section [[Xorg#Configuration|of your Xorg configuration file]] (e.g. {{ic|/etc/X11/xorg.conf}} or {{ic|/etc/xorg.conf}}). See [[#Older applications]] for more detail.<br />
<br />
Then update the fontconfig font cache: (usually unnecessary as software using the fontconfig library do this.)<br />
<br />
$ fc-cache<br />
<br />
=== Older applications ===<br />
<br />
With older applications that do not support fontconfig (e.g. GTK+ 1.x applications, and {{ic|xfontsel}}) the index will need to be created in the font directory:<br />
<br />
$ mkfontscale<br />
$ mkfontdir<br />
<br />
Or to include more than one folder with one command:<br />
<br />
$ for dir in /font/dir1/ /font/dir2/; do xset +fp $dir; done && xset fp rehash<br />
<br />
Or if fonts were installed in a different sub-folders under the e.g. {{ic|/usr/share/fonts}}:<br />
<br />
$ for dir in * ; do if [ -d "$dir" ]; then cd "$dir";xset +fp "$PWD" ;mkfontscale; mkfontdir;cd .. ;fi; done && xset fp rehash<br />
<br />
At times the X server may fail to load the fonts directory and you will need to rescan all the {{ic|fonts.dir}} files:<br />
<br />
# xset +fp /usr/share/fonts/misc # Inform the X server of new directories<br />
# xset fp rehash # Forces a new rescan<br />
<br />
To check that the font(s) is included:<br />
<br />
$ xlsfonts | grep fontname<br />
<br />
{{note|Many packages will automatically configure Xorg to use the font upon installation. If that is the case with your font, this step is not necessary.}}<br />
<br />
This can also be set globally in {{ic|/etc/X11/xorg.conf}} or {{ic|/etc/X11/xorg.conf.d}}.<br />
<br />
Here is an example of the section that must be added to {{ic|/etc/X11/xorg.conf}}. Add or remove paths based on your particular font requirements.<br />
<br />
# Let X.Org know about the custom font directories<br />
Section "Files"<br />
FontPath "/usr/share/fonts/100dpi"<br />
FontPath "/usr/share/fonts/75dpi"<br />
FontPath "/usr/share/fonts/cantarell"<br />
FontPath "/usr/share/fonts/cyrillic"<br />
FontPath "/usr/share/fonts/encodings"<br />
FontPath "/usr/share/fonts/misc"<br />
FontPath "/usr/share/fonts/truetype"<br />
FontPath "/usr/share/fonts/TTF"<br />
FontPath "/usr/share/fonts/util"<br />
EndSection<br />
<br />
=== Pango Warnings ===<br />
<br />
When [http://www.pango.org/ Pango] is in use on your system it will read from [http://www.freedesktop.org/wiki/Software/fontconfig fontconfig] to sort out where to source fonts.<br />
<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='common'<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='latin'<br />
<br />
If you are seeing errors similar to this and/or seeing blocks instead of characters in your application then you need to add fonts and update the font cache. This example uses the {{Pkg|ttf-liberation}} fonts to illustrate the solution (after successful installation of the package) and runs as root to enable them system-wide.<br />
<br />
# fc-cache<br />
/usr/share/fonts: caching, new cache contents: 0 fonts, 3 dirs<br />
/usr/share/fonts/TTF: caching, new cache contents: 16 fonts, 0 dirs<br />
/usr/share/fonts/encodings: caching, new cache contents: 0 fonts, 1 dirs<br />
/usr/share/fonts/encodings/large: caching, new cache contents: 0 fonts, 0 dirs<br />
/usr/share/fonts/util: caching, new cache contents: 0 fonts, 0 dirs<br />
/var/cache/fontconfig: cleaning cache directory<br />
fc-cache: succeeded<br />
<br />
You can test for a default font being set like so:<br />
<br />
# fc-match<br />
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"<br />
<br />
== Console fonts ==<br />
<br />
{{Note|This section is about the [[Wikipedia:Linux console|Linux console]]. For alternative console solutions offering more features (full Unicode fonts, modern graphics adapters etc.), see [[fbterm]], [[KMSCON]] or similar projects.}}<br />
<br />
By default, the [[Wikipedia:Virtual console|virtual console]] uses the kernel built-in font with a [[Wikipedia:CP437|CP437]] character set,<sup>[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/vt/Makefile#n4]</sup> but this can be easily changed.<br />
<br />
The [[Wikipedia:Linux console|Linux console]] uses UTF-8 encoding by default, but because the standard VGA-compatible framebuffer is used, a console font is limited to either a standard 256, or 512 glyphs. If the font has more than 256 glyphs, the number of colours is reduced from 16 to 8. In order to assign correct symbol to be displayed to the given Unicode value, a special translation map, often called ''unimap'', is needed. Nowadays most of the console fonts have the ''unimap'' built-in, historically it had to be loaded separately.<br />
<br />
The {{Pkg|kbd}} package provides tools to change virtual console font and font mapping. Available fonts are saved in the {{ic|/usr/share/kbd/consolefonts/}} directory, those ending with ''.psfu'' or ''.psfu.gz'' have a Unicode translation map built-in.<br />
<br />
Keymaps, the connection between the key pressed and the character used by the computer, are found in the subdirectories of {{ic|/usr/share/kbd/keymaps/}}, see [[Keyboard configuration in console]] for details.<br />
<br />
{{Note|Replacing the font can cause issues with programs that expect a standard VGA-style font, such as those using line drawing graphics.}}<br />
<br />
=== Previewing and testing ===<br />
<br />
{{Tip|An organized library of images for previewing is available: [http://alexandre.deverteuil.net/pages/consolefonts/ Linux console fonts screenshots].}}<br />
<br />
The available glyphs or letters in the font can also be viewed as a table with using ''showconsolefont'':<br />
<br />
$ showconsolefont<br />
<br />
The ''setfont'' utility may be used to temporarily change the font, so that the user can consider its permanent use. Just pass the name of the font (they are located in {{ic|/usr/share/kbd/consolefonts/}}). For example:<br />
<br />
$ setfont lat2-16 -m 8859-2<br />
<br />
Note that the font name is case-sensitive, so type it ''exactly'' as you see it. If the newly changed font is not suitable, a return to the default font with the following command (even if the console display is totally unreadable, this command will still work, just type the command "blindly"):<br />
<br />
$ setfont<br />
<br />
{{Note|''setfont'' only works on the console currently being used. Any other consoles, active or inactive, remain unaffected.}}<br />
<br />
=== Persistent configuration ===<br />
<br />
The {{ic|FONT}} variable in {{ic|/etc/vconsole.conf}} is used to set the font at boot, persistently for all consoles. See {{ic|man 5 vconsole.conf}} for details.<br />
<br />
For displaying characters such as ''Č, ž, đ, š'' or ''Ł, ę, ą, ś'' using the font {{ic|lat2-16.psfu.gz}}:<br />
<br />
{{hc|/etc/vconsole.conf|2=<br />
...<br />
FONT=lat2-16<br />
FONT_MAP=8859-2<br />
}}<br />
<br />
It means that second part of ISO/IEC 8859 characters are used with size 16. You can change font size using other values (e.g. {{ic|lat2-08}}). For the regions determined by 8859 specification, look at the [[wikipedia:ISO/IEC_8859#The_Parts_of_ISO.2FIEC_8859|Wikipedia table]].<br />
<br />
To use the specified font in early userspace, use the {{ic|consolefont}} hook in {{ic|/etc/mkinitcpio.conf}}. See [[Mkinitcpio#HOOKS]] for more information. <br />
<br />
If the fonts seems to not change on boot, or change only temporarily, it is most likely that they got reset when graphics driver was initialized and console was switched to framebuffer. To avoid this, load your graphics driver earlier. See for example [[Kernel mode setting#Early KMS start]], [https://bbs.archlinux.org/viewtopic.php?id=145765] or other ways to setup your framebuffer before {{ic|/etc/vconsole.conf}} is applied.<br />
<br />
== Font packages ==<br />
<br />
This is a selective list that includes many font packages from the [[AUR]] along with those in the official repositories. Fonts are tagged "Unicode" if they have wide Unicode support, see the project or Wikipedia pages for detail.<br />
<br />
Github user Ternstor has created a python script that generates HTML documents with PNG images of all the fonts in the AUR and the official repositories: [https://github.com/ternstor/distrofonts/blob/master/archfonts.py].<br />
<br />
=== Ancient Scripts ===<br />
<br />
*{{AUR|ttf-ancient-fonts}} - Font containing Unicode symbols for Aegean, Egyptian, Cuneiform, Anatolian, Maya, and Analecta scripts<br />
<br />
=== Braille ===<br />
<br />
*{{Pkg|ttf-ubraille}} - Font containing Unicode symbols for ''braille''<br />
<br />
=== Emoji ===<br />
<br />
A section of the Unicode standard is designated for picotographic characters called "emoji".<br />
<br />
* {{Pkg|ttf-symbola}}<br />
* {{Pkg|noto-fonts-emoji}}<br />
<br />
Some newer additions to Unicode appear to render poorly with Noto fonts.<br />
<br />
=== International users ===<br />
<br />
Applications and browsers select and display fonts depending upon fontconfig preferences and available font glyph for Unicode text. To list installed fonts for a particular language, issue a command {{ic|<nowiki>fc-list :lang="two letter language code"</nowiki>}}. For instance, to list installed Arabic fonts or fonts supporting Arabic glyph:<br />
{{hc|$ fc-list -f '%{file}\n' :lang&#61;ar|2=<br />
<nowiki><br />
/usr/share/fonts/TTF/FreeMono.ttf<br />
/usr/share/fonts/TTF/DejaVuSansCondensed.ttf<br />
/usr/share/fonts/truetype/custom/DroidKufi-Bold.ttf<br />
/usr/share/fonts/TTF/DejaVuSansMono.ttf<br />
/usr/share/fonts/TTF/FreeSerif.ttf<br />
</nowiki><br />
}}<br />
<br />
To properly render fonts for multilingual websites like Wikipedia or this Arch Linux wiki, install one of the following sets of packages:<br />
* Google's [http://www.google.com/get/noto/ Noto] is a font family that aims to support all languages. [[Install]] it with the {{Pkg|noto-fonts}}, {{Pkg|noto-fonts-cjk}} and {{Pkg|noto-fonts-emoji}} packages.<br />
* An alternative set of fonts which has a good coverage of languages is {{Pkg|ttf-freefont}} with {{Pkg|ttf-arphic-uming}} and {{Pkg|ttf-baekmuk}}.<br />
<br />
==== Arabic & Urdu ====<br />
<br />
* {{AUR|ttf-qurancomplex-fonts}} - Fonts by King Fahd Glorious Quran Printing Complex in al-Madinah al-Munawwarah<br />
* {{AUR|ttf-amiri}} - A classical Arabic typeface in Naskh style poineered by Amiria Press<br />
* {{AUR|ttf-sil-lateef}} - Unicode Arabic font from SIL<br />
* {{AUR|ttf-sil-scheherazade}} - Unicode Arabic font from SIL<br />
* {{AUR|ttf-arabeyes-fonts}} - Collection of free Arabic fonts<br />
* {{AUR|ttf-urdufonts}} - Urdu fonts (Jameel Noori Nastaleeq (+kasheeda), Nafees Web Naskh, PDMS Saleem Quran Font) and font configuration to set Jameel Noori Nastaleeq as default font for Urdu<br />
<br />
==== Persian ====<br />
<br />
* {{AUR|ttf-irfonts}} - Iran Supreme Council of Information and Communication Technology (SCICT) standard Persian fonts series.<br />
* {{AUR|ttf-borna}} - Borna Rayaneh Persian B font series.<br />
* {{AUR|ttf-sina}} - Sina Pardazesh Persian font series.<br />
* {{AUR|ttf-x2}} - Free fonts with support for Persian, Arabic, Urdu, Pashto, Dari, Uzbek, Kurdish, Uighur, old Turkish (Ottoman) and modern Turkish (Roman).<br />
* {{AUR|ttf-iran-nastaliq}} - A free Unicode calligraphic Persian font created by Iran Supreme Council of Information and Communication Technology (SCICT).<br />
<br />
==== Burmese ====<br />
<br />
* {{AUR|ttf-my-paduk}} - Padauk font for Myanmar/Birmania<br />
* {{AUR|ttf-myanmar-fonts}} - 121 Fonts from myordbok.com<br />
<br />
==== Chinese, Japanese, Korean, Vietnamese ====<br />
<br />
===== Pan-CJK =====<br />
* {{Pkg|noto-fonts-cjk}} - Large collection of fonts which comprehensively support Simplified Chinese, Traditional Chinese, Japanese, and Korean, with a consistent design and look. It is currently a rebadged version of {{Pkg|adobe-source-han-sans-otc-fonts}}.<br />
* {{Pkg|adobe-source-han-sans-otc-fonts}} - Large collection of fonts which comprehensively support Simplified Chinese, Traditional Chinese, Japanese, and Korean, with a consistent design and look.<br />
<br />
===== (Mainly) Chinese =====<br />
<br />
* {{Pkg|adobe-source-han-sans-cn-fonts}} - Simplified Chinese OpenType/CFF fonts<br />
* {{Pkg|adobe-source-han-sans-tw-fonts}} - Traditional Chinese OpenType/CFF fonts<br />
* {{Pkg|wqy-microhei}} - A Sans-Serif style high quality CJKV outline font.<br />
* {{Pkg|wqy-zenhei}} - Hei Ti Style (sans-serif) Chinese Outline font embedded with bitmapped Song Ti (also supporting Japanese (partial) and Korean characters).<br />
* {{Pkg|ttf-arphic-ukai}} - ''Kaiti'' (brush stroke) Unicode font (enabling anti-aliasing is suggested)<br />
* {{Pkg|ttf-arphic-uming}} - ''Mingti'' (printed) Unicode font<br />
* {{Pkg|opendesktop-fonts}} - ''New Sung'' font, previously is ttf-fireflysung package<br />
* {{Pkg|wqy-bitmapfont}} - Bitmapped Song Ti (serif) Chinese font<br />
* {{Pkg|ttf-hannom}} - Chinese and Vietnamese TrueType font<br />
* {{AUR|ttf-i.bming}} - CJK serif font that emphasis on an old-style typeface<br />
* {{AUR|ttf-tw}} - Kai and Song traditional Chinese font from the Ministry of Education of Taiwan<br />
<br />
===== Japanese =====<br />
<br />
* {{Pkg|adobe-source-han-sans-jp-fonts}} - Japanese OpenType/CFF fonts<br />
* {{Pkg|otf-ipafont}} - Formal style Japanese Gothic (sans-serif) and Mincho (serif) fonts set; one of the highest quality open source font. Default of openSUSE-ja.<br />
* {{Pkg|ttf-sazanami}} - Japanese free TrueType font. This is outdated and not maintained any more, but may be defined as a fallback font on several environments.<br />
* {{Pkg|ttf-hanazono}} - A free Japanese kanji font, style Mincho (serif).<br />
* {{AUR|ttf-vlgothic}} - Japanese Gothic fonts. Default of Debian/Fedora/Vine Linux<br />
* {{AUR|ttf-mplus}} - Modern Gothic style Japanese outline fonts. It includes all of Japanese Hiragana/Katakana, Basic Latin, Latin-1 Supplement, Latin Extended-A, IPA Extensions and most of Japanese Kanji, Greek, Cyrillic, Vietnamese with 7 weights (proportional) or 5 weights (monospace).<br />
* {{AUR|ttf-koruri}} - Japanese TrueType font obtained by mixing {{AUR|ttf-mplus}} and Open Sans<br />
* {{AUR|ttf-monapo}} - Japanese fonts to show [[wikipedia:2channel_Shift_JIS_art|2channel Shift JIS art]] properly.<br />
<br />
===== Korean =====<br />
<br />
* {{Pkg|adobe-source-han-sans-kr-fonts}} - Korean OpenType/CFF fonts<br />
* {{Pkg|ttf-baekmuk}} - Collection of Korean TrueType fonts<br />
* {{AUR|ttf-nanum}} - Nanum series TrueType fonts<br />
* {{AUR|ttf-nanumgothic_coding}} - Nanum series fixed width TrueType fonts<br />
* {{AUR|ttf-d2coding}} - D2Coding fixed width TrueType font made by Naver<br />
* {{AUR|spoqa-han-sans}} - Source Han Sans customized by Spoqa<br />
<br />
==== Cyrillic ====<br />
<br />
See also [[#Monospaced]], [[#Sans-serif]] and [[#Serif]].<br />
<br />
* {{AUR|otf-russkopis}} - A free OpenType cursive font for Cyrillic script<br />
* {{AUR|ttf-paratype}} - Font family by ParaType: sans, serif, mono, extended cyrillic and latin, OFL license<br />
<br />
==== Greek ====<br />
<br />
Almost all Unicode fonts contain the Greek character set (polytonic included). Some additional font packages, which might not contain the complete Unicode set but utilize high quality Greek (and Latin, of course) typefaces are:<br />
<br />
* {{AUR|otf-gfs}} - Selection of OpenType fonts from the Greek Font Society<br />
* {{AUR|ttf-mgopen}} - Professional TrueType fonts from Magenta<br />
<br />
==== Hebrew ====<br />
<br />
* {{AUR|culmus}} - Nice collection of free Hebrew fonts<br />
<br />
==== Indic ====<br />
<br />
* {{Pkg|ttf-freebanglafont}} - Font for Bangla<br />
* {{Pkg|ttf-indic-otf}} - Indic OpenType Fonts collection (containing ttf-freebanglafont)<br />
: (This one contains a "look of disapproval" that might be more to your liking than the {{Pkg|bdf-unifont}} one mentioned elsewhere in this document)<br />
* {{AUR|lohit-fonts}} - Indic TrueType fonts from Fedora Project (containing Oriya Fonts and more)<br />
* {{AUR|ttf-devanagarifonts}} - Devanagari TrueType fonts (contains 283 fonts)<br />
* {{AUR|ttf-gujrati-fonts}} - TTF Gujarati fonts (Avantika,Gopika,Shree768)<br />
* {{AUR|ttf-gurmukhi-fonts_sikhnet}} - TrueType Gurmukhi fonts (gurbaniwebthick,prabhki)<br />
* {{AUR|ttf-gurmukhi_punjabi}} - TTF Gurmukhi / Punjabi (contains 252 fonts)<br />
* {{AUR|ttf-kannada-font}} - Kannada, the language of Karnataka state in India<br />
* {{AUR|ttf-tamil}} - Tamil Unicode fonts<br />
<br />
==== Khmer ====<br />
<br />
* {{Pkg|ttf-khmer}} - Font covering glyphs for Khmer language<br />
* [https://www.google.com/fonts/specimen/Hanuman Hanuman] ({{AUR|ttf-google-fonts-git}})<br />
<br />
==== Lao ====<br />
<br />
* {{AUR|ttf-lao}} - Lao TTF font (Phetsarath_OT)<br />
* {{AUR|ttf-lao-fonts}} - Lao TTF fonts, both Unicode and non-Unicode for Windows<br />
<br />
==== Sinhala ====<br />
<br />
* {{AUR|ttf-lklug}} - Sinhala Unicode font<br />
<br />
==== Thai ====<br />
<br />
* {{Pkg|ttf-tlwg}} - Collection of scalable Thai fonts<br />
<br />
==== Tibetan ====<br />
<br />
* {{Pkg|ttf-tibetan-machine}} - Tibetan Machine TTFont<br />
<br />
=== Math ===<br />
<br />
* {{Pkg|font-mathematica}} - Mathematica fonts by Wolfram Research, Inc.<br />
* {{AUR|ttf-mathtype}} - MathType fonts<br />
* {{AUR|ttf-computer-modern-fonts}}, {{AUR|otf-cm-unicode}} - [[wikipedia:Computer Modern|Computer Modern]] (of TeX fame)<br />
* {{AUR|otf-xits}} - An OpenType implementation of [[Wikipedia:STIX Fonts project|STIX Fonts]] with math support<br />
<br />
=== Microsoft fonts ===<br />
<br />
See [[Microsoft fonts]].<br />
<br />
=== Apple OS X fonts ===<br />
<br />
* {{AUR|ttf-mac-fonts}} - Mac OS X TrueType fonts<br />
<br />
=== Monospaced ===<br />
<br />
Here are some suggestions. Every user has their own favorite, so experiment to find yours. <br />
If you are in a hurry, you read Dan Benjamin's blog post: [http://hivelogic.com/articles/top-10-programming-fonts ''Top 10 Programming Fonts''].<br />
<br />
Here is a long list of fonts by Trevor Lowing: http://www.lowing.org/fonts/.<br />
<br />
A comparison with images on Slant: [http://www.slant.co/topics/67/~what-are-the-best-programming-fonts What are the best programming fonts?]<br />
<br />
And a Stack Overflow question with some images: [http://stackoverflow.com/questions/4689/recommended-fonts-for-programming Recommended fonts for programming]<br />
<br />
==== TrueType ====<br />
<br />
* [[Wikipedia:Andalé Mono|Andalé Mono]] ({{AUR|ttf-ms-fonts}})<br />
* [http://www.marksimonson.com/fonts/view/anonymous-pro Anonymous Pro] ({{pkg|ttf-anonymous-pro}}, included in {{AUR|ttf-google-fonts-git}})<br />
* [[Wikipedia:Bitstream Vera|Bitstream Vera Mono]] ({{Pkg|ttf-bitstream-vera}})<br />
* [[Wikipedia:Consolas|Consolas]] ({{AUR|ttf-vista-fonts}}) - Windows programming font<br />
* [[Wikipedia:Courier New|Courier New]] ({{AUR|ttf-ms-fonts}})<br />
* Cousine ({{AUR|ttf-chromeos-fonts}} or {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS replacement for Courier New (metric-compatible)<br />
* [[Wikipedia:DejaVu fonts|DejaVu Sans Mono]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
* [[Wikipedia:Droid (font)|Droid Sans Mono]] ({{Pkg|ttf-droid}}, included in {{AUR|ttf-google-fonts-git}})<br />
* [https://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released Envy Code R] ({{AUR|ttf-envy-code-r}})<br />
* Fantasque Sans Mono ({{AUR|ttf-fantasque-sans}} or {{AUR|ttf-fantasque-sans-git}})<br />
* [[Wikipedia:GNU FreeFont|FreeMono]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [[Wikipedia:Inconsolata|Inconsolata]] ({{Pkg|ttf-inconsolata}}, included in {{AUR|ttf-google-fonts-git}}) - Excellent programming font<br />
* [[Wikipedia:Inconsolata|Inconsolata-g]] ({{AUR|ttf-inconsolata-g}}) - adds some programmer-friendly modifications<br />
* [[Wikipedia:Liberation fonts|Liberation Mono]] ({{Pkg|ttf-liberation}}) - Replacement for Courier New, based on Cousine (metric-compatible)<br />
* [[Wikipedia:Lucida Typewriter|Lucida Typewriter]] (included in package {{AUR|jre}})<br />
* [[Wikipedia:Monaco (typeface)|Monaco]] ({{AUR|ttf-monaco}}) - Popular programming font on OSX/Textmate<br />
* Monofur ({{AUR|ttf-monofur}})<br />
* [[Wikipedia:Source_Code_Pro|Source Code Pro]] ({{pkg|adobe-source-code-pro-fonts}})<br />
<br />
==== Bitmap ====<br />
<br />
* Default 8x16<br />
* Dina ({{Pkg|dina-font}})<br />
* [http://font.gohu.org/ Gohu] ({{AUR|gohufont}})<br />
* Lime ({{Pkg|artwiz-fonts}})<br />
* [[Wikipedia:ProFont|ProFont]] ({{Pkg|profont}})<br />
* [[Wikipedia:Proggy Programming Fonts|Proggy Programming Fonts]] ({{AUR|proggyfonts}})<br />
* Tamsyn ({{Pkg|tamsyn-font}})<br />
* [http://terminus-font.sourceforge.net/ Terminus] ({{Pkg|terminus-font}})<br />
* [https://github.com/lucy/tewi-font Tewi] ({{AUR|bdf-tewi-git}})<br />
* Unifont (glyphs like (look of disapproval)) ({{Pkg|bdf-unifont}})<br />
<br />
=== Sans-serif ===<br />
<br />
* [http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=andika Andika] ({{AUR|ttf-andika}})<br />
* [[Wikipedia:Arial|Arial]] ({{AUR|ttf-ms-fonts}})<br />
* [[Wikipedia:Arial Black|Arial Black]] ({{AUR|ttf-ms-fonts}})<br />
* Arimo ({{AUR|ttf-chromeos-fonts}} or {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS replacement for Arial (metric-compatible)<br />
* [[Wikipedia:Calibri|Calibri]] ({{AUR|ttf-vista-fonts}})<br />
* [[Wikipedia:Candara|Candara]] ({{AUR|ttf-vista-fonts}})<br />
* [[Wikipedia:Corbel (typeface)|Corbel]] ({{AUR|ttf-vista-fonts}})<br />
* [[Wikipedia:DejaVu fonts|DejaVu Sans]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
* [[Wikipedia:Droid (font)|Droid Sans]] ({{Pkg|ttf-droid}}, included in {{AUR|ttf-google-fonts-git}})<br />
* [[Wikipedia:GNU FreeFont|FreeSans]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [[Wikipedia:Impact (typeface)|Impact]] ({{AUR|ttf-ms-fonts}})<br />
* [[Wikipedia:Liberation fonts|Liberation Sans]] ({{Pkg|ttf-liberation}}) Replacement for Arial, based on Arimo (metric-compatible)<br />
* [[Wikipedia:Linux Libertine|Linux Biolinum]] ({{Pkg|ttf-linux-libertine}})<br />
* [[Wikipedia:Lucida Sans|Lucida Sans]] ({{AUR|ttf-ms-fonts}})<br />
* [[Wikipedia:Microsoft Sans Serif|Microsoft Sans Serif]] ({{AUR|ttf-ms-fonts}})<br />
* [[Wikipedia:PT Sans|PT Sans]] ({{AUR|ttf-google-fonts-git}}) - 3 major variations: normal, narrow, and caption - Unicode: Latin, Cyrillic<br />
* [[Wikipedia:Source Sans Pro|Source Sans Pro]] ({{pkg|adobe-source-sans-pro-fonts}})<br />
* [[Wikipedia:Tahoma (typeface)|Tahoma]] ({{AUR|ttf-tahoma}})<br />
* [[Wikipedia:Trebuchet MS|Trebuchet]] ({{AUR|ttf-ms-fonts}})<br />
* [[Wikipedia:Ubuntu Font Family|Ubuntu Font Family]] ({{Pkg|ttf-ubuntu-font-family}})<br />
* [[Wikipedia:Verdana|Verdana]] ({{AUR|ttf-ms-fonts}})<br />
<br />
=== Script ===<br />
<br />
* [[Wikipedia:Comic Sans|Comic Sans]] ({{AUR|ttf-ms-fonts}})<br />
<br />
=== Serif ===<br />
<br />
* [[Wikipedia:Cambria (typeface)|Cambria]] ({{AUR|ttf-vista-fonts}})<br />
* [[Wikipedia:Constantia (typeface)|Constantia]] ({{AUR|ttf-vista-fonts}})<br />
* [[Wikipedia:DejaVu fonts|DejaVu Serif]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
* [[Wikipedia:Droid (font)|Droid Serif]] ({{Pkg|ttf-droid}}, included in {{AUR|ttf-google-fonts-git}})<br />
* [[Wikipedia:GNU FreeFont|FreeSerif]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [[Wikipedia:Gentium|Gentium]] ({{Pkg|ttf-gentium}}) - Unicode: Latin, Greek, Cyrillic, Phonetic Alphabet<br />
* [[Wikipedia:Georgia (typeface)|Georgia]] ({{AUR|ttf-ms-fonts}})<br />
* [[Wikipedia:Liberation fonts|Liberation Serif]] ({{Pkg|ttf-liberation}}) - Replacement for Times New Roman, based on Tinos (metric-compatible)<br />
* [[Wikipedia:Linux Libertine|Linux Libertine]] ({{Pkg|ttf-linux-libertine}}) - Unicode: Latin, Greek, Cyrillic, Hebrew<br />
* [[Wikipedia:Times New Roman|Times New Roman]] ({{AUR|ttf-ms-fonts}})<br />
* Tinos ({{AUR|ttf-chromeos-fonts}} or {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS replacement for Times New Roman (metric-compatible)<br />
<br />
=== Unsorted ===<br />
<br />
{{Style|This section should be absorbed into the Monospace/Serif/Sans-Serif structure}}<br />
<br />
* {{AUR|ttf-google-fonts-git}} - a huge collection of free fonts (including ubuntu, inconsolata, droid, etc.) - Note: Your font dialog might get very long as >100 fonts will be added.<br />
* {{Pkg|ttf-mph-2b-damase}} - Covers full plane 1 and several scripts<br />
* {{Pkg|ttf-symbola}} - Provides emoji and many many other symbols<br />
* {{Pkg|font-bh-ttf}} - X.Org Luxi fonts<br />
* {{Pkg|ttf-cheapskate}} - Font collection from ''dustismo.com''<br />
* {{Pkg|ttf-junicode}} - Junius font containing almost complete medieval latin script glyphs<br />
* {{Pkg|xorg-fonts-type1}} - IBM Courier and Adobe Utopia sets of [[Wikipedia:PostScript fonts|PostScript fonts]]<br />
* {{AUR|all-repository-fonts}} - Meta package for all fonts in the official repositories.<br />
<br />
== Fallback font order with X11 ==<br />
<br />
Fontconfig automatically chooses a font that matches the current requirement. That is to say, if one is looking at a window containing English and Chinese for example, it will switch to another font for the Chinese text if the default one does not support it.<br />
<br />
Fontconfig lets every user configure the order they want via {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}.<br />
If you want a particular Chinese font to be selected after your favorite Serif font, your file would look like this:<br />
<br />
<?xml version="1.0"?><br />
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"><br />
<fontconfig><br />
<alias><br />
<family>serif</family><br />
<prefer><br />
<family>Your favorite Latin Serif font name</family><br />
<family>Your Chinese font name</family><br />
</prefer><br />
</alias><br />
</fontconfig><br />
<br />
{{Tip|If you use a Chinese locale, set {{ic|LC_LANG}} to {{ic|und}} to make this work. Otherwise both English and Chinese text will be rendered in the Chinese font.}}<br />
<br />
You can add a section for Sans-serif and monospace as well. For more informations, have a look at the fontconfig manual.<br />
<br />
== Font alias ==<br />
<br />
There are several font aliases which represent other fonts in order that applications may use similar fonts. The most common aliases are: {{ic|serif}} for a font of the serif type (e.g. DejaVu Serif); {{ic|sans-serif}} for a font of the sans-serif type (e.g. DejaVu Sans); and {{ic|monospace}} for a monospaced font (e.g. DejaVu Sans Mono). However, the fonts which these aliases represent may vary and the relationship is often not shown in font management tools, such as those found in [[KDE]] and other [[desktop environments]].<br />
<br />
To reverse an alias and find which font it is representing, run:<br />
<br />
{{hc|$ fc-match monospace|<br />
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"<br />
}}<br />
<br />
In this case, {{ic|DejaVuSansMono.ttf}} is the font represented by the monospace alias.<br />
<br />
== Tips and tricks ==<br />
<br />
=== List all installed fonts ===<br />
<br />
You can use the following command to list all installed fonts that are available on your system. <br />
<br />
$ fc-list<br />
<br />
=== Set terminal font on-the-fly ===<br />
<br />
{{Expansion|Which terminals specifically support this method? Where is the documentation for the escape codes?}}<br />
<br />
For terminal emulators that use {{ic|Xresources}}, fonts can be set by using escape sequences. Specifically, echo {{ic|\033]710;$font\007}} to change the normal font ({{ic|*font}} in {{ic|~/.Xresources}}), and replace {{ic|710}} with {{ic|711}}, {{ic|712}}, and {{ic|713}} to change the {{ic|*boldFont}}, {{ic|*italicFont}}, and {{ic|*boldItalicFont}}, respectively.<br />
<br />
{{ic|$font}} can be anything the terminal emulator will support.<br />
<br />
=== Application-specific font cache ===<br />
<br />
Matplotlib ({{pkg|python-matplotlib}} or {{pkg|python2-matplotlib}}) uses its own font cache, so after updating fonts, be sure to remove {{ic|$HOME/.matplotlib/fontList.cache}}, <br />
{{ic|$HOME/.cache/matplotlib/fontList.cache}}, {{ic|$HOME/.sage/matplotlib-1.2.1/fontList.cache}}, etc. so it will regenerate its cache and find the new fonts [http://matplotlib.1069221.n5.nabble.com/getting-matplotlib-to-recognize-a-new-font-td40500.html].<br />
<br />
== See also ==<br />
<br />
* [http://behdad.org/text/ State of Text Rendering]</div>Qguvhttps://wiki.archlinux.org/index.php?title=Fonts&diff=432823Fonts2016-04-25T16:54:55Z<p>Qguv: /* Font packages */ a brief description of available emoji fonts</p>
<hr />
<div>[[Category:Fonts]]<br />
[[cs:Fonts]]<br />
[[de:Schriftarten]]<br />
[[es:Fonts]]<br />
[[it:Fonts]]<br />
[[ja:フォント]]<br />
[[ru:Fonts]]<br />
[[tr:Yazıtipleri]]<br />
[[zh-CN:Fonts]]<br />
[[zh-TW:Fonts]]<br />
{{Related articles start}}<br />
{{Related|Font configuration}}<br />
{{Related|Infinality}}<br />
{{Related|Java Runtime Environment Fonts}}<br />
{{Related|Microsoft fonts}}<br />
{{Related articles end}}<br />
<br />
From [[Wikipedia:Computer font|Wikipedia]]:<br />
:''A computer font (or font) is an electronic data file containing a set of glyphs, characters, or symbols such as dingbats.''<br />
<br />
Note that certain font licenses may impose some legal limitations.<br />
<br />
== Font formats ==<br />
<br />
Most computer fonts used today are in either ''bitmap'' or ''outline'' data formats. <br />
;Bitmap fonts: Consist of a matrix of dots or pixels representing the image of each glyph in each face and size.<br />
;Outline or ''vector'' fonts: Use Bézier curves, drawing instructions and mathematical formulae to describe each glyph, which make the character outlines scalable to any size.<br />
<br />
=== Common extensions ===<br />
<br />
* {{ic|bdf}} and {{ic|bdf.gz}} – bitmap fonts, ''b''itmap ''d''istribution ''f''ormat and gzip compressed {{ic|bdf}}<br />
* {{ic|pcf}} and {{ic|pcf.gz}} – bitmaps, ''p''ortable ''c''ompiled ''f''ont and gzip compressed {{ic|pcf}}<br />
* {{ic|psf}}, {{ic|psfu}}, {{ic|psf.gz}} and {{ic|psfu.gz}} – bitmaps, ''P''C ''s''creen ''f''ont, ''P''C ''s''creen ''f''ont ''U''nicode and the gzipped versions (not compatible with X.Org)<br />
* {{ic|pfa}} and {{ic|pfb}} – outline fonts, ''P''ostScript ''f''ont ''A''SCII and ''P''ostScript ''f''ont ''b''inary. PostScript fonts carry built-in printer instructions.<br />
* {{ic|ttf}} – outline, ''T''rue''T''ype ''f''ont. Originally designed as a replacement for the PostScript fonts.<br />
* {{ic|otf}} – outline, ''O''pen''T''ype ''f''ont. TrueType with PostScript typographic instructions.<br />
<br />
For most purposes, the technical differences between TrueType and OpenType can be ignored, some fonts with a {{ic|ttf}} extension are actually OpenType fonts.<br />
<br />
=== Other formats ===<br />
<br />
The typesetting application, ''TeX,'' and its companion font software, ''Metafont,'' render characters using their own methods. Some of the file extensions used for fonts by these two programs are {{ic|*pk}}, {{ic|*gf}}, {{ic|mf}} and {{ic|vf}}.<br />
<br />
''FontForge,'' a font editing application, can store fonts in its native text-based format, {{ic|sfd}}, ''s''pline ''f''ont ''d''atabase.<br />
<br />
The [http://www.w3.org/TR/SVG/fonts.html SVG] format also has its own font description method.<br />
<br />
== Installation ==<br />
<br />
There are various methods for installing fonts.<br />
<br />
=== Pacman ===<br />
<br />
Fonts and font collections in the enabled repositories can be installed using [[pacman]]. Available fonts may be found by using:<br />
$ pacman -Ss font<br />
<br />
Or to search for {{ic|ttf}} fonts only:<br />
$ pacman -Ss ttf<br />
<br />
=== Creating a package ===<br />
<br />
You should give pacman the ability to manage your fonts, which is done by creating an Arch package. These can also be shared with the community in the [[AUR]]. Here is an example of how to create a basic package. To learn more about building packages, read [[PKGBUILD]].<br />
<br />
The family name of a font file can be aquired with the use of {{ic|fc-query}} for example: {{ic|fc-query -f '%{family[0]}\n' /path/to/file}}. The formatting is described in the FcPatternFormat(3) manual.<br />
<br />
{{hc|PKGBUILD|<nowiki><br />
pkgname=fontname-fonts<br />
pkgver=1.0<br />
pkgrel=1<br />
pkgdesc="Some description"<br />
arch=(any)<br />
depends=(fontconfig xorg-font-utils)<br />
source=("http://someurl.org/$pkgname.tar.bz2")<br />
install=$pkgname.install<br />
<br />
package() {<br />
install -Dm644 $pkgname/font.otf "$pkgdir"/usr/share/fonts/family_name/font.otf<br />
install -Dm644 $pkgname/font_bold.otf "$pkgdir"/usr/share/fonts/family_name/font_bold.otf<br />
}<br />
</nowiki>}}<br />
<br />
{{hc|fontname-fonts.install|<nowiki><br />
post_install() {<br />
fc-cache -s<br />
}<br />
<br />
post_upgrade() {<br />
post_install<br />
}<br />
<br />
post_remove() {<br />
post_install<br />
}<br />
</nowiki>}}<br />
<br />
=== Manual installation ===<br />
<br />
The recommended way of adding fonts that are not in the repositories to your system is described in [[#Creating a package]]. This gives pacman the ability to remove or update them at a later time. Fonts can alternately be installed manually as well.<br />
<br />
To install fonts system-wide (available for all users), move the folder to the {{ic|/usr/share/fonts/}} directory. The files need to be readable by every user, use [[chmod]] to set the correct permissions (i.e. at least {{ic|0444}} for files and {{ic|0555}} for directories). To install fonts for only a single user, use {{ic|~/.local/share/fonts}} ({{ic|~/.fonts/}} is now deprecated).<br />
<br />
For Xserver to load fonts directly (as opposed to the use of a ''font server'') the directory for your newly added font must be added with a FontPath entry. This entry is located in the ''Files'' section [[Xorg#Configuration|of your Xorg configuration file]] (e.g. {{ic|/etc/X11/xorg.conf}} or {{ic|/etc/xorg.conf}}). See [[#Older applications]] for more detail.<br />
<br />
Then update the fontconfig font cache: (usually unnecessary as software using the fontconfig library do this.)<br />
<br />
$ fc-cache<br />
<br />
=== Older applications ===<br />
<br />
With older applications that do not support fontconfig (e.g. GTK+ 1.x applications, and {{ic|xfontsel}}) the index will need to be created in the font directory:<br />
<br />
$ mkfontscale<br />
$ mkfontdir<br />
<br />
Or to include more than one folder with one command:<br />
<br />
$ for dir in /font/dir1/ /font/dir2/; do xset +fp $dir; done && xset fp rehash<br />
<br />
Or if fonts were installed in a different sub-folders under the e.g. {{ic|/usr/share/fonts}}:<br />
<br />
$ for dir in * ; do if [ -d "$dir" ]; then cd "$dir";xset +fp "$PWD" ;mkfontscale; mkfontdir;cd .. ;fi; done && xset fp rehash<br />
<br />
At times the X server may fail to load the fonts directory and you will need to rescan all the {{ic|fonts.dir}} files:<br />
<br />
# xset +fp /usr/share/fonts/misc # Inform the X server of new directories<br />
# xset fp rehash # Forces a new rescan<br />
<br />
To check that the font(s) is included:<br />
<br />
$ xlsfonts | grep fontname<br />
<br />
{{note|Many packages will automatically configure Xorg to use the font upon installation. If that is the case with your font, this step is not necessary.}}<br />
<br />
This can also be set globally in {{ic|/etc/X11/xorg.conf}} or {{ic|/etc/X11/xorg.conf.d}}.<br />
<br />
Here is an example of the section that must be added to {{ic|/etc/X11/xorg.conf}}. Add or remove paths based on your particular font requirements.<br />
<br />
# Let X.Org know about the custom font directories<br />
Section "Files"<br />
FontPath "/usr/share/fonts/100dpi"<br />
FontPath "/usr/share/fonts/75dpi"<br />
FontPath "/usr/share/fonts/cantarell"<br />
FontPath "/usr/share/fonts/cyrillic"<br />
FontPath "/usr/share/fonts/encodings"<br />
FontPath "/usr/share/fonts/misc"<br />
FontPath "/usr/share/fonts/truetype"<br />
FontPath "/usr/share/fonts/TTF"<br />
FontPath "/usr/share/fonts/util"<br />
EndSection<br />
<br />
=== Pango Warnings ===<br />
<br />
When [http://www.pango.org/ Pango] is in use on your system it will read from [http://www.freedesktop.org/wiki/Software/fontconfig fontconfig] to sort out where to source fonts.<br />
<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='common'<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='latin'<br />
<br />
If you are seeing errors similar to this and/or seeing blocks instead of characters in your application then you need to add fonts and update the font cache. This example uses the {{Pkg|ttf-liberation}} fonts to illustrate the solution (after successful installation of the package) and runs as root to enable them system-wide.<br />
<br />
# fc-cache<br />
/usr/share/fonts: caching, new cache contents: 0 fonts, 3 dirs<br />
/usr/share/fonts/TTF: caching, new cache contents: 16 fonts, 0 dirs<br />
/usr/share/fonts/encodings: caching, new cache contents: 0 fonts, 1 dirs<br />
/usr/share/fonts/encodings/large: caching, new cache contents: 0 fonts, 0 dirs<br />
/usr/share/fonts/util: caching, new cache contents: 0 fonts, 0 dirs<br />
/var/cache/fontconfig: cleaning cache directory<br />
fc-cache: succeeded<br />
<br />
You can test for a default font being set like so:<br />
<br />
# fc-match<br />
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"<br />
<br />
== Console fonts ==<br />
<br />
{{Note|This section is about the [[Wikipedia:Linux console|Linux console]]. For alternative console solutions offering more features (full Unicode fonts, modern graphics adapters etc.), see [[fbterm]], [[KMSCON]] or similar projects.}}<br />
<br />
By default, the [[Wikipedia:Virtual console|virtual console]] uses the kernel built-in font with a [[Wikipedia:CP437|CP437]] character set,<sup>[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/vt/Makefile#n4]</sup> but this can be easily changed.<br />
<br />
The [[Wikipedia:Linux console|Linux console]] uses UTF-8 encoding by default, but because the standard VGA-compatible framebuffer is used, a console font is limited to either a standard 256, or 512 glyphs. If the font has more than 256 glyphs, the number of colours is reduced from 16 to 8. In order to assign correct symbol to be displayed to the given Unicode value, a special translation map, often called ''unimap'', is needed. Nowadays most of the console fonts have the ''unimap'' built-in, historically it had to be loaded separately.<br />
<br />
The {{Pkg|kbd}} package provides tools to change virtual console font and font mapping. Available fonts are saved in the {{ic|/usr/share/kbd/consolefonts/}} directory, those ending with ''.psfu'' or ''.psfu.gz'' have a Unicode translation map built-in.<br />
<br />
Keymaps, the connection between the key pressed and the character used by the computer, are found in the subdirectories of {{ic|/usr/share/kbd/keymaps/}}, see [[Keyboard configuration in console]] for details.<br />
<br />
{{Note|Replacing the font can cause issues with programs that expect a standard VGA-style font, such as those using line drawing graphics.}}<br />
<br />
=== Previewing and testing ===<br />
<br />
{{Tip|An organized library of images for previewing is available: [http://alexandre.deverteuil.net/pages/consolefonts/ Linux console fonts screenshots].}}<br />
<br />
The available glyphs or letters in the font can also be viewed as a table with using ''showconsolefont'':<br />
<br />
$ showconsolefont<br />
<br />
The ''setfont'' utility may be used to temporarily change the font, so that the user can consider its permanent use. Just pass the name of the font (they are located in {{ic|/usr/share/kbd/consolefonts/}}). For example:<br />
<br />
$ setfont lat2-16 -m 8859-2<br />
<br />
Note that the font name is case-sensitive, so type it ''exactly'' as you see it. If the newly changed font is not suitable, a return to the default font with the following command (even if the console display is totally unreadable, this command will still work, just type the command "blindly"):<br />
<br />
$ setfont<br />
<br />
{{Note|''setfont'' only works on the console currently being used. Any other consoles, active or inactive, remain unaffected.}}<br />
<br />
=== Persistent configuration ===<br />
<br />
The {{ic|FONT}} variable in {{ic|/etc/vconsole.conf}} is used to set the font at boot, persistently for all consoles. See {{ic|man 5 vconsole.conf}} for details.<br />
<br />
For displaying characters such as ''Č, ž, đ, š'' or ''Ł, ę, ą, ś'' using the font {{ic|lat2-16.psfu.gz}}:<br />
<br />
{{hc|/etc/vconsole.conf|2=<br />
...<br />
FONT=lat2-16<br />
FONT_MAP=8859-2<br />
}}<br />
<br />
It means that second part of ISO/IEC 8859 characters are used with size 16. You can change font size using other values (e.g. {{ic|lat2-08}}). For the regions determined by 8859 specification, look at the [[wikipedia:ISO/IEC_8859#The_Parts_of_ISO.2FIEC_8859|Wikipedia table]].<br />
<br />
To use the specified font in early userspace, use the {{ic|consolefont}} hook in {{ic|/etc/mkinitcpio.conf}}. See [[Mkinitcpio#HOOKS]] for more information. <br />
<br />
If the fonts seems to not change on boot, or change only temporarily, it is most likely that they got reset when graphics driver was initialized and console was switched to framebuffer. To avoid this, load your graphics driver earlier. See for example [[Kernel mode setting#Early KMS start]], [https://bbs.archlinux.org/viewtopic.php?id=145765] or other ways to setup your framebuffer before {{ic|/etc/vconsole.conf}} is applied.<br />
<br />
== Font packages ==<br />
<br />
This is a selective list that includes many font packages from the [[AUR]] along with those in the official repositories. Fonts are tagged "Unicode" if they have wide Unicode support, see the project or Wikipedia pages for detail.<br />
<br />
Github user Ternstor has created a python script that generates HTML documents with PNG images of all the fonts in the AUR and the official repositories: [https://github.com/ternstor/distrofonts/blob/master/archfonts.py].<br />
<br />
=== Ancient Scripts ===<br />
<br />
*{{AUR|ttf-ancient-fonts}} - Font containing Unicode symbols for Aegean, Egyptian, Cuneiform, Anatolian, Maya, and Analecta scripts<br />
<br />
=== Braille ===<br />
<br />
*{{Pkg|ttf-ubraille}} - Font containing Unicode symbols for ''braille''<br />
<br />
=== Emoji ===<br />
<br />
A section of the Unicode standard is designated for picotographic characters called "emoji". Some fonts that include characters for emoji are {{Pkg|ttf-symbola}} and {{Pkg|noto-fonts-emoji}}, though some newer additions to Unicode appear to render poorly with Noto fonts.<br />
<br />
=== International users ===<br />
<br />
Applications and browsers select and display fonts depending upon fontconfig preferences and available font glyph for Unicode text. To list installed fonts for a particular language, issue a command {{ic|<nowiki>fc-list :lang="two letter language code"</nowiki>}}. For instance, to list installed Arabic fonts or fonts supporting Arabic glyph:<br />
{{hc|$ fc-list -f '%{file}\n' :lang&#61;ar|2=<br />
<nowiki><br />
/usr/share/fonts/TTF/FreeMono.ttf<br />
/usr/share/fonts/TTF/DejaVuSansCondensed.ttf<br />
/usr/share/fonts/truetype/custom/DroidKufi-Bold.ttf<br />
/usr/share/fonts/TTF/DejaVuSansMono.ttf<br />
/usr/share/fonts/TTF/FreeSerif.ttf<br />
</nowiki><br />
}}<br />
<br />
To properly render fonts for multilingual websites like Wikipedia or this Arch Linux wiki, install one of the following sets of packages:<br />
* Google's [http://www.google.com/get/noto/ Noto] is a font family that aims to support all languages. [[Install]] it with the {{Pkg|noto-fonts}}, {{Pkg|noto-fonts-cjk}} and {{Pkg|noto-fonts-emoji}} packages.<br />
* An alternative set of fonts which has a good coverage of languages is {{Pkg|ttf-freefont}} with {{Pkg|ttf-arphic-uming}} and {{Pkg|ttf-baekmuk}}.<br />
<br />
==== Arabic & Urdu ====<br />
<br />
* {{AUR|ttf-qurancomplex-fonts}} - Fonts by King Fahd Glorious Quran Printing Complex in al-Madinah al-Munawwarah<br />
* {{AUR|ttf-amiri}} - A classical Arabic typeface in Naskh style poineered by Amiria Press<br />
* {{AUR|ttf-sil-lateef}} - Unicode Arabic font from SIL<br />
* {{AUR|ttf-sil-scheherazade}} - Unicode Arabic font from SIL<br />
* {{AUR|ttf-arabeyes-fonts}} - Collection of free Arabic fonts<br />
* {{AUR|ttf-urdufonts}} - Urdu fonts (Jameel Noori Nastaleeq (+kasheeda), Nafees Web Naskh, PDMS Saleem Quran Font) and font configuration to set Jameel Noori Nastaleeq as default font for Urdu<br />
<br />
==== Persian ====<br />
<br />
* {{AUR|ttf-irfonts}} - Iran Supreme Council of Information and Communication Technology (SCICT) standard Persian fonts series.<br />
* {{AUR|ttf-borna}} - Borna Rayaneh Persian B font series.<br />
* {{AUR|ttf-sina}} - Sina Pardazesh Persian font series.<br />
* {{AUR|ttf-x2}} - Free fonts with support for Persian, Arabic, Urdu, Pashto, Dari, Uzbek, Kurdish, Uighur, old Turkish (Ottoman) and modern Turkish (Roman).<br />
* {{AUR|ttf-iran-nastaliq}} - A free Unicode calligraphic Persian font created by Iran Supreme Council of Information and Communication Technology (SCICT).<br />
<br />
==== Burmese ====<br />
<br />
* {{AUR|ttf-my-paduk}} - Padauk font for Myanmar/Birmania<br />
* {{AUR|ttf-myanmar-fonts}} - 121 Fonts from myordbok.com<br />
<br />
==== Chinese, Japanese, Korean, Vietnamese ====<br />
<br />
===== Pan-CJK =====<br />
* {{Pkg|noto-fonts-cjk}} - Large collection of fonts which comprehensively support Simplified Chinese, Traditional Chinese, Japanese, and Korean, with a consistent design and look. It is currently a rebadged version of {{Pkg|adobe-source-han-sans-otc-fonts}}.<br />
* {{Pkg|adobe-source-han-sans-otc-fonts}} - Large collection of fonts which comprehensively support Simplified Chinese, Traditional Chinese, Japanese, and Korean, with a consistent design and look.<br />
<br />
===== (Mainly) Chinese =====<br />
<br />
* {{Pkg|adobe-source-han-sans-cn-fonts}} - Simplified Chinese OpenType/CFF fonts<br />
* {{Pkg|adobe-source-han-sans-tw-fonts}} - Traditional Chinese OpenType/CFF fonts<br />
* {{Pkg|wqy-microhei}} - A Sans-Serif style high quality CJKV outline font.<br />
* {{Pkg|wqy-zenhei}} - Hei Ti Style (sans-serif) Chinese Outline font embedded with bitmapped Song Ti (also supporting Japanese (partial) and Korean characters).<br />
* {{Pkg|ttf-arphic-ukai}} - ''Kaiti'' (brush stroke) Unicode font (enabling anti-aliasing is suggested)<br />
* {{Pkg|ttf-arphic-uming}} - ''Mingti'' (printed) Unicode font<br />
* {{Pkg|opendesktop-fonts}} - ''New Sung'' font, previously is ttf-fireflysung package<br />
* {{Pkg|wqy-bitmapfont}} - Bitmapped Song Ti (serif) Chinese font<br />
* {{Pkg|ttf-hannom}} - Chinese and Vietnamese TrueType font<br />
* {{AUR|ttf-i.bming}} - CJK serif font that emphasis on an old-style typeface<br />
* {{AUR|ttf-tw}} - Kai and Song traditional Chinese font from the Ministry of Education of Taiwan<br />
<br />
===== Japanese =====<br />
<br />
* {{Pkg|adobe-source-han-sans-jp-fonts}} - Japanese OpenType/CFF fonts<br />
* {{Pkg|otf-ipafont}} - Formal style Japanese Gothic (sans-serif) and Mincho (serif) fonts set; one of the highest quality open source font. Default of openSUSE-ja.<br />
* {{Pkg|ttf-sazanami}} - Japanese free TrueType font. This is outdated and not maintained any more, but may be defined as a fallback font on several environments.<br />
* {{Pkg|ttf-hanazono}} - A free Japanese kanji font, style Mincho (serif).<br />
* {{AUR|ttf-vlgothic}} - Japanese Gothic fonts. Default of Debian/Fedora/Vine Linux<br />
* {{AUR|ttf-mplus}} - Modern Gothic style Japanese outline fonts. It includes all of Japanese Hiragana/Katakana, Basic Latin, Latin-1 Supplement, Latin Extended-A, IPA Extensions and most of Japanese Kanji, Greek, Cyrillic, Vietnamese with 7 weights (proportional) or 5 weights (monospace).<br />
* {{AUR|ttf-koruri}} - Japanese TrueType font obtained by mixing {{AUR|ttf-mplus}} and Open Sans<br />
* {{AUR|ttf-monapo}} - Japanese fonts to show [[wikipedia:2channel_Shift_JIS_art|2channel Shift JIS art]] properly.<br />
<br />
===== Korean =====<br />
<br />
* {{Pkg|adobe-source-han-sans-kr-fonts}} - Korean OpenType/CFF fonts<br />
* {{Pkg|ttf-baekmuk}} - Collection of Korean TrueType fonts<br />
* {{AUR|ttf-nanum}} - Nanum series TrueType fonts<br />
* {{AUR|ttf-nanumgothic_coding}} - Nanum series fixed width TrueType fonts<br />
* {{AUR|ttf-d2coding}} - D2Coding fixed width TrueType font made by Naver<br />
* {{AUR|spoqa-han-sans}} - Source Han Sans customized by Spoqa<br />
<br />
==== Cyrillic ====<br />
<br />
See also [[#Monospaced]], [[#Sans-serif]] and [[#Serif]].<br />
<br />
* {{AUR|otf-russkopis}} - A free OpenType cursive font for Cyrillic script<br />
* {{AUR|ttf-paratype}} - Font family by ParaType: sans, serif, mono, extended cyrillic and latin, OFL license<br />
<br />
==== Greek ====<br />
<br />
Almost all Unicode fonts contain the Greek character set (polytonic included). Some additional font packages, which might not contain the complete Unicode set but utilize high quality Greek (and Latin, of course) typefaces are:<br />
<br />
* {{AUR|otf-gfs}} - Selection of OpenType fonts from the Greek Font Society<br />
* {{AUR|ttf-mgopen}} - Professional TrueType fonts from Magenta<br />
<br />
==== Hebrew ====<br />
<br />
* {{AUR|culmus}} - Nice collection of free Hebrew fonts<br />
<br />
==== Indic ====<br />
<br />
* {{Pkg|ttf-freebanglafont}} - Font for Bangla<br />
* {{Pkg|ttf-indic-otf}} - Indic OpenType Fonts collection (containing ttf-freebanglafont)<br />
: (This one contains a "look of disapproval" that might be more to your liking than the {{Pkg|bdf-unifont}} one mentioned elsewhere in this document)<br />
* {{AUR|lohit-fonts}} - Indic TrueType fonts from Fedora Project (containing Oriya Fonts and more)<br />
* {{AUR|ttf-devanagarifonts}} - Devanagari TrueType fonts (contains 283 fonts)<br />
* {{AUR|ttf-gujrati-fonts}} - TTF Gujarati fonts (Avantika,Gopika,Shree768)<br />
* {{AUR|ttf-gurmukhi-fonts_sikhnet}} - TrueType Gurmukhi fonts (gurbaniwebthick,prabhki)<br />
* {{AUR|ttf-gurmukhi_punjabi}} - TTF Gurmukhi / Punjabi (contains 252 fonts)<br />
* {{AUR|ttf-kannada-font}} - Kannada, the language of Karnataka state in India<br />
* {{AUR|ttf-tamil}} - Tamil Unicode fonts<br />
<br />
==== Khmer ====<br />
<br />
* {{Pkg|ttf-khmer}} - Font covering glyphs for Khmer language<br />
* [https://www.google.com/fonts/specimen/Hanuman Hanuman] ({{AUR|ttf-google-fonts-git}})<br />
<br />
==== Lao ====<br />
<br />
* {{AUR|ttf-lao}} - Lao TTF font (Phetsarath_OT)<br />
* {{AUR|ttf-lao-fonts}} - Lao TTF fonts, both Unicode and non-Unicode for Windows<br />
<br />
==== Sinhala ====<br />
<br />
* {{AUR|ttf-lklug}} - Sinhala Unicode font<br />
<br />
==== Thai ====<br />
<br />
* {{Pkg|ttf-tlwg}} - Collection of scalable Thai fonts<br />
<br />
==== Tibetan ====<br />
<br />
* {{Pkg|ttf-tibetan-machine}} - Tibetan Machine TTFont<br />
<br />
=== Math ===<br />
<br />
* {{Pkg|font-mathematica}} - Mathematica fonts by Wolfram Research, Inc.<br />
* {{AUR|ttf-mathtype}} - MathType fonts<br />
* {{AUR|ttf-computer-modern-fonts}}, {{AUR|otf-cm-unicode}} - [[wikipedia:Computer Modern|Computer Modern]] (of TeX fame)<br />
* {{AUR|otf-xits}} - An OpenType implementation of [[Wikipedia:STIX Fonts project|STIX Fonts]] with math support<br />
<br />
=== Microsoft fonts ===<br />
<br />
See [[Microsoft fonts]].<br />
<br />
=== Apple OS X fonts ===<br />
<br />
* {{AUR|ttf-mac-fonts}} - Mac OS X TrueType fonts<br />
<br />
=== Monospaced ===<br />
<br />
Here are some suggestions. Every user has their own favorite, so experiment to find yours. <br />
If you are in a hurry, you read Dan Benjamin's blog post: [http://hivelogic.com/articles/top-10-programming-fonts ''Top 10 Programming Fonts''].<br />
<br />
Here is a long list of fonts by Trevor Lowing: http://www.lowing.org/fonts/.<br />
<br />
A comparison with images on Slant: [http://www.slant.co/topics/67/~what-are-the-best-programming-fonts What are the best programming fonts?]<br />
<br />
And a Stack Overflow question with some images: [http://stackoverflow.com/questions/4689/recommended-fonts-for-programming Recommended fonts for programming]<br />
<br />
==== TrueType ====<br />
<br />
* [[Wikipedia:Andalé Mono|Andalé Mono]] ({{AUR|ttf-ms-fonts}})<br />
* [http://www.marksimonson.com/fonts/view/anonymous-pro Anonymous Pro] ({{pkg|ttf-anonymous-pro}}, included in {{AUR|ttf-google-fonts-git}})<br />
* [[Wikipedia:Bitstream Vera|Bitstream Vera Mono]] ({{Pkg|ttf-bitstream-vera}})<br />
* [[Wikipedia:Consolas|Consolas]] ({{AUR|ttf-vista-fonts}}) - Windows programming font<br />
* [[Wikipedia:Courier New|Courier New]] ({{AUR|ttf-ms-fonts}})<br />
* Cousine ({{AUR|ttf-chromeos-fonts}} or {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS replacement for Courier New (metric-compatible)<br />
* [[Wikipedia:DejaVu fonts|DejaVu Sans Mono]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
* [[Wikipedia:Droid (font)|Droid Sans Mono]] ({{Pkg|ttf-droid}}, included in {{AUR|ttf-google-fonts-git}})<br />
* [https://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released Envy Code R] ({{AUR|ttf-envy-code-r}})<br />
* Fantasque Sans Mono ({{AUR|ttf-fantasque-sans}} or {{AUR|ttf-fantasque-sans-git}})<br />
* [[Wikipedia:GNU FreeFont|FreeMono]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [[Wikipedia:Inconsolata|Inconsolata]] ({{Pkg|ttf-inconsolata}}, included in {{AUR|ttf-google-fonts-git}}) - Excellent programming font<br />
* [[Wikipedia:Inconsolata|Inconsolata-g]] ({{AUR|ttf-inconsolata-g}}) - adds some programmer-friendly modifications<br />
* [[Wikipedia:Liberation fonts|Liberation Mono]] ({{Pkg|ttf-liberation}}) - Replacement for Courier New, based on Cousine (metric-compatible)<br />
* [[Wikipedia:Lucida Typewriter|Lucida Typewriter]] (included in package {{AUR|jre}})<br />
* [[Wikipedia:Monaco (typeface)|Monaco]] ({{AUR|ttf-monaco}}) - Popular programming font on OSX/Textmate<br />
* Monofur ({{AUR|ttf-monofur}})<br />
* [[Wikipedia:Source_Code_Pro|Source Code Pro]] ({{pkg|adobe-source-code-pro-fonts}})<br />
<br />
==== Bitmap ====<br />
<br />
* Default 8x16<br />
* Dina ({{Pkg|dina-font}})<br />
* [http://font.gohu.org/ Gohu] ({{AUR|gohufont}})<br />
* Lime ({{Pkg|artwiz-fonts}})<br />
* [[Wikipedia:ProFont|ProFont]] ({{Pkg|profont}})<br />
* [[Wikipedia:Proggy Programming Fonts|Proggy Programming Fonts]] ({{AUR|proggyfonts}})<br />
* Tamsyn ({{Pkg|tamsyn-font}})<br />
* [http://terminus-font.sourceforge.net/ Terminus] ({{Pkg|terminus-font}})<br />
* [https://github.com/lucy/tewi-font Tewi] ({{AUR|bdf-tewi-git}})<br />
* Unifont (glyphs like (look of disapproval)) ({{Pkg|bdf-unifont}})<br />
<br />
=== Sans-serif ===<br />
<br />
* [http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=andika Andika] ({{AUR|ttf-andika}})<br />
* [[Wikipedia:Arial|Arial]] ({{AUR|ttf-ms-fonts}})<br />
* [[Wikipedia:Arial Black|Arial Black]] ({{AUR|ttf-ms-fonts}})<br />
* Arimo ({{AUR|ttf-chromeos-fonts}} or {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS replacement for Arial (metric-compatible)<br />
* [[Wikipedia:Calibri|Calibri]] ({{AUR|ttf-vista-fonts}})<br />
* [[Wikipedia:Candara|Candara]] ({{AUR|ttf-vista-fonts}})<br />
* [[Wikipedia:Corbel (typeface)|Corbel]] ({{AUR|ttf-vista-fonts}})<br />
* [[Wikipedia:DejaVu fonts|DejaVu Sans]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
* [[Wikipedia:Droid (font)|Droid Sans]] ({{Pkg|ttf-droid}}, included in {{AUR|ttf-google-fonts-git}})<br />
* [[Wikipedia:GNU FreeFont|FreeSans]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [[Wikipedia:Impact (typeface)|Impact]] ({{AUR|ttf-ms-fonts}})<br />
* [[Wikipedia:Liberation fonts|Liberation Sans]] ({{Pkg|ttf-liberation}}) Replacement for Arial, based on Arimo (metric-compatible)<br />
* [[Wikipedia:Linux Libertine|Linux Biolinum]] ({{Pkg|ttf-linux-libertine}})<br />
* [[Wikipedia:Lucida Sans|Lucida Sans]] ({{AUR|ttf-ms-fonts}})<br />
* [[Wikipedia:Microsoft Sans Serif|Microsoft Sans Serif]] ({{AUR|ttf-ms-fonts}})<br />
* [[Wikipedia:PT Sans|PT Sans]] ({{AUR|ttf-google-fonts-git}}) - 3 major variations: normal, narrow, and caption - Unicode: Latin, Cyrillic<br />
* [[Wikipedia:Source Sans Pro|Source Sans Pro]] ({{pkg|adobe-source-sans-pro-fonts}})<br />
* [[Wikipedia:Tahoma (typeface)|Tahoma]] ({{AUR|ttf-tahoma}})<br />
* [[Wikipedia:Trebuchet MS|Trebuchet]] ({{AUR|ttf-ms-fonts}})<br />
* [[Wikipedia:Ubuntu Font Family|Ubuntu Font Family]] ({{Pkg|ttf-ubuntu-font-family}})<br />
* [[Wikipedia:Verdana|Verdana]] ({{AUR|ttf-ms-fonts}})<br />
<br />
=== Script ===<br />
<br />
* [[Wikipedia:Comic Sans|Comic Sans]] ({{AUR|ttf-ms-fonts}})<br />
<br />
=== Serif ===<br />
<br />
* [[Wikipedia:Cambria (typeface)|Cambria]] ({{AUR|ttf-vista-fonts}})<br />
* [[Wikipedia:Constantia (typeface)|Constantia]] ({{AUR|ttf-vista-fonts}})<br />
* [[Wikipedia:DejaVu fonts|DejaVu Serif]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
* [[Wikipedia:Droid (font)|Droid Serif]] ({{Pkg|ttf-droid}}, included in {{AUR|ttf-google-fonts-git}})<br />
* [[Wikipedia:GNU FreeFont|FreeSerif]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [[Wikipedia:Gentium|Gentium]] ({{Pkg|ttf-gentium}}) - Unicode: Latin, Greek, Cyrillic, Phonetic Alphabet<br />
* [[Wikipedia:Georgia (typeface)|Georgia]] ({{AUR|ttf-ms-fonts}})<br />
* [[Wikipedia:Liberation fonts|Liberation Serif]] ({{Pkg|ttf-liberation}}) - Replacement for Times New Roman, based on Tinos (metric-compatible)<br />
* [[Wikipedia:Linux Libertine|Linux Libertine]] ({{Pkg|ttf-linux-libertine}}) - Unicode: Latin, Greek, Cyrillic, Hebrew<br />
* [[Wikipedia:Times New Roman|Times New Roman]] ({{AUR|ttf-ms-fonts}})<br />
* Tinos ({{AUR|ttf-chromeos-fonts}} or {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS replacement for Times New Roman (metric-compatible)<br />
<br />
=== Unsorted ===<br />
<br />
{{Style|This section should be absorbed into the Monospace/Serif/Sans-Serif structure}}<br />
<br />
* {{AUR|ttf-google-fonts-git}} - a huge collection of free fonts (including ubuntu, inconsolata, droid, etc.) - Note: Your font dialog might get very long as >100 fonts will be added.<br />
* {{Pkg|ttf-mph-2b-damase}} - Covers full plane 1 and several scripts<br />
* {{Pkg|ttf-symbola}} - Provides emoji and many many other symbols<br />
* {{Pkg|font-bh-ttf}} - X.Org Luxi fonts<br />
* {{Pkg|ttf-cheapskate}} - Font collection from ''dustismo.com''<br />
* {{Pkg|ttf-junicode}} - Junius font containing almost complete medieval latin script glyphs<br />
* {{Pkg|xorg-fonts-type1}} - IBM Courier and Adobe Utopia sets of [[Wikipedia:PostScript fonts|PostScript fonts]]<br />
* {{AUR|all-repository-fonts}} - Meta package for all fonts in the official repositories.<br />
<br />
== Fallback font order with X11 ==<br />
<br />
Fontconfig automatically chooses a font that matches the current requirement. That is to say, if one is looking at a window containing English and Chinese for example, it will switch to another font for the Chinese text if the default one does not support it.<br />
<br />
Fontconfig lets every user configure the order they want via {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}.<br />
If you want a particular Chinese font to be selected after your favorite Serif font, your file would look like this:<br />
<br />
<?xml version="1.0"?><br />
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"><br />
<fontconfig><br />
<alias><br />
<family>serif</family><br />
<prefer><br />
<family>Your favorite Latin Serif font name</family><br />
<family>Your Chinese font name</family><br />
</prefer><br />
</alias><br />
</fontconfig><br />
<br />
{{Tip|If you use a Chinese locale, set {{ic|LC_LANG}} to {{ic|und}} to make this work. Otherwise both English and Chinese text will be rendered in the Chinese font.}}<br />
<br />
You can add a section for Sans-serif and monospace as well. For more informations, have a look at the fontconfig manual.<br />
<br />
== Font alias ==<br />
<br />
There are several font aliases which represent other fonts in order that applications may use similar fonts. The most common aliases are: {{ic|serif}} for a font of the serif type (e.g. DejaVu Serif); {{ic|sans-serif}} for a font of the sans-serif type (e.g. DejaVu Sans); and {{ic|monospace}} for a monospaced font (e.g. DejaVu Sans Mono). However, the fonts which these aliases represent may vary and the relationship is often not shown in font management tools, such as those found in [[KDE]] and other [[desktop environments]].<br />
<br />
To reverse an alias and find which font it is representing, run:<br />
<br />
{{hc|$ fc-match monospace|<br />
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"<br />
}}<br />
<br />
In this case, {{ic|DejaVuSansMono.ttf}} is the font represented by the monospace alias.<br />
<br />
== Tips and tricks ==<br />
<br />
=== List all installed fonts ===<br />
<br />
You can use the following command to list all installed fonts that are available on your system. <br />
<br />
$ fc-list<br />
<br />
=== Set terminal font on-the-fly ===<br />
<br />
{{Expansion|Which terminals specifically support this method? Where is the documentation for the escape codes?}}<br />
<br />
For terminal emulators that use {{ic|Xresources}}, fonts can be set by using escape sequences. Specifically, echo {{ic|\033]710;$font\007}} to change the normal font ({{ic|*font}} in {{ic|~/.Xresources}}), and replace {{ic|710}} with {{ic|711}}, {{ic|712}}, and {{ic|713}} to change the {{ic|*boldFont}}, {{ic|*italicFont}}, and {{ic|*boldItalicFont}}, respectively.<br />
<br />
{{ic|$font}} can be anything the terminal emulator will support.<br />
<br />
=== Application-specific font cache ===<br />
<br />
Matplotlib ({{pkg|python-matplotlib}} or {{pkg|python2-matplotlib}}) uses its own font cache, so after updating fonts, be sure to remove {{ic|$HOME/.matplotlib/fontList.cache}}, <br />
{{ic|$HOME/.cache/matplotlib/fontList.cache}}, {{ic|$HOME/.sage/matplotlib-1.2.1/fontList.cache}}, etc. so it will regenerate its cache and find the new fonts [http://matplotlib.1069221.n5.nabble.com/getting-matplotlib-to-recognize-a-new-font-td40500.html].<br />
<br />
== See also ==<br />
<br />
* [http://behdad.org/text/ State of Text Rendering]</div>Qguvhttps://wiki.archlinux.org/index.php?title=Security&diff=410615Security2015-11-29T23:15:00Z<p>Qguv: added a placeholder argument to the user unlock command for clarity</p>
<hr />
<div>[[Category:Security]]<br />
[[Category:File systems]]<br />
[[Category:Networking]]<br />
[[ja:セキュリティ]]<br />
[[ru:Security]]<br />
{{Related articles start}}<br />
{{Related|List of Applications/Security}}<br />
{{Related|:Category:Security}}<br />
{{Related articles end}}<br />
This article contains recommendations and best practices for hardening an Arch Linux system.<br />
<br />
== Concepts ==<br />
<br />
* It ''is'' possible to tighten the security so much as to make your system unusable. The trick is to secure it without overdoing it.<br />
* There are many other things that can be done to heighten the security, but the biggest threat is, and will always be, the user. When you think security, you have to think layers. When one layer is breached, another should stop the attack. But you can never make the system 100% secure unless you unplug the machine from all networks, lock it in a safe and never use it.<br />
* Be a little paranoid. It helps. And be suspicious. If anything sounds too good to be true, it probably is!<br />
* The [[Wikipedia:Principle of least privilege|principle of least privilege]]: each part of a system should only be able to access what is required to use it, and nothing more.<br />
<br />
== Passwords ==<br />
<br />
Passwords are key to a secure linux system. They secure your [[Users and groups|user accounts]], [[Disk encryption|encrypted filesystems]], and [[SSH keys|SSH]]/[[GPG]] keys. They are the main way a computer chooses to trust the person using it, so a big part of security is just about picking secure passwords and protecting them.<br />
<br />
=== Choosing secure passwords ===<br />
<br />
When relying on a passphrase, it must be complex enough to not be easily guessed from e.g. personal information, or [[Wikipedia:Password cracking|cracked]] using e.g. brute-force attacks. The tenets of strong passphrases are based on ''length'' and ''randomness''. In cryptography the quality of a passphrase is referred to as its [[Wikipedia:Entropic security]]. <br />
<br />
Insecure passwords include those containing:<br />
<br />
* Personally identifiable information (e.g., your dog's name, date of birth, area code, favorite video game)<br />
* Simple character substitutions on words (e.g., {{ic|k1araj0hns0n}})<br />
* Root "words" or common strings followed or preceded by added numbers, symbols, or characters (e.g., {{ic|DG091101%}})<br />
* Common phrases or short phrases of grammatically related words (e.g. {{ic|all of the lights}}), and even with character substitution.<br />
<br />
The right choice for a password is something long (8-20 characters, depending on importance) and seemingly completely random.<br />
A good technique for building secure, seemingly random passwords is to base them on characters from every word in a sentence.<br />
Take for instance “the girl is walking down the rainy street” could be translated to {{ic|t6!WdtR5}} or, less simply, {{ic|t&6!RrlW@dtR,57}}.<br />
This approach could make it easier to remember a password, but note that the the various letters have very different probabilities of being found at the start of words ([[Wikipedia:Letter frequency#Relative frequencies of the first letters of a word in the English language|Wikipedia:Letter frequency]]).<br />
<br />
A better approach is to generate pseudo-random passwords with tools like {{Pkg|pwgen}} or {{Pkg|apg}}: for memorizing them, one technique (for ones typed often) is to generate a long password and memorize a minimally secure number of characters, temporarily writing down the full generated string. Over time, increase the number of characters typed - until the password is ingrained in muscle memory and need not be remembered. This technique is more difficult, but can provide confidence that a password will not turn up in wordlists or "intelligent" brute force attacks that combine words and substitute characters.<br />
<br />
It is also very effective to combine these two techniques by saving long, complex random passwords with a [[List of applications/Security#Password managers|password manager]], which will be in turn accessed with a mnemonic password that will have to be used only for that purpose, especially avoiding to ever transmit it over any kind of network. This method of course limits the use of the stored passwords to the terminals where the database is available for reading (which on the other hand could be seen as an added security feature).<br />
<br />
Also consider the [http://world.std.com/~reinhold/diceware.html Diceware Passphrase] method, using a sufficient number of words.<br />
<br />
See Bruce Schneier's article [https://www.schneier.com/blog/archives/2014/03/choosing_secure_1.html Choosing Secure Passwords] or [http://www.iusmentis.com/security/passphrasefaq/ The passphrase FAQ] for some additional background. Also, you can check entropy level of your chosen passphrase [http://rumkin.com/tools/password/passchk.php here], or consulting [[Wikipedia:Password strength]].<br />
<br />
=== Maintaining passwords ===<br />
<br />
Once you pick a strong password, be sure to keep it safe. Watch out for [[Wikipedia:Social engineering (security)|manipulation]], [[Wikipedia:Shoulder surfing (computer security)|shoulder surfing]], and avoid reusing passwords so insecure servers cannot leak more information than necessary. [[List of applications/Security#Password managers|Password managers]] can help manage large numbers of complex passwords: if you are copy-pasting the stored passwords from the manager to the applications that need them, make sure to clear the copy buffer every time, and ensure they are not saved in any kind of log (e.g. do not paste them in plain terminal commands, which would store them in files like {{ic|.bash_history}}). [[Wikipedia:LastPass Password Manager|Lastpass]] is a service that stores encrypted passwords online for synchronization between devices, but requires that you trust both closed-source code and an external corporation. <br />
<br />
As a rule, do not pick insecure passwords just because secure ones are harder to remember. Passwords are a balancing act. It is better to have an encrypted database of secure passwords, guarded behind a key and one strong master password, than it is to have many similar weak passwords. Writing passwords down is perhaps equally effective[https://www.schneier.com/blog/archives/2005/06/write_down_your.html], avoiding potential vulnerabilities in software solutions while requiring physical security.<br />
<br />
Another aspect of the strength of the passphrase is that it must not be easily recoverable from other places.<br />
If you use the same passphrase for disk encryption as you use for your login password (useful e.g. to auto-mount the encrypted partition or folder on login), make sure that {{ic|/etc/shadow}} either also ends up on an encrypted partition, or uses a strong hash algorithm (i.e. sha512/bcrypt, not md5) for the stored password hash (see [[SHA password hashes]] for more info).<br />
<br />
=== Password hashes ===<br />
<br />
{{Expansion|Mention [[Wikipedia:Key derivation function|key derivation functions]], in particular PBKDF2, bcrypt and scrypt, how to use them, advantages and disadvantages, especially regarding custom-hardware-based brute-force attacks.|section=Removal of incorrect warning}}<br />
<br />
By default, Arch stores the hashed user passwords in the root-only-readable {{ic|/etc/shadow}} file, separated from the other user parameters stored in the world-readable {{ic|/etc/passwd}} file, see [[Users and groups#User database]]. See also [[#Restricting root]].<br />
<br />
Passwords are set with the '''passwd''' command, which [[Wikipedia:Key stretching|stretches]] them with the [[Wikipedia:Crypt (C)|crypt]] function and then saves them in {{ic|/etc/shadow}}. See also [[SHA password hashes]]. The passwords are also [[Wikipedia:Salt (cryptography)|salted]] in order to defend them against [[Wikipedia:Rainbow table|rainbow table]] attacks.<br />
<br />
See also [http://www.slashroot.in/how-are-passwords-stored-linux-understanding-hashing-shadow-utils How are passwords stored in Linux (Understanding hashing with shadow utils)].<br />
<br />
=== Enforcing strong passwords using pam_cracklib ===<br />
<br />
''pam_cracklib'' provides protection against [[Wikipedia:Dictionary attack|Dictionary attacks]] and helps configure a password policy that can be enforced throughout the system.<br />
<br />
{{Warning|The ''root'' account is not affected by this policy.}}<br />
{{Note|You can use the ''root'' account to set a password for a user that bypasses the desired/configured policy. This is useful when setting temporary passwords.}}<br />
<br />
If for example you want to enforce this policy:<br />
* prompt 2 times for password in case of an error<br />
* 10 characters minimum length (minlen option)<br />
* at least 6 characters should be different from old password when entering a new one (difok option)<br />
* at least 1 digit (dcredit option)<br />
* at least 1 uppercase (ucredit option)<br />
* at least 1 other character (ocredit option)<br />
* at least 1 lowercase (lcredit option)<br />
<br />
Edit the {{ic|/etc/pam.d/passwd}} file to read as:<br />
{{bc|1=<br />
#%PAM-1.0<br />
password required pam_cracklib.so retry=2 minlen=10 difok=6 dcredit=-1 ucredit=-1 ocredit=-1 lcredit=-1<br />
password required pam_unix.so use_authtok sha512 shadow<br />
}}<br />
<br />
The {{ic|password required pam_unix.so use_authtok}} instructs the ''pam_unix'' module to not prompt for a password but rather to use the one provided by ''pam_cracklib''.<br />
<br />
You can refer to the pam_cracklib(8) and pam_unix(8) man pages for more information.<br />
<br />
== Storage ==<br />
<br />
=== Disk encryption ===<br />
<br />
[[Disk encryption]], preferably full disk encryption with a [[#Passwords|strong passphrase]], is the only way to guard data against physical recovery. This provides complete security when the computer is turned off or the disks in question are unmounted.<br />
<br />
Once the computer is powered on and the drive is mounted, however, its data becomes just as vulnerable as an unencrypted drive. It is therefore best practice to unmount data partitions as soon as they are no longer needed.<br />
<br />
Certain programs, like [[Dm-crypt]], allow the user to encrypt a loop file as a virtual volume. This is a reasonable alternative to full disk encryption when only certain parts of the system need be secure.<br />
<br />
=== File systems ===<br />
<br />
{{Accuracy|You don't mount a partition, but a file system; i.e. this is not related to [[partitioning]]. In {{ic|fs.protected_hardlinks}} etc., the "fs" stands for "file system".}}<br />
<br />
The kernel now prevents security issues related to hardlinks and symlinks if the {{ic|fs.protected_hardlinks}} and {{ic|fs.protected_symlinks}} sysctl switches are enabled, so there is no longer a major security benefit from separating out world-writable directories.<br />
<br />
Partitions containing world-writable directories can still be kept separate as a coarse way of limiting the damage from disk space exhaustion. However, filling a partition like {{ic|/var}} or {{ic|/tmp}} is enough to take down services. More flexible mechanisms for dealing with this concern exist (like quotas), and some filesystems include related features themselves (btrfs has quotas on subvolumes).<br />
<br />
==== Mount options ====<br />
<br />
Following the principle of least privilege, partitions should be mounted with the most restrictive mount options possible (without losing functionality).<br />
<br />
Relevant mount options are:<br />
<br />
*{{ic|nodev}}: Do not interpret character or block special devices on the file system.<br />
*{{ic|nosuid}}: Do not allow set-user-identifier or set-group-identifier bits to take effect.<br />
*{{ic|noexec}}: Do not allow direct execution of any binaries on the mounted filesystem.<br />
<br />
Data partitions should always be mounted with {{ic|nodev}}, {{ic|nosuid}}, {{ic|noexec}}. Potential usage is presented in the table below.<br />
<br />
{| class="wikitable"<br />
| align="center" |'''Partition'''<br />
| align="center" |{{ic|nodev}}<br />
| align="center" |{{ic|nosuid}}<br />
| align="center" |{{ic|noexec}}<br />
|-<br />
| {{ic|/var}}||yes||yes||yes <sup>[1]</sup><br />
|-<br />
| {{ic|/home}}||yes||yes||yes, if you do not code, use wine or steam<br />
|-<br />
| {{ic|/dev/shm}}||yes||yes||yes<br />
|-<br />
| {{ic|/tmp}}||yes||yes||maybe, breaks compiling packages and various other things<br />
|-<br />
| {{ic|/boot}}||yes||yes||yes<br />
|-<br />
|}<br />
<br />
<sup>[1]</sup> Note that some packages (building {{Pkg|nvidia-dkms}} for example) may require {{ic|exec}} on {{ic|/var}}.<br />
<br />
=== File access permissions ===<br />
<br />
The default permissions allow read access to almost everything and changing the permissions can hide valuable information from an attacker who gains access to a non-root account such as the http or nobody users.<br />
<br />
For example:<br />
<br />
# chmod 700 /boot /etc/{iptables,arptables}<br />
<br />
The default [[Umask]] can be changed to improve security for newly created files. The [http://www.nsa.gov/ia/_files/os/redhat/rhel5-guide-i731.pdf NSA RHEL5 Security Guide] suggests a umask of {{ic|077}} for maximum security, which makes new files not readable by users other than the owner. To change this, see [[Umask#Setting the umask]].<br />
<br />
== User setup ==<br />
<br />
After installation make a normal user for daily use. Do not use the root user for daily use.<br />
<br />
=== Lockout user after three failed login attempts ===<br />
<br />
To further heighten the security it is possible to lockout a user after a specified number of failed login attempts. The user account can either be locked until the root user unlocks it, or automatically be unlocked after a set time.<br />
To lockout a user for ten minutes after three failed login attempts you have to modify {{ic|/etc/pam.d/system-login}}:<br />
<br />
{{hc|/etc/pam.d/system-login|<br />
2=auth required pam_tally.so deny=2 unlock_time=600 onerr=succeed file=/var/log/faillog<br />
#auth required pam_tally.so onerr=succeed file=/var/log/faillog<br />
}}<br />
<br />
If you do not comment the second line every failed login attempt will be counted twice. That is all there is to it. If you feel adventurous, make three failed login attempts. Then you can see for yourself what happens. To unlock a user manually do:<br />
<br />
# pam_tally --user ''username'' --reset<br />
<br />
If you want to permanently lockout a user after 3 failed login attempts remove the {{ic|unlock_time}} part of the line. The user can then not login until root unlocks the account.<br />
<br />
=== Limit amount of processes ===<br />
<br />
On systems with many, or untrusted users, it is important to limit the number of processes each can run at once, therefore preventing [[Wikipedia:Fork bomb|fork bombs]] and other denial of service attacks. {{ic|/etc/security/limits.conf}} determines how many processes each user, or group can have open, and is empty (except for useful comments) by default. adding the following lines to this file will limit all users to 100 active processes, unless they use the ulimit command to explicitly raise their maximum to 200 for one session. These values can be changed according to the appropriate number of processes a user should have running, or the hardware of the box you are administrating. <br />
<br />
* soft nproc 100<br />
* hard nproc 200<br />
<br />
== Restricting root ==<br />
<br />
The root user is, by definition, the most powerful user on a system. Because of this, there are a number of ways to keep the power of the root user while limiting its ability to cause harm, or at least to make root user actions more traceable.<br />
<br />
=== Use sudo instead of su ===<br />
<br />
Using [[sudo]] for privileged access is preferable to [[su]] for [[Su#Security|a number of reasons]].<br />
<br />
* It keeps a log of which normal privilege user has run each privileged command.<br />
* The root user password need not be given out to each user who requires root access.<br />
* {{ic|sudo}} prevents users from accidentally running commands as ''root'' that do not need root access, because a full root terminal is not created. This aligns with the [[Wikipedia:Principle of least privilege|principle of least privilege]].<br />
* Individual programs may be enabled per user, instead of offering complete root access just to run one command. For example, to give the user ''alice'' access to a particular program:<br />
<br />
# visudo<br />
<br />
{{hc|/etc/sudoers|<br />
alice ALL &#61; NOPASSWD: /path/to/program}}<br />
<br />
Or, individual commands can be allowed for all users. To mount Samba shares from a server as a regular user:<br />
<br />
%users ALL=/sbin/mount.cifs,/sbin/umount.cifs<br />
<br />
This allows all users who are members of the group users to run the commands {{ic|/sbin/mount.cifs}} and {{ic|/sbin/umount.cifs}} from any machine (ALL).<br />
<br />
{{Tip|<br />
To use {{ic|nano}} instead of {{ic|vi}} with {{ic|visudo}},<br />
<br />
{{hc|/etc/sudoers|<br />
2=Defaults editor=/usr/bin/rnano<br />
}}<br />
<br />
Exporting {{ic|1=# EDITOR=nano visudo}} is regarded as a severe security risk since everything can be used as an {{ic|EDITOR}}.<br />
}}<br />
<br />
==== Editing files using sudo ====<br />
<br />
Running a text editor as root can be a security vulnerability as many editors can run arbitrary shell commands or affect files other than the one you intend to edit. To avoid this, use {{ic|sudoedit filename}} (equivalently, {{ic|sudo -e filename}}) to edit files. This edits a copy of the file using your normal user privileges and then overwrites the original using sudo only after the editor is closed. You can change the editor this uses by setting the {{ic|SUDO_EDITOR}} environment variable:<br />
<br />
export SUDO_EDITOR=vim<br />
<br />
Alternatively, use an editor like {{ic|rvim}} which has restricted capabilities in order to be safe to run as root.<br />
<br />
=== Restricting root login ===<br />
<br />
Once [[sudo]] is properly configured, full root access can be heavily restricted or denied without losing much usability.<br />
<br />
==== Allow only certain users ====<br />
<br />
The [[Wikipedia:Pluggable authentication module|PAM]] {{ic|pam_wheel.so}} lets you allow only users in the group {{ic|wheel}} to login using {{ic|su}}. Edit both {{ic|/etc/pam.d/su}} and {{ic|/etc/pam.d/su-l}}, then uncomment the line:<br />
<br />
{{bc|<nowiki><br />
# Uncomment the following line to require a user to be in the "wheel" group.<br />
auth required pam_wheel.so use_uid<br />
</nowiki>}}<br />
<br />
This means only users who are already able to run privileged commands may login as root.<br />
<br />
==== Denying ssh login ====<br />
<br />
Even if you do not wish to deny root login for local users, it is always good practice to [[Ssh#Deny|deny root login via SSH]]. The purpose of this is to add an additional layer of security before a user can completely compromise your system remotely.<br />
<br />
==Mandatory access control==<br />
<br />
[[Wikipedia:Mandatory Access Control|Mandatory access control]] (MAC) is a type of security policy that differs significantly from the [[Wikipedia:Discretionary Access Control|discretionary access control]] (DAC) used by default in Arch and most Linux distributions. MAC essentially means that every action a program could perform that affects the system in any way is checked against a security ruleset. This ruleset, in contrast to DAC methods, cannot be modified by users. Using virtually any mandatory access control system will significantly improve the security of your computer, although there are differences in how it can be implemented.<br />
<br />
=== Pathname MAC ===<br />
<br />
Pathname-based access control is a simple form of access control that offers permissions based on the path of a given file. The downside to this style of access control is that permissions are not carried with files if they are moved about the system. On the positive side, pathname-based MAC can be implemented on a much wider range of filesystems, unlike labels-based alternatives.<br />
<br />
*[[AppArmor]] is a [[Wikipedia:Canonical|Canonical]]-maintained MAC implementation seen as an "easier" alternative to SELinux.<br />
*[[Tomoyo]] is another simple, easy-to-use system offering mandatory access control. It is designed to be both simple in usage and in implementation, requiring very few dependencies.<br />
<br />
=== Role-based access control ===<br />
<br />
The MAC implementation grsecurity supports is called role-based access control. RBAC associates roles with each user. Each role defines what operations can be performed on certain objects. Given a well-written collection of roles and operations your users will be restricted to perform only those tasks that you tell them they can do. The default "deny-all" ensures you that a user cannot perform an action you have not thought of.<br />
<br />
*[[Grsecurity#RBAC|Grsecurity RBAC]] has a learning mode like AppArmor for easy configuration<br />
*[[Grsecurity#RBAC|Grsecurity RBAC]] does not rely on extra meta-data like SELinux. RBAC is significantly faster then SELinux.<br />
<br />
=== Labels MAC ===<br />
<br />
Labels-based access control means the extended attributes of a file are used to govern its security permissions. While this system is arguably more flexible in its security offerings than pathname-based MAC, it only works on filesystems that support these extended attributes.<br />
<br />
*[[SELinux]], based on a [[Wikipedia:NSA|NSA]] project to improve Linux security, implements MAC completely separate from system users and roles. It offers an extremely robust multi-level MAC policy implementation that can easily maintain control of a system that grows and changes past its original configuration.<br />
<br />
=== Access Control Lists ===<br />
<br />
[[Wikipedia:Access control list|Access control lists]] (ACLs) are an alternative to attaching rules directly to the filesystem in some way. ACLs implement access control by checking program actions against a list of permitted behavior.<br />
<br />
*[[grsecurity]] implements ACL access control, as well as a complete kernel patchset focused on improving security. Its changes extend to control of memory allocation, improved chroot restrictions, and rules involving specific network behavior.<br />
<br />
== Kernel hardening ==<br />
<br />
=== Restricting access to kernel logs ===<br />
<br />
The kernel logs contain useful information for an attacker trying to exploit kernel vulnerabilities, such as sensitive memory addresses. The {{ic|kernel.dmesg_restrict}} flag was to forbid access to the logs without the {{ic|CAP_SYS_ADMIN}} capability (which only processes running as root have by default).<br />
<br />
{{hc|/etc/sysctl.d/50-dmesg-restrict.conf|2=kernel.dmesg_restrict = 1}}<br />
<br />
=== Restricting access to kernel pointers in the proc filesystem ===<br />
<br />
Enabling {{ic|kernel.kptr_restrict}} will hide kernel symbol addresses in {{ic|/proc/kallsyms}} from regular users without {{ic|CAP_SYSLOG}}, making it more difficult for kernel exploits to resolve addresses/symbols dynamically. This will not help that much on a pre-compiled Arch Linux kernel, since a determined attacker could just download the kernel package and get the symbols manually from there, but if you're compiling your own kernel, this can help mitigating local root exploits. This will break some {{Pkg|perf}} commands when used by non-root users (but many {{Pkg|perf}} features require root access anyway). See {{Bug|34323}} for more information.<br />
<br />
{{hc|/etc/sysctl.d/50-kptr-restrict.conf|2=kernel.kptr_restrict = 1}}<br />
<br />
=== Keep BPF JIT compiler disabled ===<br />
<br />
The Linux kernel includes the ability to compile BPF/Seccomp rule sets to native code as a performance optimization. The {{ic|net.core.bpf_jit_enable}} flag should be left at 0 for a maximum level of security.<br />
<br />
This can be helpful in specific domains, but is not usually useful. A JIT compiler opens up the possibility for an attacker to perform a heap spraying attack, where they fill the kernel's heap with malicious code. This code can then potentially be executed via another exploit, like an incorrect function pointer dereference.<br />
<br />
{{note|[[grsecurity]] includes JIT hardening for the BPF JIT compiler, greatly reducing the risk of exploitation.}}<br />
<br />
=== ptrace scope ===<br />
<br />
Arch enables the Yama LSM by default, providing a {{ic|kernel.yama.ptrace_scope}} flag. This flag is enabled by default and prevents processes from performing a {{ic|ptrace}} call on other processes outside of their scope without {{ic|CAP_SYS_PTRACE}}. While many debugging tools require this for some of their functionality, it is a significant improvement in security. Without this feature, there is essentially no separation between processes running as the same user without applying extra layers like namespaces. The ability to attach a debugger to an existing process is a demonstration of this weakness.<br />
<br />
{{note|In [[grsecurity]], this protection is toggled via the {{ic|kernel.grsecurity.harden_ptrace}} flag instead.}}<br />
<br />
==== Examples of broken functionality ====<br />
<br />
{{Note|You can still execute these commands as root (such as allowing them through [[sudo]] for certain users, with or without a password), or enable ptrace selectively through {{ic|1=setcap cap_sys_ptrace=eip ''/path/to/program''}}.}}<br />
<br />
* {{ic|gdb -p $PID}}<br />
* {{ic|strace -p $PID}}<br />
* {{ic|perf trace -p $PID}}<br />
* {{ic|reptyr $PID}}<br />
<br />
=== hidepid ===<br />
<br />
The kernel has the ability to hide other users' processes from unprivileged users by mounting the {{ic|proc}} filesystem with {{ic|1=hidepid=1}} or {{ic|1=hidepid=2}}. This can be automated with the {{pkg|hidepid}} package. It will install polkit and systemd-logind exceptions and make sure {{ic|/proc}} is mounted with {{ic|1=hidepid=2,gid=26}}.<br />
<br />
=== grsecurity ===<br />
<br />
The [[grsecurity]] kernel provides many security-related improvements. It hardens both the kernel and userspace against common memory corruption vulnerabilities, along with providing many miscellaneous features and a role-based access control system. It is the only way to secure the kernel itself against exploitation, which is the most important improvement for a system already making good use of user isolation, containers/chroots and sandboxes.<br />
<br />
== Sandboxing applications ==<br />
<br />
=== Firejail ===<br />
<br />
[[Firejail]] is an easy to use and simple tool for sandboxing applications and servers alike. Firejail is suggested for browsers and internet facing applications, as well as any servers you may be running. Firejail is further enhanced when used with Grsecurity.<br />
<br />
=== chroots ===<br />
<br />
Manual [[chroot]] jails can also be constructed.<br />
<br />
=== Linux containers ===<br />
<br />
[[Linux Containers]] are another good option when you need more separation than the other options (short of KVM and Virtualbox) provide. LXC's run on top of the existing kernel in a pseudo-chroot with their own virtual hardware.<br />
<br />
=== Other virtualization options ===<br />
<br />
Using other, more full virtualization options such as [[VirtualBox]], [[KVM]], or [[Xen]] can also improve security in the event you plan on running risky applications or browsing dangerous websites.<br />
<br />
== Network and firewalls ==<br />
<br />
=== Firewalls ===<br />
<br />
While the stock Arch kernel is capable of using [[Wikipedia:Netfilter|Netfilter]]'s [[iptables]], it is not enabled by default. It is highly recommended to set up some form of firewall to protect the services running on the system. Many resources (including ArchWiki) do not state explicitly which services are worth protecting, so enabling a firewall is a good precaution.<br />
<br />
*See [[iptables]] for general info.<br />
*See [[Simple stateful firewall]] for a guide on setting up an iptables firewall.<br />
*See [[Firewalls]] for other ways of setting up netfilter.<br />
*See [[Ipset]] for blocking lists of ip addresses, such as those from Bluetack.<br />
<br />
=== Kernel parameters ===<br />
<br />
Kernel parameters which affect networking can be set using [[Sysctl]]. For how to do this, see [[Sysctl#TCP/IP stack hardening]].<br />
<br />
=== SSH ===<br />
<br />
Avoid using [[Secure Shell]] without [[SSH keys#Disabling password logins|requiring SSH keys]]. This prevents [[Wikipedia:Brute-force attack|brute-force attacks]]. Alternatively [[Fail2ban]] or [[Sshguard]] offer lesser forms of protection by monitoring logs and writing [[Iptables|iptables rules]] but open up the potential for a denial of serving, since an attacker can spoof packets as if they came from the administrator after identifying their address.<br />
<br />
[[Secure Shell#Deny root login|Denying root login]] is good practice, both for tracing intrusions and adding an additional layer of security before root access.<br />
<br />
===DNS===<br />
<br />
See [[DNSSEC]] and [[DNSCrypt]].<br />
<br />
== Authenticating packages ==<br />
<br />
[http://www.cs.arizona.edu/stork/packagemanagersecurity/attacks-on-package-managers.html#overview Attacks on package managers] are possible without proper use of package signing, and can affect even package managers with [http://www.cs.arizona.edu/stork/packagemanagersecurity/faq.html proper signature systems]. Arch uses package signing by default and relies on a web of trust from 5 trusted master keys. See [[Pacman-key]] for details.<br />
<br />
== Follow NVD/CVE alerts ==<br />
<br />
Subscribe to the Common Vulnerabilities and Exposure Security Alert updates, made available by National Vulnerability Database, and found on the [http://nvd.nist.gov/download.cfm NVD Download webpage]. See also [[Arch CVE Monitoring Team]] and [[CVE-2014]].<br />
<br />
{{Warning|Do not be tempted to perform [[partial upgrades]], as they are not supported by Arch Linux and may cause instability: the whole system should be upgraded when upgrading a component. Also note that infrequent system updates can complicate the update process.}}<br />
<br />
== Physical security ==<br />
<br />
{{Note|You can ignore this section if you just want to secure your computer against remote threats.}}<br />
<br />
Physical access to a computer is root access given enough time and resources. However, a high ''practical'' level of security can be obtained by putting up enough barriers.<br />
<br />
An attacker can gain full control of your computer on the next boot by simply attaching a malicious IEEE 1394 (FireWire), Thunderbolt or PCI Express device as they are given full memory access.[http://www.breaknenter.org/projects/inception/] There is little you can do from preventing this, or modification of the hardware itself - such as flashing malicious firmware onto a drive. However, the vast majority of attackers will not be this knowledgeable and determined.<br />
<br />
[[#Disk encryption]] will prevent access to your data if the computer is stolen, but malicious firmware can be installed to obtain this data upon your next log in by a resourceful attacker.<br />
<br />
=== Locking down BIOS ===<br />
<br />
Adding a password to the BIOS prevents someone from booting into removable media, which is basically the same as having root access to your computer. You should make sure your drive is first in the boot order and disable the other drives from being bootable if you can.<br />
<br />
=== Bootloaders ===<br />
<br />
It is highly important to protect your bootloader. There is a magic kernel parameter called {{ic|1=init=/bin/sh}}. This makes any user/login restrictions totally useless.<br />
<br />
==== Syslinux ====<br />
<br />
Syslinux supports [[Syslinux#Security|password-protecting your bootloader]].<br />
It allows you to set either a per-menu-item password or a global bootloader password.<br />
<br />
==== GRUB ====<br />
<br />
[[GRUB]] supports bootloader passwords as well. See [[GRUB/Tips and tricks#Password protection of GRUB menu]] for details. It also has support for [[GRUB#Boot_partition|encrypted boot partitions]], which only leaves some parts of the bootloader code unencrypted. GRUB's configuration, [[kernel]] and [[initramfs]] are encrypted.<br />
<br />
=== Denying console login as root ===<br />
<br />
Changing the configuration to disallow root to login from the console makes it harder for an intruder to gain access to the system. The intruder would have to guess both a user-name that exists on the system and that users password. When root is allowed to log in via the console, an intruder only needs to guess a password.<br />
Blocking root login at the console is done by commenting out the tty lines in {{ic|/etc/securetty}}.<br />
{{hc|/etc/securetty|<br />
#tty1<br />
}}<br />
<br />
Repeat for any tty you wish to block.<br />
To check the effect of this change, start by commenting out only one line and go to that particular console and try to login as root. You will be greeted by the message {{ic|Login incorrect}}. Now that we are sure it works, go back and comment out the rest of the tty lines.<br />
{{Note|If you see {{ic|ttyS0}} this is for a serial console. Similarly, on Xen virtualized systems {{ic|hvc0}} is for the administrator.}}<br />
<br />
=== Automatic logout ===<br />
<br />
If you are using [[Bash]] or [[Zsh]], you can set {{ic|TMOUT}} for an automatic logout from shells after a timeout.<br />
<br />
For example, the following will automatically log out from virtual consoles (but not terminal emulators in X11):<br />
<br />
{{hc|/etc/profile.d/shell-timeout.sh|<nowiki><br />
TMOUT="$(( 60*10 ))";<br />
[ -z "$DISPLAY" ] && export TMOUT;<br />
case $( /usr/bin/tty ) in<br />
/dev/tty[0-9]*) export TMOUT;;<br />
esac<br />
</nowiki>}}<br />
<br />
If you really want EVERY Bash/Zsh prompt (even within X) to timeout, use:<br />
<br />
$ export TMOUT="$(( 60*10 ))";<br />
<br />
Note that this will not work if there is some command running in the shell (eg.: an SSH session or other shell without {{ic|TMOUT}} support). But if you are using VC mostly for restarting frozen GDM/Xorg as root, then this is very usefull.<br />
<br />
== See also ==<br />
<br />
* [[DeveloperWiki:Security]]<br />
* ArchWiki's Current list of security applications: [[List of applications/Security|Lists of Applications: Security]]<br />
* [http://www.puschitz.com/SecuringLinux.shtml Securing and Hardening Red Hat Linux Production Systems]<br />
* [http://www.ibm.com/developerworks/linux/tutorials/l-harden-desktop/index.html Hardening the linux desktop]<br />
* [http://www.ibm.com/developerworks/linux/tutorials/l-harden-server/index.html Hardening the linux server]<br />
* [http://www.faqs.org/docs/securing/index.html Securing and Optimizing Linux]<br />
* [http://www.auscert.org.au/5816 UNIX and Linux Security Checklist v3.0]<br />
* [http://wiki.centos.org/HowTos/OS_Protection CentOS Wiki: OS Protection]<br />
* [http://www.debian.org/doc/manuals/securing-debian-howto/securing-debian-howto.en.pdf Hardening Debian (pdf)]<br />
* [http://crunchbang.org/forums/viewtopic.php?id=24722 The paranoid #! Security Guide]<br />
* [https://github.com/lfit/itpol/blob/master/linux-workstation-security.md Linux Foundation's Linux workstation security checklist]<br />
* [https://www.privacytools.io/ privacytools.io]</div>Qguvhttps://wiki.archlinux.org/index.php?title=Cinnamon&diff=386187Cinnamon2015-07-21T20:01:07Z<p>Qguv: italics more appropriate, as language intonation changed since last edit</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[ja:Cinnamon]]<br />
[[ru:Cinnamon]]<br />
[[tr:Cinnamon Masaüstü Ortamı]]<br />
[[zh-CN:Cinnamon]]<br />
{{Related articles start}}<br />
{{Related|Nemo}}<br />
{{Related|GNOME}}<br />
{{Related|MATE}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
<br />
[http://cinnamon.linuxmint.com/ Cinnamon] is a [[desktop environment]] which combines a traditional desktop layout with modern graphical effects. The underlying technology was forked from the [[GNOME]] desktop. As of version 2.0, Cinnamon is a complete desktop environment and not merely a frontend for GNOME like GNOME Shell and Unity.<br />
<br />
== Installation ==<br />
<br />
Cinnamon can be [[installed]] with the package {{Pkg|cinnamon}}.<br />
<br />
== Starting Cinnamon ==<br />
<br />
=== Graphical log-in ===<br />
<br />
Choose ''Cinnamon'' or ''Cinnamon (Software Rendering)'' from the menu in a [[display manager]] of choice. Cinnamon is the 3D accelerated version, which should normally be used. If you experience problems with your video driver (e.g. artifacts or crashing), try the ''Cinnamon (Software Rendering)'' session, which disables 3D acceleration.<br />
<br />
=== Starting Cinnamon manually ===<br />
<br />
If you prefer to start Cinnamon manually from the console, add the following line to [[Xinitrc]]:<br />
<br />
{{hc|~/.xinitrc|<br />
exec cinnamon-session<br />
}}<br />
<br />
If the ''Cinnamon (Software Rendering)'' session is required, use {{ic|cinnamon-session-cinnamon2d}} instead of {{ic|cinnamon-session}}.<br />
<br />
== Configuration ==<br />
<br />
Cinnamon is quite easy to configure &mdash; most common settings can be configured graphically. Its usability can be expanded with [http://cinnamon-spices.linuxmint.com/applets applets] and [http://cinnamon-spices.linuxmint.com/extensions extensions], and also it supports [http://cinnamon-spices.linuxmint.com/themes theming]. <br />
<br />
=== Cinnamon settings ===<br />
<br />
''cinnamon-settings'' launches a settings module specified on the command line. Without (correct) arguments, it launches ''System Settings''. For example, to start the panel settings:<br />
<br />
$ cinnamon-settings panel<br />
<br />
To list all available modules:<br />
<br />
$ pacman -Ql cinnamon | grep -o "cs_.*\.py" | awk -F'[_.]' '{ print $2 }'<br />
<br />
; Printers<br />
: For configure printers, install the {{Pkg|system-config-printer}} package.<br />
; Networking<br />
: To add support for the networking module, enable [[NetworkManager#Configuration|Network Manager]]. In order for NetworkManager to store Wi-Fi passwords, you will need to also install [[GNOME Keyring]].<br />
; Bluetooth<br />
: For Bluetooth device support, install the {{Pkg|blueberry}} package.<br />
<br />
=== Applets and extensions ===<br />
<br />
While an '''applet''' is an addition to the Cinnamon panel, an '''extension''' can fully change the Cinnamon experience. They can be installed from the [[AUR]], ([https://aur.archlinux.org/packages.php?O=0&K=cinnamon-&do_Search=Go package search]), or from inside Cinnamon (''Get more online''):<br />
<br />
$ cinnamon-settings applets<br />
$ cinnamon-settings extensions<br />
<br />
Alternatively, install manually from [http://cinnamon-spices.linuxmint.com/ Cinnamon spices].<br />
<br />
{{Note|If applets do not appear, restart Cinnamon with {{ic|r}} in the {{ic|Alt+F2}} dialog box.}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Creating custom applets ===<br />
<br />
The official tutorial on creating a Cinnamon ''applet'' can be found [http://developer.linuxmint.com/reference/2.6/cinnamon-tutorials/write-applet.html here].<br />
<br />
=== Default desktop background wallpaper path ===<br />
<br />
When you add a wallpaper from a custom path in Cinnamon Settings, Cinnamon copies it to {{ic|~/.cinnamon/backgrounds}}. Thus, with every change of your wallpaper you would have to add your updated wallpaper again from the settings menu or copy / symlink it manually to {{ic|~/.cinnamon/backgrounds}}.<br />
<br />
=== Show home, filesystem desktop icons ===<br />
<br />
By default Cinnamon starts with desktop icons enabled but with no desktop icons on screen. To show desktop icons for the home folder, the filesystem, the trash, mounted volumes and network servers open Cinnamon settings and click on desktop. Enable the checkboxes of the icons you want to see on screen.<br />
<br />
=== Adding custom command launchers to the Menu applet ===<br />
<br />
The Menu applet supports launching custom commands. Right click on the applet, click on ''Configure...'' and then ''Open the menu editor''. Select a sub-menu (or create a new one) and select ''New Item''. Set ''Name'', ''Command'' and ''Comment''. Check the launch in terminal checkbox if needed. Leave unchecked for graphical applications. Click ''OK'' and close the menu editor afterwards. The launcher is added to the menu.<br />
<br />
=== Workspaces ===<br />
<br />
A workspace pager can be added to the panel. Right click the panel and choose the option ''Add applets to the panel''. Add the ''Workspace switch'' applet to the panel. To change its position right click on the panel and change the ''Panel edit mode'' on/off switch to on. Click and drag the switcher to the desired position and turn the panel edit mode off when finished.<br />
<br />
By default there are 2 workspaces. To add more, hit {{ic|Control+Alt+Up}} to show all workspaces. Then click on the plus sign button on the right of the screen to add more workspaces.<br />
<br />
Alternatively, you can choose the number by command-line:<br />
$ gsettings set org.cinnamon.desktop.wm.preferences num-workspaces 4<br />
Replacing 4 with the number of workspaces you want.<br />
<br />
=== Hide desktop icons ===<br />
<br />
The desktop icons rendering feature is enabled in nemo by default. To disable this feature, change the setting with the following command: <br />
<br />
$ gsettings set org.nemo.desktop show-desktop-icons false<br />
<br />
=== Themes and icons ===<br />
<br />
Linux Mint styled themes and icons can be installed from AUR using packages {{AUR|mint-themes}} and {{AUR|mint-x-icons}}. The themes can be edited in {{ic|Settings → Themes → Other settings}}.<br />
<br />
Official Linux Mint Cinnamon themes can be installed using the {{AUR|mint-cinnamon-themes}} package.<br />
<br />
=== Resize windows by mouse ===<br />
<br />
To resize windows with {{ic|Alt+Right click}}, use {{ic|gsettings}}:<br />
<br />
gsettings set org.cinnamon.desktop.wm.preferences resize-with-right-button true<br />
<br />
=== Portable keybindings ===<br />
<br />
To export your keyboard shortcut keys, you should do:<br />
<br />
dconf dump /org/cinnamon/muffin/keybindings/ >keybindings-backup.dconf<br />
<br />
To later import it (for example) on another computer, do:<br />
<br />
dconf load /org/cinnamon/muffin/keybindings/ <keybindings-backup.dconf<br />
<br />
== Troubleshooting ==<br />
<br />
=== Pressing power buttons suspend the system ===<br />
<br />
This is the default behaviour. To change the setting open the {{ic|cinnamon-settings}} panel and click on the "Power Management" option. Change the "When the power button is pressed" option to your desired behaviour.<br />
<br />
=== Volume level is not saved ===<br />
<br />
The volume level is not be saved after reboot. The volume will be at 0 but not muted. Installing {{Pkg|alsa-utils}} will solve the problem.<br />
<br />
=== cinnamon-settings: No module named Image ===<br />
<br />
If {{ic|cinnamon-settings}} does not start with the message that it cannot find a certain module, e.g. the Image module, it is likely that it uses outdated compiled files which refer to no longer existing file locations. In this case remove all {{ic|*.pyc}} files in {{ic|/usr/lib/cinnamon-settings}} and its sub-folders.<br />
<br />
=== Cannot add/remove/change languages used in Cinnamon ===<br />
<br />
The language module was removed from the Cinnamon Control Panel with the release of Cinnamon 2.2 and provided a new package for changing the language settings.<br />
<br />
'''To add/remove languages''', see [[Locale]].<br />
<br />
'''To change between enabled languages''', install the {{AUR|mintlocale}} package.<br />
<br />
=== Video tearing ===<br />
<br />
If you experience video tearing while playing videos or games under Cinnamon, append the following lines to {{ic|/etc/environment}}:<br />
<br />
CLUTTER_PAINT=disable-clipped-redraws:disable-culling<br />
CLUTTER_VBLANK=True<br />
<br />
Once you have done so, restart the Xorg server.</div>Qguvhttps://wiki.archlinux.org/index.php?title=Cinnamon&diff=386186Cinnamon2015-07-21T20:00:19Z<p>Qguv: updated applet link. couldn't find theme documentation?</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[ja:Cinnamon]]<br />
[[ru:Cinnamon]]<br />
[[tr:Cinnamon Masaüstü Ortamı]]<br />
[[zh-CN:Cinnamon]]<br />
{{Related articles start}}<br />
{{Related|Nemo}}<br />
{{Related|GNOME}}<br />
{{Related|MATE}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
<br />
[http://cinnamon.linuxmint.com/ Cinnamon] is a [[desktop environment]] which combines a traditional desktop layout with modern graphical effects. The underlying technology was forked from the [[GNOME]] desktop. As of version 2.0, Cinnamon is a complete desktop environment and not merely a frontend for GNOME like GNOME Shell and Unity.<br />
<br />
== Installation ==<br />
<br />
Cinnamon can be [[installed]] with the package {{Pkg|cinnamon}}.<br />
<br />
== Starting Cinnamon ==<br />
<br />
=== Graphical log-in ===<br />
<br />
Choose ''Cinnamon'' or ''Cinnamon (Software Rendering)'' from the menu in a [[display manager]] of choice. Cinnamon is the 3D accelerated version, which should normally be used. If you experience problems with your video driver (e.g. artifacts or crashing), try the ''Cinnamon (Software Rendering)'' session, which disables 3D acceleration.<br />
<br />
=== Starting Cinnamon manually ===<br />
<br />
If you prefer to start Cinnamon manually from the console, add the following line to [[Xinitrc]]:<br />
<br />
{{hc|~/.xinitrc|<br />
exec cinnamon-session<br />
}}<br />
<br />
If the ''Cinnamon (Software Rendering)'' session is required, use {{ic|cinnamon-session-cinnamon2d}} instead of {{ic|cinnamon-session}}.<br />
<br />
== Configuration ==<br />
<br />
Cinnamon is quite easy to configure &mdash; most common settings can be configured graphically. Its usability can be expanded with [http://cinnamon-spices.linuxmint.com/applets applets] and [http://cinnamon-spices.linuxmint.com/extensions extensions], and also it supports [http://cinnamon-spices.linuxmint.com/themes theming]. <br />
<br />
=== Cinnamon settings ===<br />
<br />
''cinnamon-settings'' launches a settings module specified on the command line. Without (correct) arguments, it launches ''System Settings''. For example, to start the panel settings:<br />
<br />
$ cinnamon-settings panel<br />
<br />
To list all available modules:<br />
<br />
$ pacman -Ql cinnamon | grep -o "cs_.*\.py" | awk -F'[_.]' '{ print $2 }'<br />
<br />
; Printers<br />
: For configure printers, install the {{Pkg|system-config-printer}} package.<br />
; Networking<br />
: To add support for the networking module, enable [[NetworkManager#Configuration|Network Manager]]. In order for NetworkManager to store Wi-Fi passwords, you will need to also install [[GNOME Keyring]].<br />
; Bluetooth<br />
: For Bluetooth device support, install the {{Pkg|blueberry}} package.<br />
<br />
=== Applets and extensions ===<br />
<br />
While an '''applet''' is an addition to the Cinnamon panel, an '''extension''' can fully change the Cinnamon experience. They can be installed from the [[AUR]], ([https://aur.archlinux.org/packages.php?O=0&K=cinnamon-&do_Search=Go package search]), or from inside Cinnamon (''Get more online''):<br />
<br />
$ cinnamon-settings applets<br />
$ cinnamon-settings extensions<br />
<br />
Alternatively, install manually from [http://cinnamon-spices.linuxmint.com/ Cinnamon spices].<br />
<br />
{{Note|If applets do not appear, restart Cinnamon with {{ic|r}} in the {{ic|Alt+F2}} dialog box.}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Creating custom applets ===<br />
<br />
The official tutorial on creating an '''applet''' can be found [http://developer.linuxmint.com/reference/2.6/cinnamon-tutorials/write-applet.html here].<br />
<br />
=== Default desktop background wallpaper path ===<br />
<br />
When you add a wallpaper from a custom path in Cinnamon Settings, Cinnamon copies it to {{ic|~/.cinnamon/backgrounds}}. Thus, with every change of your wallpaper you would have to add your updated wallpaper again from the settings menu or copy / symlink it manually to {{ic|~/.cinnamon/backgrounds}}.<br />
<br />
=== Show home, filesystem desktop icons ===<br />
<br />
By default Cinnamon starts with desktop icons enabled but with no desktop icons on screen. To show desktop icons for the home folder, the filesystem, the trash, mounted volumes and network servers open Cinnamon settings and click on desktop. Enable the checkboxes of the icons you want to see on screen.<br />
<br />
=== Adding custom command launchers to the Menu applet ===<br />
<br />
The Menu applet supports launching custom commands. Right click on the applet, click on ''Configure...'' and then ''Open the menu editor''. Select a sub-menu (or create a new one) and select ''New Item''. Set ''Name'', ''Command'' and ''Comment''. Check the launch in terminal checkbox if needed. Leave unchecked for graphical applications. Click ''OK'' and close the menu editor afterwards. The launcher is added to the menu.<br />
<br />
=== Workspaces ===<br />
<br />
A workspace pager can be added to the panel. Right click the panel and choose the option ''Add applets to the panel''. Add the ''Workspace switch'' applet to the panel. To change its position right click on the panel and change the ''Panel edit mode'' on/off switch to on. Click and drag the switcher to the desired position and turn the panel edit mode off when finished.<br />
<br />
By default there are 2 workspaces. To add more, hit {{ic|Control+Alt+Up}} to show all workspaces. Then click on the plus sign button on the right of the screen to add more workspaces.<br />
<br />
Alternatively, you can choose the number by command-line:<br />
$ gsettings set org.cinnamon.desktop.wm.preferences num-workspaces 4<br />
Replacing 4 with the number of workspaces you want.<br />
<br />
=== Hide desktop icons ===<br />
<br />
The desktop icons rendering feature is enabled in nemo by default. To disable this feature, change the setting with the following command: <br />
<br />
$ gsettings set org.nemo.desktop show-desktop-icons false<br />
<br />
=== Themes and icons ===<br />
<br />
Linux Mint styled themes and icons can be installed from AUR using packages {{AUR|mint-themes}} and {{AUR|mint-x-icons}}. The themes can be edited in {{ic|Settings → Themes → Other settings}}.<br />
<br />
Official Linux Mint Cinnamon themes can be installed using the {{AUR|mint-cinnamon-themes}} package.<br />
<br />
=== Resize windows by mouse ===<br />
<br />
To resize windows with {{ic|Alt+Right click}}, use {{ic|gsettings}}:<br />
<br />
gsettings set org.cinnamon.desktop.wm.preferences resize-with-right-button true<br />
<br />
=== Portable keybindings ===<br />
<br />
To export your keyboard shortcut keys, you should do:<br />
<br />
dconf dump /org/cinnamon/muffin/keybindings/ >keybindings-backup.dconf<br />
<br />
To later import it (for example) on another computer, do:<br />
<br />
dconf load /org/cinnamon/muffin/keybindings/ <keybindings-backup.dconf<br />
<br />
== Troubleshooting ==<br />
<br />
=== Pressing power buttons suspend the system ===<br />
<br />
This is the default behaviour. To change the setting open the {{ic|cinnamon-settings}} panel and click on the "Power Management" option. Change the "When the power button is pressed" option to your desired behaviour.<br />
<br />
=== Volume level is not saved ===<br />
<br />
The volume level is not be saved after reboot. The volume will be at 0 but not muted. Installing {{Pkg|alsa-utils}} will solve the problem.<br />
<br />
=== cinnamon-settings: No module named Image ===<br />
<br />
If {{ic|cinnamon-settings}} does not start with the message that it cannot find a certain module, e.g. the Image module, it is likely that it uses outdated compiled files which refer to no longer existing file locations. In this case remove all {{ic|*.pyc}} files in {{ic|/usr/lib/cinnamon-settings}} and its sub-folders.<br />
<br />
=== Cannot add/remove/change languages used in Cinnamon ===<br />
<br />
The language module was removed from the Cinnamon Control Panel with the release of Cinnamon 2.2 and provided a new package for changing the language settings.<br />
<br />
'''To add/remove languages''', see [[Locale]].<br />
<br />
'''To change between enabled languages''', install the {{AUR|mintlocale}} package.<br />
<br />
=== Video tearing ===<br />
<br />
If you experience video tearing while playing videos or games under Cinnamon, append the following lines to {{ic|/etc/environment}}:<br />
<br />
CLUTTER_PAINT=disable-clipped-redraws:disable-culling<br />
CLUTTER_VBLANK=True<br />
<br />
Once you have done so, restart the Xorg server.</div>Qguvhttps://wiki.archlinux.org/index.php?title=User:Qguv&diff=382226User:Qguv2015-07-15T13:15:23Z<p>Qguv: update installation list, links, and languages</p>
<hr />
<div>My name is Quint Guvernator. I update [http://quint.guvernator.net/ my personal website] more frequently than this page. My AUR contributions are available [https://aur.archlinux.org/packages/?SeB=m&K=qguv here]. My public key is [http://quint.guvernator.net/publickey.txt available] to verify my signatures or to send me a private message.<br />
<br />
I run Arch Linux installations on the following systems:<br />
* my personal laptop<br />
* a computing cluster at William &amp; Mary<br />
* my main server for programming and storage<br />
* a handful of workstations at the [http://www.wm.edu/as/physics/resources/makerspace/index.php W&amp;M Makerspace]<br />
<br />
Programming Languages:<br />
* Python<br />
* Haskell<br />
* Rust<br />
* Go<br />
* C (and friends)<br />
* JS and derivatives<br />
* Ruby<br />
* Lua<br />
<br />
Natural Languages:<br />
* English (native)<br />
* German (proficient)<br />
* French (proficient)<br />
* Dutch (learning)<br />
* Japanese (learning)<br />
<br />
Constructed languages:<br />
* Esperanto (proficient)<br />
* Toki Pona (proficient)<br />
* Lojban (learning)</div>Qguvhttps://wiki.archlinux.org/index.php?title=User:Qguv&diff=327552User:Qguv2014-07-29T18:05:56Z<p>Qguv: </p>
<hr />
<div>My name is Quint Guvernator. My main website can be found at [https://qguv.github.io qguv.github.io]. My AUR contributions are available [https://aur.archlinux.org/packages/?SeB=m&K=qguv here]. You can verify my identity [https://keybase.io/qguv on Keybase] or using the [http://pgp.mit.edu/pks/lookup?search=Quint+Guvernator&op=index MIT PGP public key server].<br />
<br />
I run Arch Linux installations on the following systems:<br />
* my main server for programming and storage<br />
* a club Craftbukkit server<br />
* my personal testing netbook<br />
* a handful of desktop machines at the [http://www.wm.edu/as/physics/resources/makerspace/index.php W&amp;M Makerspace]<br />
<br />
Programming Languages:<br />
* Python<br />
* Go<br />
* Coffeescript (and Javascript)<br />
* Ruby<br />
* C (and friends)<br />
* Lua<br />
<br />
Natural Languages:<br />
* English (native)<br />
* German (proficient)<br />
* French (proficient)<br />
* Russian (learning)<br />
* Japanese (learning)<br />
<br />
Constructed languages:<br />
* Esperanto (proficient)<br />
* Toki Pona (proficient)<br />
* Lojban (learning)</div>Qguvhttps://wiki.archlinux.org/index.php?title=User:Qguv&diff=327550User:Qguv2014-07-29T18:05:08Z<p>Qguv: </p>
<hr />
<div>My name is Quint Guvernator. My main website can be found at [https://qguv.github.io qguv.github.io]. My AUR contributions are available [https://aur.archlinux.org/packages/?SeB=m&K=qguv here]. You can verify my identity [https://keybase.io/qguv on Keybase].<br />
<br />
I run Arch Linux installations on the following systems:<br />
* my main server for programming and storage<br />
* a club Craftbukkit server<br />
* my personal testing netbook<br />
* a handful of desktop machines at the [http://www.wm.edu/as/physics/resources/makerspace/index.php W&amp;M Makerspace]<br />
<br />
Programming Languages:<br />
* Python<br />
* Go<br />
* Coffeescript (and Javascript)<br />
* Ruby<br />
* C (and friends)<br />
* Lua<br />
<br />
Natural Languages:<br />
* English (native)<br />
* German (proficient)<br />
* French (proficient)<br />
* Russian (learning)<br />
* Japanese (learning)<br />
<br />
Constructed languages:<br />
* Esperanto (proficient)<br />
* Toki Pona (proficient)<br />
* Lojban (learning)</div>Qguvhttps://wiki.archlinux.org/index.php?title=Arch_is_the_best&diff=325177Arch is the best2014-07-15T02:16:49Z<p>Qguv: add Toki Pona to /* Translations */</p>
<hr />
<div>[[Category:About Arch]]<br />
[[Category:Programming language]]<br />
[[ja:Arch_is_the_best]]<br />
The '''Arch is the best''' project is a very sophisticated and exquisite, ego-boosting and mind-blowing (albeit perhaps a bit over-engineered) project which gives proof of Arch's superiority.<br />
<br />
== History ==<br />
<br />
The visionary project was originally devised in April 2008 by long time Arch community member [https://bbs.archlinux.org/profile.php?id=2529 lucke] as a simple shell script which provided irrefutable proof that "Arch is the best". It was announced to the world with a [https://bbs.archlinux.org/viewtopic.php?id=47306 forum post], thus illuminating other people's minds, who immediately started porting it to multiple different languages, both programming and verbal, so that every human being on the planet could fully appreciate and benefit from this revolutionary discovery.<br />
<br />
== Installation ==<br />
<br />
A sample PKGBUILD called {{AUR|archbest-mod1}} has been uploaded to [[AUR]].<br />
<br />
== The code ==<br />
<br />
The "Arch is the best" project is ported to many programming languages.<br />
<br />
'''Ada''' - A systems critical programming language.<br />
with Ada.Text_IO;<br />
use Ada.Text_IO;<br />
procedure ArchIsTheBest is<br />
begin<br />
Put_Line("Arch is the best!");<br />
end HelloWorld;<br />
<br />
'''APL''' - A Programming Language.<br />
'Arch is the best!'<br />
<br />
'''ATS''' - A functional programming language that uses dependent types to improve programs' reliability.<br />
implement main () = println! "Arch is the best!"<br />
<br />
'''Awk''' - A data-driven programming language designed for processing text-based data.<br />
BEGIN {<br />
print "Arch is the best!"<br />
}<br />
<br />
'''Befunge''' - Believed to be the first two-dimensional, ASCII-based, general-purpose (in the sense of "you could plausibly write Hunt the Wumpus in it") programming language.<br />
<v"Arch is the best!"0<br />
<,_@#:<br />
<br />
'''Boo''' - A stablished object oriented statically typed programming language for .NET and Mono with a python inspired syntax and a special focus on metaprogramming through language and compiler extensibility features such as macros and custom compilation pipelines.<br />
print "Arch is the best!"<br />
<br />
'''Bourne shell''' - The original program, should be compatible with any shell.<br />
#!/bin/sh<br />
echo "Arch is the best!"<br />
<br />
<br />
'''Bourne shell (Alternate)''' - Handy for piping the output to your favourite IRC/email/IM client. Should work with any shell.<br />
#!/bin/sh<br />
yes Arch is the best!<br />
<br />
<br />
'''Bourne shell (Dynamically updated)'''<br />
<pre style='overflow:auto'><br />
#!/bin/bash<br />
wget http://wiki.archlinux.org/index.php/Arch_is_the_best -qO-| sed -n ':b;n;s/id="Translations"//;Tb;:d;n;s/id="See_also"//;t;p;bd'|sed '/<i>.*<\/i>/d;s/<[^>]*>//g'|sed 'N;s/\n/: /;N;N;s/\n//g'<br />
</pre><br />
<br />
<br />
'''brainfuck''' - Doesn't the language name explain it?<br />
++>++++++>+++++<+[>[->+<]<->++++++++++<]>>.<[-]>[-<++>]<br />
<----------------.---------------.+++++.<+++[-<++++++++++>]<.<br />
>>+.++++++++++.<<.>>+.------------.---.<<.>>---.<br />
+++.++++++++++++++.+.<<+.[-]++++++++++.<br />
<br />
<br />
'''C''' - Note the three space indenting used in this project, much like that used by other superior beings.<br />
#include <stdio.h><br />
#include <stdlib.h><br />
int main(void) <br />
{<br />
puts("Arch is the best!");<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
<br />
'''C#''' - Intended to be a simple, modern, general-purpose, object-oriented programming language.<br />
using System;<br />
public class ArchIsTheBest<br />
{<br />
static public void Main ()<br />
{<br />
Console.WriteLine ("Arch is the best!");<br />
}<br />
}<br />
<br />
<br />
'''C++''' - Arch == Linux++<br />
#include <iostream><br />
#include <cstdlib><br />
int main ()<br />
{<br />
std::cout << "Arch is the best!" << std::endl;<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
<br />
'''COBOL''' - A simple, lightweight programming language.<br />
IDENTIFICATION DIVISION.<br />
PROGRAM-ID. TheBest.<br />
<br />
PROCEDURE DIVISION.<br />
DISPLAY "Arch is the best!".<br />
STOP RUN.<br />
<br />
<br />
'''CoffeeScript''' - A programming language that transcompiles to JavaScript.<br />
alert 'Arch is the best!'<br />
<br />
<br />
'''Clojure''' - A Lisp dialect that runs on the JVM.<br />
(def translations {"english" "Arch is the best!",<br />
"german" "Arch ist das Beste!",<br />
"australian" "Arch is fair dinkum, mate!",<br />
"h4x0r" "arhc 51 7he be57!",<br />
"spanish" "¡Arch es el mejor!"})<br />
<br />
(defn read-choice []<br />
(println "\nAvailable languages: ")<br />
(doall (map #(println (key %)) translations))<br />
(print "Enter language or Ctrl-c: ") (flush)<br />
(translations (read-line) :badinput))<br />
<br />
(defn arch-is-the-best []<br />
(loop [choice (read-choice)]<br />
(case choice<br />
:badinput (do (print "\nBad input!\n")<br />
(recur (read-choice)))<br />
(do (print "\n" choice "\n")<br />
(recur (read-choice))))))<br />
or<br />
(def translations {"english" "Arch is the best!",<br />
"german" "Arch ist das Beste!",<br />
"australian" "Arch is fair dinkum, mate!",<br />
"h4x0r" "arhc 51 7he be57!",<br />
"spanish" "¡Arch es el mejor!"<br />
"street" "Arch iz da shizzle ma nizzle"})<br />
(while 1<br />
(println "\nPick a language:\n" (map #(key %) translations) "\n language: ")<br />
(println (translations (read-line) "Not a valid language")))<br />
<br />
<br />
or<br />
(prn "Arch is the best!")<br />
<br />
'''Common Lisp''' - Tested on SBCL, feel free to add more of the translations.<br />
#!/usr/bin/sbcl --script<br />
(defparameter *best-list* '((English "Arch is the best!")<br />
(Chinese "Arch, 她出类拔萃!")<br />
(German "Arch ist das Beste!")<br />
(Greek "Το Arch είναι το καλύτερο!")))<br />
(defun aitb ()<br />
(format t "Available languages: ~{~{~@(~a~)~*~}~^, ~}.~%" *best-list*)<br />
(loop for input = (progn (format t "~&Input the desired language, (or 'quit'): ~%")<br />
(force-output)<br />
(read-line))<br />
if (string-equal input "quit")<br />
do (loop-finish)<br />
else<br />
do (let ((language-def<br />
(assoc input *best-list*<br />
:key (lambda (lang) (symbol-name lang))<br />
:test #'string-equal)))<br />
(if language-def<br />
(format t "~&~A~%" (second language-def))<br />
(format t "~&Invalid language.~%"))))<br />
(format t "~&May the Arch be with you!~%"))<br />
(aitb)<br />
<br />
<br />
'''Common Lisp (Alternate)''' - Should run on any implementation (Clisp, Allegro, SBCL...)<br />
(princ "Arch is the best!")<br />
<br />
<br />
'''D''' - A C-style language. The benefits of hindsight, with modern conveniences.<br />
import std.stdio : writeln;<br />
void main()<br />
{<br />
writeln("Arch is the best");<br />
}<br />
<br />
<br />
'''Dart''' - Google's javascript killer<br />
main(){<br />
print('Arch is the best');<br />
}<br />
<br />
'''Emacs Lisp''' - A dialect of the Lisp programming language used by the GNU Emacs and XEmacs text editors <br />
(message "Arch is the best!")<br />
<br />
<br />
'''Erlang''' - A concurrent, garbage-collected programming language and runtime system.<br />
-module(arch).<br />
-export([is_the_best/0]).<br />
is_the_best() -> io:fwrite("Arch is the best!\n").<br />
<br />
Or using message passing between processes<br />
<br />
-module(arch).<br />
-export([ultimate_question/0,the_answer/0]).<br />
the_answer() -><br />
receive<br />
{Client,who_is_the_best} -><br />
Client ! {self(),"Arch is the best!"};<br />
{Client,_} -><br />
Client ! {self(),"Taco Taco Taco!"}<br />
end,<br />
the_answer().<br />
ultimate_question() -><br />
Pid = spawn(arch,the_answer,[]),<br />
Pid ! {self(),who_is_the_best},<br />
receive<br />
{Pid,Response} -> io:format("~s~n",[Response])<br />
end.<br />
<br />
'''F#''' - A strongly-typed, functional-first programming language for writing simple code to solve complex problems.<br />
printfn "Arch is the best!"<br />
<br />
'''Factor''' - High-level stack-based language.<br />
"Arch is the best" print<br />
<br />
'''FIM++''' - A wordy, imperative, dynamically-typed, and interpreted language that can use Java classes.<br />
Dear Princess Celestia: Letter About Arch Linux.<br />
Today I learned:<br />
I wrote "Arch is the best!".<br />
Your faithful student, Twilight Sparkle<br />
<br />
'''Forth''' - Stack-based language.<br />
." Arch is the best" cr -- kiss way<br />
<br />
'''Fortran95'''<br />
program arch<br />
print *,"Arch is the best!"<br />
end program arch<br />
<br />
'''Genie''' - A new programming language, that allows for a more modern programming style while being able to effortlessly create and use GObjects natively. <br />
init<br />
print "Arch is the best"<br />
<br />
<br />
'''Gjs''' - A Javascript binding for GNOME. It's mainly based on Spidermonkey javascript engine and the GObject introspection framework.<br />
#!/usr/bin/env gjs<br />
print ('Arch is the best');<br />
<br />
<br />
'''Go''' - A language created by Google that's a love child between C, C++ and Python.<br />
package main<br />
<br />
import "fmt"<br />
<br />
func main() {<br />
fmt.Println("Arch is the best!")<br />
}<br />
<br />
<br />
'''Haskell''' - The language where IO is easy and unproblematic.<br />
main = putStrLn "Arch is the best!"<br />
<br />
<br />
'''HTML''' - A markup language used to create and define web pages and their content.<br />
<pre><br />
<!DOCTYPE html><br />
<html lang='en'><br />
<head><br />
<title>Arch is the best!</title><br />
</head><br />
<body><br />
<p>Arch is the best!</p><br />
</body><br />
</html><br />
</pre><br />
<br />
'''Io'''<br />
"Arch is the best!" println<br />
<br />
<br />
'''Java''' - An extremely portable language, this will run on pretty much anything, it might even run on your toaster!<br />
public class ArchIsTheBest {<br />
public static void main(String[] args) {<br />
System.out.println("Arch is the best!");<br />
}<br />
}<br />
<br />
<br />
'''JavaScript''' - Also known as ECMAScript, a prototype-based object-oriented scripting language. <br />
console.log('Arch is the best!');<br />
<br />
<br />
'''JavaScript (in a web browser)'''<br />
alert('Arch is the best!');<br />
<br />
<br />
'''LilyPond''' - A powerful music engraving program with an intuitive LaTeX-like input language.<br />
\version "2.12.3"<br />
\include "english.ly"<br />
\header { title = "Arch is the best!" }<br />
\score<br />
{<br />
<<<br />
\relative c' { c4 e g c \bar "||" }<br />
\addlyrics { Arch is the best! }<br />
>><br />
}<br />
<br />
<br />
'''LOLCODE''' - Why not?<br />
HAI<br />
CAN HAS STDIO?<br />
VISIBLE "ARCH IS TEH PWNZ LOL!"<br />
KTHXBYE<br />
<br />
<br />
'''Lua''' - A lightweight, extensible programming language.<br />
print "Arch is the best!"<br />
<br />
'''Morpho''' - Morpho is a multi-paradigm programming language that supports procedural, object-oriented and functional programming. <br />
<br />
writeln("Arch is the best!");<br />
<br />
<br />
'''Nasm(x86_64) (or yasm)''' - Notice that the string is in the .text section, which feels superior<br />
<br />
;nasm -f elf64 arch.asm<br />
;ld -o arch arch.o<br />
;./arch<br />
<br />
section .text<br />
global _start<br />
_start:<br />
mov edx,len<br />
mov ecx,msg<br />
mov ebx,1<br />
mov eax,4<br />
int 0x80<br />
xor ebx,ebx<br />
mov eax,1<br />
int 0x80<br />
msg: db "Arch is the best!",10<br />
len equ $-msg<br />
<br />
<br />
'''Nimrod''' - Portable lightweight programming language.<br />
echo "Arch is the best!"<br />
<br />
<br />
'''Objective-C''' - A reflective, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.<br />
NSLog(@"Arch is the best!");<br />
<br />
<br />
'''OCaml''' - The main implementation of the Caml programming language.<br />
print_endline "Arch is the best!"<br />
<br />
'''Octave''' - High-level interpreted language, primarily intended for numerical computations.<br />
printf("Arch is the best!\n")<br />
<br />
'''Ook!''' - brainfuck, translated to Orangutan<br />
Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook! Ook? Ook. Ook? Ook! Ook? Ook! Ook! Ook. Ook? Ook. Ook. Ook? Ook. Ook? Ook! Ook? Ook. Ook! Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook. Ook! Ook? Ook! Ook! Ook? Ook! Ook. Ook? Ook! Ook? Ook! Ook! Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook! Ook! Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook? Ook! Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook! Ook. Ook! Ook? Ook! Ook! Ook? Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook.<br />
<br />
'''Perl''' - A high-level, general-purpose, interpreted, dynamic programming language.<br />
#!/usr/bin/perl<br />
print "Arch is the best!\n";<br />
<br />
<br />
'''PHP''' - A general-purpose scripting language.<br />
<?php<br />
echo "Arch is the best!\n";<br />
?> <br />
<br />
<br />
'''Pixilang''' - Make me pixels.<br />
print("Arch is the best!",0,0,#1897D1)<br />
frame<br />
<br />
<br />
'''Portable GNU assembler''' - as -o arch.o arch.s && ld -o arch -O0 arch.o<br />
<br />
.section .data<br />
archIsBest: <br />
.ascii "Arch is the best!\n"<br />
archIsBest_len:<br />
.long . - archIsBest<br />
.section .text<br />
.globl _start<br />
_start:<br />
xorl %ebx, %ebx<br />
movl $4, %eax <br />
xorl %ebx, %ebx<br />
incl %ebx <br />
leal archIsBest, %ecx<br />
movl archIsBest_len, %edx <br />
int $0x80 <br />
xorl %eax, %eax<br />
incl %eax<br />
xorl %ebx, %ebx <br />
int $0x80<br />
<br />
<br />
'''Processing''' - An open source programming language and IDE built for the electronic arts and visual design.<br />
println("Arch is the best!");<br />
<br />
<br />
'''Prolog''' - A general purpose logic programming language associated with artificial intelligence and computational linguistics.<br />
format('Arch is the best~n',[]).<br />
<br />
<br />
'''Python''' - A general-purpose high-level programming language.<br />
#!/usr/bin/env python3<br />
print('Arch is the best!')<br />
<br />
<br />
'''QBASIC''' - An interpreter for a variant of the BASIC programming language which is based on QuickBASIC.<br />
PRINT "Arch is the best!"<br />
<br />
<br />
'''R''' - A language for statistical computing (and much more!).<br />
archIsBest <- function() { cat("Arch is the best!\n") }<br />
archIsBest()<br />
<br />
<br />
'''Ruby''' - A dynamic, reflective, general purpose object-oriented programming language.<br />
#!/usr/bin/ruby -w<br />
puts 'Arch is the best!'<br />
<br />
<br />
'''Scala''' - A multi paradigm language that runs on the JVM<br />
object ArchIsBest extends App {<br />
println("Arch is the best!")<br />
} <br />
<br />
<br />
<br />
'''Scheme''' - A dialect of Lisp.<br />
(display "Arch is the best!\n")<br />
or in XunDu style<br />
#!/usr/bin/guile1.8 -s<br />
!#<br />
(define 节 or)<br />
(define 哀 #t)<br />
(define (xi) (display "Arch is the best!\n"))<br />
(节 (xi) 哀 (wen) 顺 (le) 变 (jian) )<br />
<br />
<br />
'''Seed''' - A library and interpreter, dynamically bridging the WebKit JavaScriptCore engine, with the GNOME platform.<br />
#!/usr/bin/env seed<br />
print ('Arch is the best');<br />
<br />
<br />
'''Shoes''' - A Ruby version using Shoes for a GUI<br />
Shoes.app :width => 135, :height => 30 do <br />
para "Arch is the Best!"<br />
end<br />
<br />
<br />
'''SQL''' - Structured Query Language, the query language for relational databases<br />
SELECT 'Arch is the best!';<br />
SELECT 'Arch is the best!' from dual; -- for Oracle DB<br />
<br />
<br />
'''Standard ML''' - A general-purpose, modular, functional programming language with compile-time type checking and type inference.<br />
print "Arch is the best!\n"<br />
<br />
<br />
'''Tcl/Tk''' - A scripting language that is commonly used for rapid prototyping, scripted applications, GUIs and testing.<br />
#!/usr/bin/env tclsh<br />
puts "Arch is the best!"<br />
<br />
<br />
'''Vala''' - "Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C"<br />
void main(string[] args) {<br />
stdout.printf("\nArch is the best!\n\n");<br />
}<br />
<br />
<br />
''' Wiring (Arduino)''' - Built on Processing, the open source programming language developed at the Massachusetts Institute of Technology.<br />
void setup() <br />
{<br />
Serial.begin(9600); <br />
}<br />
void loop() <br />
{ <br />
Serial.print("Arch is the best!");<br />
}<br />
<br />
<br />
''' X11 ''' - X11 is an architecture independent system for display of graphical user interfaces.<br />
#include <stdio.h><br />
#include <stdlib.h><br />
#include <string.h><br />
<br />
#include <X11/Xlib.h><br />
<br />
int main()<br />
{<br />
Display *d;<br />
Window w;<br />
XEvent e;<br />
int s;<br />
<br />
if (!(d = XOpenDisplay(NULL))) {<br />
fprintf(stderr, "Couldn't open display, but Arch is the best!\n");<br />
exit(1);<br />
}<br />
<br />
s = DefaultScreen(d);<br />
w = XCreateSimpleWindow(d, RootWindow(d,s), 0, 0, 110, 20, 0, <br />
0, WhitePixel(d,s));<br />
XSelectInput(d, w, ExposureMask | KeyPressMask);<br />
XMapWindow(d,w);<br />
<br />
while (1) {<br />
XNextEvent(d, &e);<br />
if (e.type == Expose) {<br />
XDrawString(d, w, DefaultGC(d, s), 5, 15, "Arch is the best!", 17);<br />
}<br />
}<br />
<br />
XCloseDisplay(d);<br />
return 0;<br />
}<br />
<br />
==Translations==<br />
<br />
'''Ancient Chinese'''<br />
阿祺,盡善矣。<br />
<br />
'''Ancient Greek'''<br />
Ἡ Ἀψίς ἄριστη ἐστί!<br />
<br />
'''Arabic'''<br />
ارتش هو الأفضل<br />
<br />
'''Australian'''<br />
Arch is fair dinkum, mate!<br />
<br />
'''Bahasa Indonesia'''<br />
Arch terbaik!<br />
<br />
'''Basque'''<br />
Arch onena da!<br />
<br />
'''Belarusian'''<br />
Арч - самы лепшы!<br />
<br />
'''Bengali'''<br />
আর্চ সবচেয়ে ভালো!<br />
<br />
'''British'''<br />
Arch is simply spiffing.<br />
<br />
'''Bulgarian'''<br />
Арч е най-добрият!<br />
<br />
'''Catalan'''<br />
Arch és el millor!<br />
<br />
'''Chinese (Simplified)'''<br />
Arch 最棒了!<br />
<br />
'''Chinese (Traditional)'''<br />
狀哉我大 Arch!<br />
<br />
'''Chinese (Taobao Style - 淘宝体)'''<br />
Arch,好评哦,亲!<br />
<br />
'''Czech'''<br />
Arch je nejlepší!<br />
<br />
'''Croatian'''<br />
Arch je najbolji!<br />
<br />
'''Danish'''<br />
Arch er bedst!<br />
<br />
'''Dutch'''<br />
Arch is de beste!<br />
<br />
'''Esperanto'''<br />
Arch plejbonas!<br />
<br />
'''Estonian'''<br />
Arch on parim!<br />
<br />
'''Fikonspråket'''<br />
Firch Arkon fir äkon fist bäkon<br />
<br />
'''Filipino'''<br />
Mabuhay ang Arch!<br />
<br />
'''Finnish'''<br />
Arch on paras!<br />
<br />
'''French'''<br />
Arch est le meilleur!<br />
<br />
'''Galician'''<br />
Arch é o mellor!<br />
<br />
'''German'''<br />
Arch ist das Beste!<br />
<br />
'''Greek (Modern)'''<br />
Το Αρτς είναι το καλύτερο!<br />
<br />
'''Haitian Creole'''<br />
Arch se meye bagay!<br />
<br />
'''Hantec'''<br />
Arch je nejbetélnější!<br />
<br />
'''Hebrew'''<br />
ארצ' זה הכי אחי!<br />
<br />
'''Hindi'''<br />
आर्च सर्वोत्तम है ।<br />
<br />
'''Hungarian'''<br />
Az Arch a legjobb!<br />
<br />
'''Irish'''<br />
Arch é is fearr!<br />
<br />
'''Italian'''<br />
Arch è il migliore!<br />
<br />
'''Japanese'''<br />
Archが一番ですよ!<br />
<br />
'''Kazakh'''<br />
Арч - ең жақсы!<br />
<br />
'''Klingon'''<br />
Arch'pu'ta' 'a'<br />
<br />
'''Latin'''<br />
Arch optimus est!<br />
<br />
'''Latvian'''<br />
Arch ir labākais!<br />
<br />
'''Lithuanian'''<br />
Arch yra geriausias!<br />
<br />
'''Lojban'''<br />
la .artc. xagrai<br />
<br />
'''Malayalam'''<br />
ആർച് ആണ് ഏറ്റവും നല്ലത് <br />
<br />
'''Marathi'''<br />
आर्च सगळ्यात भारी आहे!<br />
<br />
'''Norwegian'''<br />
Arch er best!<br />
<br />
'''Old English'''<br />
Arch biþ betst!<br />
<br />
'''Persian'''<br />
طاق بزرگ است<br />
<br />
'''Pig Latin'''<br />
Archway isway ethay estbay!<br />
<br />
'''Polish'''<br />
Arch jest najlepszy!<br />
<br />
'''Portuguese'''<br />
Arch é o melhor!<br />
<br />
'''Québécois'''<br />
Arch est le plus meilleure du monde!<br />
<br />
'''Romanian'''<br />
Аrch e cel mai bun!<br />
<br />
'''Russian'''<br />
Арч — лучший!<br />
<br />
'''Serbian'''<br />
Arch je najbolji!<br />
<br />
'''Singaporean'''<br />
Arch the best lah!<br />
<br />
'''Slovenian'''<br />
Arch je najboljši!<br />
<br />
'''Spanish (Standard)'''<br />
¡Arch es el mejor!<br />
<br />
'''Spanish (Argentina)'''<br />
Arch es una mazza!!<br />
<br />
'''Spanish (Chile)'''<br />
Arch es bacán<br />
<br />
'''Spanish (Chile, alternative)'''<br />
Arch es la raja<br />
<br />
'''Spanish (Chile, marginal)'''<br />
(written in IPA because standard Spanish doesn't have these sounds)<br />
ˈæɹʃ ɛːʰ tɜ.rˈiː.u.lɛ la rˈa.χa ʃʊ.ɹʊ<br />
<br />
'''Spanish (Uruguay)'''<br />
Arch la rompe!<br />
<br />
'''Swedish'''<br />
Arch är bäst!<br />
<br />
'''Turkish'''<br />
Arch en iyisidir!<br />
<br />
'''Tamil'''<br />
ஆர்ச்சே சிறந்தது!<br />
<br />
'''Telugu'''<br />
ఆర్చ్ ఉత్తమమైనది!<br />
<br />
'''Toki Pona'''<br />
Arch li pona mute!<br />
<br />
'''Ukrainian'''<br />
Arch є найкращий!<br />
<br />
'''Urdu'''<br />
آرچ سب سے بہتر ہے! <br />
<br />
'''Vietnamese'''<br />
Arch là tốt nhất!<br />
<br />
'''Welsh (Cymraeg)'''<br />
<br />
Emphasis on Arch:<br />
Arch sydd yr orau un!<br />
Arch sydd y gorau un!<br />
<br />
Emphasis on being the best (one):<br />
Yr orau un yw Arch!<br />
Y gorau un yw Arch!<br />
<br />
== Encodings ==<br />
<br />
'''ASCII Banner'''<br />
_ _ _ _ _ _ _ <br />
/\ | | (_) | | | | | | | | | |<br />
/ \ _ __ ___| |__ _ ___ | |_| |__ ___ | |__ ___ ___| |_| |<br />
/ /\ \ | '__/ __| '_ \ | / __| | __| '_ \ / _ \ | '_ \ / _ \/ __| __| |<br />
/ ____ \| | | (__| | | | | \__ \ | |_| | | | __/ | |_) | __/\__ \ |_|_|<br />
/_/ \_\_| \___|_| |_| |_|___/ \__|_| |_|\___| |_.__/ \___||___/\__(_)<br />
<br />
<br />
'''Base64'''<br />
QXJjaCBpcyB0aGUgYmVzdCEK<br />
<br />
'''Binary ASCII'''<br />
0100000101110010011000110110100000100000011010010111001100100000011101000110100001100101001000000110001001100101011100110111010000100001<br />
<br />
'''Braille'''<br />
⠁⠗⠉⠓⠀⠊⠎⠀⠮⠀⠃⠑⠎⠞⠲<br />
<br />
'''Desrever (Reversed)'''<br />
!tseb eht si hcrA<br />
<br />
'''h4x0r'''<br />
Arch 15 7h3 b357!<br />
<br />
'''Hexadecimal ASCII'''<br />
4172636820697320746865206265737421<br />
<br />
'''md5sum'''<br />
2d9092e089d77a8e23f47ba3dfe77027<br />
<br />
'''Morse Code'''<br />
.- .-. -.-. .... .. ... - .... . -... . ... -<br />
<br />
'''ROT13'''<br />
Nepu vf gur orfg!<br />
<br />
'''Upside Down'''<br />
¡ʇsǝq ǝɥʇ s! ɥɔɹ∀<br />
<br />
'''URL Encoded'''<br />
Arch%20is%20the%20best!</div>Qguvhttps://wiki.archlinux.org/index.php?title=Arch_is_the_best&diff=325176Arch is the best2014-07-15T02:15:10Z<p>Qguv: fix some description grammar /* Translations */</p>
<hr />
<div>[[Category:About Arch]]<br />
[[Category:Programming language]]<br />
[[ja:Arch_is_the_best]]<br />
The '''Arch is the best''' project is a very sophisticated and exquisite, ego-boosting and mind-blowing (albeit perhaps a bit over-engineered) project which gives proof of Arch's superiority.<br />
<br />
== History ==<br />
<br />
The visionary project was originally devised in April 2008 by long time Arch community member [https://bbs.archlinux.org/profile.php?id=2529 lucke] as a simple shell script which provided irrefutable proof that "Arch is the best". It was announced to the world with a [https://bbs.archlinux.org/viewtopic.php?id=47306 forum post], thus illuminating other people's minds, who immediately started porting it to multiple different languages, both programming and verbal, so that every human being on the planet could fully appreciate and benefit from this revolutionary discovery.<br />
<br />
== Installation ==<br />
<br />
A sample PKGBUILD called {{AUR|archbest-mod1}} has been uploaded to [[AUR]].<br />
<br />
== The code ==<br />
<br />
The "Arch is the best" project is ported to many programming languages.<br />
<br />
'''Ada''' - A systems critical programming language.<br />
with Ada.Text_IO;<br />
use Ada.Text_IO;<br />
procedure ArchIsTheBest is<br />
begin<br />
Put_Line("Arch is the best!");<br />
end HelloWorld;<br />
<br />
'''APL''' - A Programming Language.<br />
'Arch is the best!'<br />
<br />
'''ATS''' - A functional programming language that uses dependent types to improve programs' reliability.<br />
implement main () = println! "Arch is the best!"<br />
<br />
'''Awk''' - A data-driven programming language designed for processing text-based data.<br />
BEGIN {<br />
print "Arch is the best!"<br />
}<br />
<br />
'''Befunge''' - Believed to be the first two-dimensional, ASCII-based, general-purpose (in the sense of "you could plausibly write Hunt the Wumpus in it") programming language.<br />
<v"Arch is the best!"0<br />
<,_@#:<br />
<br />
'''Boo''' - A stablished object oriented statically typed programming language for .NET and Mono with a python inspired syntax and a special focus on metaprogramming through language and compiler extensibility features such as macros and custom compilation pipelines.<br />
print "Arch is the best!"<br />
<br />
'''Bourne shell''' - The original program, should be compatible with any shell.<br />
#!/bin/sh<br />
echo "Arch is the best!"<br />
<br />
<br />
'''Bourne shell (Alternate)''' - Handy for piping the output to your favourite IRC/email/IM client. Should work with any shell.<br />
#!/bin/sh<br />
yes Arch is the best!<br />
<br />
<br />
'''Bourne shell (Dynamically updated)'''<br />
<pre style='overflow:auto'><br />
#!/bin/bash<br />
wget http://wiki.archlinux.org/index.php/Arch_is_the_best -qO-| sed -n ':b;n;s/id="Translations"//;Tb;:d;n;s/id="See_also"//;t;p;bd'|sed '/<i>.*<\/i>/d;s/<[^>]*>//g'|sed 'N;s/\n/: /;N;N;s/\n//g'<br />
</pre><br />
<br />
<br />
'''brainfuck''' - Doesn't the language name explain it?<br />
++>++++++>+++++<+[>[->+<]<->++++++++++<]>>.<[-]>[-<++>]<br />
<----------------.---------------.+++++.<+++[-<++++++++++>]<.<br />
>>+.++++++++++.<<.>>+.------------.---.<<.>>---.<br />
+++.++++++++++++++.+.<<+.[-]++++++++++.<br />
<br />
<br />
'''C''' - Note the three space indenting used in this project, much like that used by other superior beings.<br />
#include <stdio.h><br />
#include <stdlib.h><br />
int main(void) <br />
{<br />
puts("Arch is the best!");<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
<br />
'''C#''' - Intended to be a simple, modern, general-purpose, object-oriented programming language.<br />
using System;<br />
public class ArchIsTheBest<br />
{<br />
static public void Main ()<br />
{<br />
Console.WriteLine ("Arch is the best!");<br />
}<br />
}<br />
<br />
<br />
'''C++''' - Arch == Linux++<br />
#include <iostream><br />
#include <cstdlib><br />
int main ()<br />
{<br />
std::cout << "Arch is the best!" << std::endl;<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
<br />
'''COBOL''' - A simple, lightweight programming language.<br />
IDENTIFICATION DIVISION.<br />
PROGRAM-ID. TheBest.<br />
<br />
PROCEDURE DIVISION.<br />
DISPLAY "Arch is the best!".<br />
STOP RUN.<br />
<br />
<br />
'''CoffeeScript''' - A programming language that transcompiles to JavaScript.<br />
alert 'Arch is the best!'<br />
<br />
<br />
'''Clojure''' - A Lisp dialect that runs on the JVM.<br />
(def translations {"english" "Arch is the best!",<br />
"german" "Arch ist das Beste!",<br />
"australian" "Arch is fair dinkum, mate!",<br />
"h4x0r" "arhc 51 7he be57!",<br />
"spanish" "¡Arch es el mejor!"})<br />
<br />
(defn read-choice []<br />
(println "\nAvailable languages: ")<br />
(doall (map #(println (key %)) translations))<br />
(print "Enter language or Ctrl-c: ") (flush)<br />
(translations (read-line) :badinput))<br />
<br />
(defn arch-is-the-best []<br />
(loop [choice (read-choice)]<br />
(case choice<br />
:badinput (do (print "\nBad input!\n")<br />
(recur (read-choice)))<br />
(do (print "\n" choice "\n")<br />
(recur (read-choice))))))<br />
or<br />
(def translations {"english" "Arch is the best!",<br />
"german" "Arch ist das Beste!",<br />
"australian" "Arch is fair dinkum, mate!",<br />
"h4x0r" "arhc 51 7he be57!",<br />
"spanish" "¡Arch es el mejor!"<br />
"street" "Arch iz da shizzle ma nizzle"})<br />
(while 1<br />
(println "\nPick a language:\n" (map #(key %) translations) "\n language: ")<br />
(println (translations (read-line) "Not a valid language")))<br />
<br />
<br />
or<br />
(prn "Arch is the best!")<br />
<br />
'''Common Lisp''' - Tested on SBCL, feel free to add more of the translations.<br />
#!/usr/bin/sbcl --script<br />
(defparameter *best-list* '((English "Arch is the best!")<br />
(Chinese "Arch, 她出类拔萃!")<br />
(German "Arch ist das Beste!")<br />
(Greek "Το Arch είναι το καλύτερο!")))<br />
(defun aitb ()<br />
(format t "Available languages: ~{~{~@(~a~)~*~}~^, ~}.~%" *best-list*)<br />
(loop for input = (progn (format t "~&Input the desired language, (or 'quit'): ~%")<br />
(force-output)<br />
(read-line))<br />
if (string-equal input "quit")<br />
do (loop-finish)<br />
else<br />
do (let ((language-def<br />
(assoc input *best-list*<br />
:key (lambda (lang) (symbol-name lang))<br />
:test #'string-equal)))<br />
(if language-def<br />
(format t "~&~A~%" (second language-def))<br />
(format t "~&Invalid language.~%"))))<br />
(format t "~&May the Arch be with you!~%"))<br />
(aitb)<br />
<br />
<br />
'''Common Lisp (Alternate)''' - Should run on any implementation (Clisp, Allegro, SBCL...)<br />
(princ "Arch is the best!")<br />
<br />
<br />
'''D''' - A C-style language. The benefits of hindsight, with modern conveniences.<br />
import std.stdio : writeln;<br />
void main()<br />
{<br />
writeln("Arch is the best");<br />
}<br />
<br />
<br />
'''Dart''' - Google's javascript killer<br />
main(){<br />
print('Arch is the best');<br />
}<br />
<br />
'''Emacs Lisp''' - A dialect of the Lisp programming language used by the GNU Emacs and XEmacs text editors <br />
(message "Arch is the best!")<br />
<br />
<br />
'''Erlang''' - A concurrent, garbage-collected programming language and runtime system.<br />
-module(arch).<br />
-export([is_the_best/0]).<br />
is_the_best() -> io:fwrite("Arch is the best!\n").<br />
<br />
Or using message passing between processes<br />
<br />
-module(arch).<br />
-export([ultimate_question/0,the_answer/0]).<br />
the_answer() -><br />
receive<br />
{Client,who_is_the_best} -><br />
Client ! {self(),"Arch is the best!"};<br />
{Client,_} -><br />
Client ! {self(),"Taco Taco Taco!"}<br />
end,<br />
the_answer().<br />
ultimate_question() -><br />
Pid = spawn(arch,the_answer,[]),<br />
Pid ! {self(),who_is_the_best},<br />
receive<br />
{Pid,Response} -> io:format("~s~n",[Response])<br />
end.<br />
<br />
'''F#''' - A strongly-typed, functional-first programming language for writing simple code to solve complex problems.<br />
printfn "Arch is the best!"<br />
<br />
'''Factor''' - High-level stack-based language.<br />
"Arch is the best" print<br />
<br />
'''FIM++''' - A wordy, imperative, dynamically-typed, and interpreted language that can use Java classes.<br />
Dear Princess Celestia: Letter About Arch Linux.<br />
Today I learned:<br />
I wrote "Arch is the best!".<br />
Your faithful student, Twilight Sparkle<br />
<br />
'''Forth''' - Stack-based language.<br />
." Arch is the best" cr -- kiss way<br />
<br />
'''Fortran95'''<br />
program arch<br />
print *,"Arch is the best!"<br />
end program arch<br />
<br />
'''Genie''' - A new programming language, that allows for a more modern programming style while being able to effortlessly create and use GObjects natively. <br />
init<br />
print "Arch is the best"<br />
<br />
<br />
'''Gjs''' - A Javascript binding for GNOME. It's mainly based on Spidermonkey javascript engine and the GObject introspection framework.<br />
#!/usr/bin/env gjs<br />
print ('Arch is the best');<br />
<br />
<br />
'''Go''' - A language created by Google that's a love child between C, C++ and Python.<br />
package main<br />
<br />
import "fmt"<br />
<br />
func main() {<br />
fmt.Println("Arch is the best!")<br />
}<br />
<br />
<br />
'''Haskell''' - The language where IO is easy and unproblematic.<br />
main = putStrLn "Arch is the best!"<br />
<br />
<br />
'''HTML''' - A markup language used to create and define web pages and their content.<br />
<pre><br />
<!DOCTYPE html><br />
<html lang='en'><br />
<head><br />
<title>Arch is the best!</title><br />
</head><br />
<body><br />
<p>Arch is the best!</p><br />
</body><br />
</html><br />
</pre><br />
<br />
'''Io'''<br />
"Arch is the best!" println<br />
<br />
<br />
'''Java''' - An extremely portable language, this will run on pretty much anything, it might even run on your toaster!<br />
public class ArchIsTheBest {<br />
public static void main(String[] args) {<br />
System.out.println("Arch is the best!");<br />
}<br />
}<br />
<br />
<br />
'''JavaScript''' - Also known as ECMAScript, a prototype-based object-oriented scripting language. <br />
console.log('Arch is the best!');<br />
<br />
<br />
'''JavaScript (in a web browser)'''<br />
alert('Arch is the best!');<br />
<br />
<br />
'''LilyPond''' - A powerful music engraving program with an intuitive LaTeX-like input language.<br />
\version "2.12.3"<br />
\include "english.ly"<br />
\header { title = "Arch is the best!" }<br />
\score<br />
{<br />
<<<br />
\relative c' { c4 e g c \bar "||" }<br />
\addlyrics { Arch is the best! }<br />
>><br />
}<br />
<br />
<br />
'''LOLCODE''' - Why not?<br />
HAI<br />
CAN HAS STDIO?<br />
VISIBLE "ARCH IS TEH PWNZ LOL!"<br />
KTHXBYE<br />
<br />
<br />
'''Lua''' - A lightweight, extensible programming language.<br />
print "Arch is the best!"<br />
<br />
'''Morpho''' - Morpho is a multi-paradigm programming language that supports procedural, object-oriented and functional programming. <br />
<br />
writeln("Arch is the best!");<br />
<br />
<br />
'''Nasm(x86_64) (or yasm)''' - Notice that the string is in the .text section, which feels superior<br />
<br />
;nasm -f elf64 arch.asm<br />
;ld -o arch arch.o<br />
;./arch<br />
<br />
section .text<br />
global _start<br />
_start:<br />
mov edx,len<br />
mov ecx,msg<br />
mov ebx,1<br />
mov eax,4<br />
int 0x80<br />
xor ebx,ebx<br />
mov eax,1<br />
int 0x80<br />
msg: db "Arch is the best!",10<br />
len equ $-msg<br />
<br />
<br />
'''Nimrod''' - Portable lightweight programming language.<br />
echo "Arch is the best!"<br />
<br />
<br />
'''Objective-C''' - A reflective, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.<br />
NSLog(@"Arch is the best!");<br />
<br />
<br />
'''OCaml''' - The main implementation of the Caml programming language.<br />
print_endline "Arch is the best!"<br />
<br />
'''Octave''' - High-level interpreted language, primarily intended for numerical computations.<br />
printf("Arch is the best!\n")<br />
<br />
'''Ook!''' - brainfuck, translated to Orangutan<br />
Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook! Ook? Ook. Ook? Ook! Ook? Ook! Ook! Ook. Ook? Ook. Ook. Ook? Ook. Ook? Ook! Ook? Ook. Ook! Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook. Ook! Ook? Ook! Ook! Ook? Ook! Ook. Ook? Ook! Ook? Ook! Ook! Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook! Ook! Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook? Ook! Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook! Ook. Ook! Ook? Ook! Ook! Ook? Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook.<br />
<br />
'''Perl''' - A high-level, general-purpose, interpreted, dynamic programming language.<br />
#!/usr/bin/perl<br />
print "Arch is the best!\n";<br />
<br />
<br />
'''PHP''' - A general-purpose scripting language.<br />
<?php<br />
echo "Arch is the best!\n";<br />
?> <br />
<br />
<br />
'''Pixilang''' - Make me pixels.<br />
print("Arch is the best!",0,0,#1897D1)<br />
frame<br />
<br />
<br />
'''Portable GNU assembler''' - as -o arch.o arch.s && ld -o arch -O0 arch.o<br />
<br />
.section .data<br />
archIsBest: <br />
.ascii "Arch is the best!\n"<br />
archIsBest_len:<br />
.long . - archIsBest<br />
.section .text<br />
.globl _start<br />
_start:<br />
xorl %ebx, %ebx<br />
movl $4, %eax <br />
xorl %ebx, %ebx<br />
incl %ebx <br />
leal archIsBest, %ecx<br />
movl archIsBest_len, %edx <br />
int $0x80 <br />
xorl %eax, %eax<br />
incl %eax<br />
xorl %ebx, %ebx <br />
int $0x80<br />
<br />
<br />
'''Processing''' - An open source programming language and IDE built for the electronic arts and visual design.<br />
println("Arch is the best!");<br />
<br />
<br />
'''Prolog''' - A general purpose logic programming language associated with artificial intelligence and computational linguistics.<br />
format('Arch is the best~n',[]).<br />
<br />
<br />
'''Python''' - A general-purpose high-level programming language.<br />
#!/usr/bin/env python3<br />
print('Arch is the best!')<br />
<br />
<br />
'''QBASIC''' - An interpreter for a variant of the BASIC programming language which is based on QuickBASIC.<br />
PRINT "Arch is the best!"<br />
<br />
<br />
'''R''' - A language for statistical computing (and much more!).<br />
archIsBest <- function() { cat("Arch is the best!\n") }<br />
archIsBest()<br />
<br />
<br />
'''Ruby''' - A dynamic, reflective, general purpose object-oriented programming language.<br />
#!/usr/bin/ruby -w<br />
puts 'Arch is the best!'<br />
<br />
<br />
'''Scala''' - A multi paradigm language that runs on the JVM<br />
object ArchIsBest extends App {<br />
println("Arch is the best!")<br />
} <br />
<br />
<br />
<br />
'''Scheme''' - A dialect of Lisp.<br />
(display "Arch is the best!\n")<br />
or in XunDu style<br />
#!/usr/bin/guile1.8 -s<br />
!#<br />
(define 节 or)<br />
(define 哀 #t)<br />
(define (xi) (display "Arch is the best!\n"))<br />
(节 (xi) 哀 (wen) 顺 (le) 变 (jian) )<br />
<br />
<br />
'''Seed''' - A library and interpreter, dynamically bridging the WebKit JavaScriptCore engine, with the GNOME platform.<br />
#!/usr/bin/env seed<br />
print ('Arch is the best');<br />
<br />
<br />
'''Shoes''' - A Ruby version using Shoes for a GUI<br />
Shoes.app :width => 135, :height => 30 do <br />
para "Arch is the Best!"<br />
end<br />
<br />
<br />
'''SQL''' - Structured Query Language, the query language for relational databases<br />
SELECT 'Arch is the best!';<br />
SELECT 'Arch is the best!' from dual; -- for Oracle DB<br />
<br />
<br />
'''Standard ML''' - A general-purpose, modular, functional programming language with compile-time type checking and type inference.<br />
print "Arch is the best!\n"<br />
<br />
<br />
'''Tcl/Tk''' - A scripting language that is commonly used for rapid prototyping, scripted applications, GUIs and testing.<br />
#!/usr/bin/env tclsh<br />
puts "Arch is the best!"<br />
<br />
<br />
'''Vala''' - "Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C"<br />
void main(string[] args) {<br />
stdout.printf("\nArch is the best!\n\n");<br />
}<br />
<br />
<br />
''' Wiring (Arduino)''' - Built on Processing, the open source programming language developed at the Massachusetts Institute of Technology.<br />
void setup() <br />
{<br />
Serial.begin(9600); <br />
}<br />
void loop() <br />
{ <br />
Serial.print("Arch is the best!");<br />
}<br />
<br />
<br />
''' X11 ''' - X11 is an architecture independent system for display of graphical user interfaces.<br />
#include <stdio.h><br />
#include <stdlib.h><br />
#include <string.h><br />
<br />
#include <X11/Xlib.h><br />
<br />
int main()<br />
{<br />
Display *d;<br />
Window w;<br />
XEvent e;<br />
int s;<br />
<br />
if (!(d = XOpenDisplay(NULL))) {<br />
fprintf(stderr, "Couldn't open display, but Arch is the best!\n");<br />
exit(1);<br />
}<br />
<br />
s = DefaultScreen(d);<br />
w = XCreateSimpleWindow(d, RootWindow(d,s), 0, 0, 110, 20, 0, <br />
0, WhitePixel(d,s));<br />
XSelectInput(d, w, ExposureMask | KeyPressMask);<br />
XMapWindow(d,w);<br />
<br />
while (1) {<br />
XNextEvent(d, &e);<br />
if (e.type == Expose) {<br />
XDrawString(d, w, DefaultGC(d, s), 5, 15, "Arch is the best!", 17);<br />
}<br />
}<br />
<br />
XCloseDisplay(d);<br />
return 0;<br />
}<br />
<br />
==Translations==<br />
<br />
'''Ancient Chinese'''<br />
阿祺,盡善矣。<br />
<br />
'''Ancient Greek'''<br />
Ἡ Ἀψίς ἄριστη ἐστί!<br />
<br />
'''Arabic'''<br />
ارتش هو الأفضل<br />
<br />
'''Australian'''<br />
Arch is fair dinkum, mate!<br />
<br />
'''Bahasa Indonesia'''<br />
Arch terbaik!<br />
<br />
'''Basque'''<br />
Arch onena da!<br />
<br />
'''Belarusian'''<br />
Арч - самы лепшы!<br />
<br />
'''Bengali'''<br />
আর্চ সবচেয়ে ভালো!<br />
<br />
'''British'''<br />
Arch is simply spiffing.<br />
<br />
'''Bulgarian'''<br />
Арч е най-добрият!<br />
<br />
'''Catalan'''<br />
Arch és el millor!<br />
<br />
'''Chinese (Simplified)'''<br />
Arch 最棒了!<br />
<br />
'''Chinese (Traditional)'''<br />
狀哉我大 Arch!<br />
<br />
'''Chinese (Taobao Style - 淘宝体)'''<br />
Arch,好评哦,亲!<br />
<br />
'''Czech'''<br />
Arch je nejlepší!<br />
<br />
'''Croatian'''<br />
Arch je najbolji!<br />
<br />
'''Danish'''<br />
Arch er bedst!<br />
<br />
'''Dutch'''<br />
Arch is de beste!<br />
<br />
'''Esperanto'''<br />
Arch plejbonas!<br />
<br />
'''Estonian'''<br />
Arch on parim!<br />
<br />
'''Fikonspråket'''<br />
Firch Arkon fir äkon fist bäkon<br />
<br />
'''Filipino'''<br />
Mabuhay ang Arch!<br />
<br />
'''Finnish'''<br />
Arch on paras!<br />
<br />
'''French'''<br />
Arch est le meilleur!<br />
<br />
'''Galician'''<br />
Arch é o mellor!<br />
<br />
'''German'''<br />
Arch ist das Beste!<br />
<br />
'''Greek (Modern)'''<br />
Το Αρτς είναι το καλύτερο!<br />
<br />
'''Haitian Creole'''<br />
Arch se meye bagay!<br />
<br />
'''Hantec'''<br />
Arch je nejbetélnější!<br />
<br />
'''Hebrew'''<br />
ארצ' זה הכי אחי!<br />
<br />
'''Hindi'''<br />
आर्च सर्वोत्तम है ।<br />
<br />
'''Hungarian'''<br />
Az Arch a legjobb!<br />
<br />
'''Irish'''<br />
Arch é is fearr!<br />
<br />
'''Italian'''<br />
Arch è il migliore!<br />
<br />
'''Japanese'''<br />
Archが一番ですよ!<br />
<br />
'''Kazakh'''<br />
Арч - ең жақсы!<br />
<br />
'''Klingon'''<br />
Arch'pu'ta' 'a'<br />
<br />
'''Latin'''<br />
Arch optimus est!<br />
<br />
'''Latvian'''<br />
Arch ir labākais!<br />
<br />
'''Lithuanian'''<br />
Arch yra geriausias!<br />
<br />
'''Lojban'''<br />
la .artc. xagrai<br />
<br />
'''Malayalam'''<br />
ആർച് ആണ് ഏറ്റവും നല്ലത് <br />
<br />
'''Marathi'''<br />
आर्च सगळ्यात भारी आहे!<br />
<br />
'''Norwegian'''<br />
Arch er best!<br />
<br />
'''Old English'''<br />
Arch biþ betst!<br />
<br />
'''Persian'''<br />
طاق بزرگ است<br />
<br />
'''Pig Latin'''<br />
Archway isway ethay estbay!<br />
<br />
'''Polish'''<br />
Arch jest najlepszy!<br />
<br />
'''Portuguese'''<br />
Arch é o melhor!<br />
<br />
'''Québécois'''<br />
Arch est le plus meilleure du monde!<br />
<br />
'''Romanian'''<br />
Аrch e cel mai bun!<br />
<br />
'''Russian'''<br />
Арч — лучший!<br />
<br />
'''Serbian'''<br />
Arch je najbolji!<br />
<br />
'''Singaporean'''<br />
Arch the best lah!<br />
<br />
'''Slovenian'''<br />
Arch je najboljši!<br />
<br />
'''Spanish (Standard)'''<br />
¡Arch es el mejor!<br />
<br />
'''Spanish (Argentina)'''<br />
Arch es una mazza!!<br />
<br />
'''Spanish (Chile)'''<br />
Arch es bacán<br />
<br />
'''Spanish (Chile, alternative)'''<br />
Arch es la raja<br />
<br />
'''Spanish (Chile, marginal)'''<br />
(written in IPA because standard Spanish doesn't have these sounds)<br />
ˈæɹʃ ɛːʰ tɜ.rˈiː.u.lɛ la rˈa.χa ʃʊ.ɹʊ<br />
<br />
'''Spanish (Uruguay)'''<br />
Arch la rompe!<br />
<br />
'''Swedish'''<br />
Arch är bäst!<br />
<br />
'''Turkish'''<br />
Arch en iyisidir!<br />
<br />
'''Tamil'''<br />
ஆர்ச்சே சிறந்தது!<br />
<br />
'''Telugu'''<br />
ఆర్చ్ ఉత్తమమైనది!<br />
<br />
'''Ukrainian'''<br />
Arch є найкращий!<br />
<br />
'''Urdu'''<br />
آرچ سب سے بہتر ہے! <br />
<br />
'''Vietnamese'''<br />
Arch là tốt nhất!<br />
<br />
'''Welsh (Cymraeg)'''<br />
<br />
Emphasis on Arch:<br />
Arch sydd yr orau un!<br />
Arch sydd y gorau un!<br />
<br />
Emphasis on being the best (one):<br />
Yr orau un yw Arch!<br />
Y gorau un yw Arch!<br />
<br />
== Encodings ==<br />
<br />
'''ASCII Banner'''<br />
_ _ _ _ _ _ _ <br />
/\ | | (_) | | | | | | | | | |<br />
/ \ _ __ ___| |__ _ ___ | |_| |__ ___ | |__ ___ ___| |_| |<br />
/ /\ \ | '__/ __| '_ \ | / __| | __| '_ \ / _ \ | '_ \ / _ \/ __| __| |<br />
/ ____ \| | | (__| | | | | \__ \ | |_| | | | __/ | |_) | __/\__ \ |_|_|<br />
/_/ \_\_| \___|_| |_| |_|___/ \__|_| |_|\___| |_.__/ \___||___/\__(_)<br />
<br />
<br />
'''Base64'''<br />
QXJjaCBpcyB0aGUgYmVzdCEK<br />
<br />
'''Binary ASCII'''<br />
0100000101110010011000110110100000100000011010010111001100100000011101000110100001100101001000000110001001100101011100110111010000100001<br />
<br />
'''Braille'''<br />
⠁⠗⠉⠓⠀⠊⠎⠀⠮⠀⠃⠑⠎⠞⠲<br />
<br />
'''Desrever (Reversed)'''<br />
!tseb eht si hcrA<br />
<br />
'''h4x0r'''<br />
Arch 15 7h3 b357!<br />
<br />
'''Hexadecimal ASCII'''<br />
4172636820697320746865206265737421<br />
<br />
'''md5sum'''<br />
2d9092e089d77a8e23f47ba3dfe77027<br />
<br />
'''Morse Code'''<br />
.- .-. -.-. .... .. ... - .... . -... . ... -<br />
<br />
'''ROT13'''<br />
Nepu vf gur orfg!<br />
<br />
'''Upside Down'''<br />
¡ʇsǝq ǝɥʇ s! ɥɔɹ∀<br />
<br />
'''URL Encoded'''<br />
Arch%20is%20the%20best!</div>Qguvhttps://wiki.archlinux.org/index.php?title=Arch_is_the_best&diff=325175Arch is the best2014-07-15T02:09:07Z<p>Qguv: fix spelling of Chinese (Traditional) in /* Translations */</p>
<hr />
<div>[[Category:About Arch]]<br />
[[Category:Programming language]]<br />
[[ja:Arch_is_the_best]]<br />
The '''Arch is the best''' project is a very sophisticated and exquisite, ego-boosting and mind-blowing (albeit perhaps a bit over-engineered) project which gives proof of Arch's superiority.<br />
<br />
== History ==<br />
<br />
The visionary project was originally devised in April 2008 by long time Arch community member [https://bbs.archlinux.org/profile.php?id=2529 lucke] as a simple shell script which provided irrefutable proof that "Arch is the best". It was announced to the world with a [https://bbs.archlinux.org/viewtopic.php?id=47306 forum post], thus illuminating other people's minds, who immediately started porting it to multiple different languages, both programming and verbal, so that every human being on the planet could fully appreciate and benefit from this revolutionary discovery.<br />
<br />
== Installation ==<br />
<br />
A sample PKGBUILD called {{AUR|archbest-mod1}} has been uploaded to [[AUR]].<br />
<br />
== The code ==<br />
<br />
The "Arch is the best" project is ported to many programming languages.<br />
<br />
'''Ada''' - A systems critical programming language.<br />
with Ada.Text_IO;<br />
use Ada.Text_IO;<br />
procedure ArchIsTheBest is<br />
begin<br />
Put_Line("Arch is the best!");<br />
end HelloWorld;<br />
<br />
'''APL''' - A Programming Language.<br />
'Arch is the best!'<br />
<br />
'''ATS''' - A functional programming language that uses dependent types to improve programs' reliability.<br />
implement main () = println! "Arch is the best!"<br />
<br />
'''Awk''' - A data-driven programming language designed for processing text-based data.<br />
BEGIN {<br />
print "Arch is the best!"<br />
}<br />
<br />
'''Befunge''' - Believed to be the first two-dimensional, ASCII-based, general-purpose (in the sense of "you could plausibly write Hunt the Wumpus in it") programming language.<br />
<v"Arch is the best!"0<br />
<,_@#:<br />
<br />
'''Boo''' - A stablished object oriented statically typed programming language for .NET and Mono with a python inspired syntax and a special focus on metaprogramming through language and compiler extensibility features such as macros and custom compilation pipelines.<br />
print "Arch is the best!"<br />
<br />
'''Bourne shell''' - The original program, should be compatible with any shell.<br />
#!/bin/sh<br />
echo "Arch is the best!"<br />
<br />
<br />
'''Bourne shell (Alternate)''' - Handy for piping the output to your favourite IRC/email/IM client. Should work with any shell.<br />
#!/bin/sh<br />
yes Arch is the best!<br />
<br />
<br />
'''Bourne shell (Dynamically updated)'''<br />
<pre style='overflow:auto'><br />
#!/bin/bash<br />
wget http://wiki.archlinux.org/index.php/Arch_is_the_best -qO-| sed -n ':b;n;s/id="Translations"//;Tb;:d;n;s/id="See_also"//;t;p;bd'|sed '/<i>.*<\/i>/d;s/<[^>]*>//g'|sed 'N;s/\n/: /;N;N;s/\n//g'<br />
</pre><br />
<br />
<br />
'''brainfuck''' - Doesn't the language name explain it?<br />
++>++++++>+++++<+[>[->+<]<->++++++++++<]>>.<[-]>[-<++>]<br />
<----------------.---------------.+++++.<+++[-<++++++++++>]<.<br />
>>+.++++++++++.<<.>>+.------------.---.<<.>>---.<br />
+++.++++++++++++++.+.<<+.[-]++++++++++.<br />
<br />
<br />
'''C''' - Note the three space indenting used in this project, much like that used by other superior beings.<br />
#include <stdio.h><br />
#include <stdlib.h><br />
int main(void) <br />
{<br />
puts("Arch is the best!");<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
<br />
'''C#''' - Intended to be a simple, modern, general-purpose, object-oriented programming language.<br />
using System;<br />
public class ArchIsTheBest<br />
{<br />
static public void Main ()<br />
{<br />
Console.WriteLine ("Arch is the best!");<br />
}<br />
}<br />
<br />
<br />
'''C++''' - Arch == Linux++<br />
#include <iostream><br />
#include <cstdlib><br />
int main ()<br />
{<br />
std::cout << "Arch is the best!" << std::endl;<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
<br />
'''COBOL''' - A simple, lightweight programming language.<br />
IDENTIFICATION DIVISION.<br />
PROGRAM-ID. TheBest.<br />
<br />
PROCEDURE DIVISION.<br />
DISPLAY "Arch is the best!".<br />
STOP RUN.<br />
<br />
<br />
'''CoffeeScript''' - A programming language that transcompiles to JavaScript.<br />
alert 'Arch is the best!'<br />
<br />
<br />
'''Clojure''' - A Lisp dialect that runs on the JVM.<br />
(def translations {"english" "Arch is the best!",<br />
"german" "Arch ist das Beste!",<br />
"australian" "Arch is fair dinkum, mate!",<br />
"h4x0r" "arhc 51 7he be57!",<br />
"spanish" "¡Arch es el mejor!"})<br />
<br />
(defn read-choice []<br />
(println "\nAvailable languages: ")<br />
(doall (map #(println (key %)) translations))<br />
(print "Enter language or Ctrl-c: ") (flush)<br />
(translations (read-line) :badinput))<br />
<br />
(defn arch-is-the-best []<br />
(loop [choice (read-choice)]<br />
(case choice<br />
:badinput (do (print "\nBad input!\n")<br />
(recur (read-choice)))<br />
(do (print "\n" choice "\n")<br />
(recur (read-choice))))))<br />
or<br />
(def translations {"english" "Arch is the best!",<br />
"german" "Arch ist das Beste!",<br />
"australian" "Arch is fair dinkum, mate!",<br />
"h4x0r" "arhc 51 7he be57!",<br />
"spanish" "¡Arch es el mejor!"<br />
"street" "Arch iz da shizzle ma nizzle"})<br />
(while 1<br />
(println "\nPick a language:\n" (map #(key %) translations) "\n language: ")<br />
(println (translations (read-line) "Not a valid language")))<br />
<br />
<br />
or<br />
(prn "Arch is the best!")<br />
<br />
'''Common Lisp''' - Tested on SBCL, feel free to add more of the translations.<br />
#!/usr/bin/sbcl --script<br />
(defparameter *best-list* '((English "Arch is the best!")<br />
(Chinese "Arch, 她出类拔萃!")<br />
(German "Arch ist das Beste!")<br />
(Greek "Το Arch είναι το καλύτερο!")))<br />
(defun aitb ()<br />
(format t "Available languages: ~{~{~@(~a~)~*~}~^, ~}.~%" *best-list*)<br />
(loop for input = (progn (format t "~&Input the desired language, (or 'quit'): ~%")<br />
(force-output)<br />
(read-line))<br />
if (string-equal input "quit")<br />
do (loop-finish)<br />
else<br />
do (let ((language-def<br />
(assoc input *best-list*<br />
:key (lambda (lang) (symbol-name lang))<br />
:test #'string-equal)))<br />
(if language-def<br />
(format t "~&~A~%" (second language-def))<br />
(format t "~&Invalid language.~%"))))<br />
(format t "~&May the Arch be with you!~%"))<br />
(aitb)<br />
<br />
<br />
'''Common Lisp (Alternate)''' - Should run on any implementation (Clisp, Allegro, SBCL...)<br />
(princ "Arch is the best!")<br />
<br />
<br />
'''D''' - A C-style language. The benefits of hindsight, with modern conveniences.<br />
import std.stdio : writeln;<br />
void main()<br />
{<br />
writeln("Arch is the best");<br />
}<br />
<br />
<br />
'''Dart''' - Google's javascript killer<br />
main(){<br />
print('Arch is the best');<br />
}<br />
<br />
'''Emacs Lisp''' - A dialect of the Lisp programming language used by the GNU Emacs and XEmacs text editors <br />
(message "Arch is the best!")<br />
<br />
<br />
'''Erlang''' - A concurrent, garbage-collected programming language and runtime system.<br />
-module(arch).<br />
-export([is_the_best/0]).<br />
is_the_best() -> io:fwrite("Arch is the best!\n").<br />
<br />
Or using message passing between processes<br />
<br />
-module(arch).<br />
-export([ultimate_question/0,the_answer/0]).<br />
the_answer() -><br />
receive<br />
{Client,who_is_the_best} -><br />
Client ! {self(),"Arch is the best!"};<br />
{Client,_} -><br />
Client ! {self(),"Taco Taco Taco!"}<br />
end,<br />
the_answer().<br />
ultimate_question() -><br />
Pid = spawn(arch,the_answer,[]),<br />
Pid ! {self(),who_is_the_best},<br />
receive<br />
{Pid,Response} -> io:format("~s~n",[Response])<br />
end.<br />
<br />
'''F#''' - A strongly-typed, functional-first programming language for writing simple code to solve complex problems.<br />
printfn "Arch is the best!"<br />
<br />
'''Factor''' - High-level stack-based language.<br />
"Arch is the best" print<br />
<br />
'''FIM++''' - A wordy, imperative, dynamically-typed, and interpreted language that can use Java classes.<br />
Dear Princess Celestia: Letter About Arch Linux.<br />
Today I learned:<br />
I wrote "Arch is the best!".<br />
Your faithful student, Twilight Sparkle<br />
<br />
'''Forth''' - Stack-based language.<br />
." Arch is the best" cr -- kiss way<br />
<br />
'''Fortran95'''<br />
program arch<br />
print *,"Arch is the best!"<br />
end program arch<br />
<br />
'''Genie''' - A new programming language, that allows for a more modern programming style while being able to effortlessly create and use GObjects natively. <br />
init<br />
print "Arch is the best"<br />
<br />
<br />
'''Gjs''' - A Javascript binding for GNOME. It's mainly based on Spidermonkey javascript engine and the GObject introspection framework.<br />
#!/usr/bin/env gjs<br />
print ('Arch is the best');<br />
<br />
<br />
'''Go''' - A language created by Google that's a love child between C, C++ and Python.<br />
package main<br />
<br />
import "fmt"<br />
<br />
func main() {<br />
fmt.Println("Arch is the best!")<br />
}<br />
<br />
<br />
'''Haskell''' - The language where IO is easy and unproblematic.<br />
main = putStrLn "Arch is the best!"<br />
<br />
<br />
'''HTML''' - A markup language used to create and define web pages and their content.<br />
<pre><br />
<!DOCTYPE html><br />
<html lang='en'><br />
<head><br />
<title>Arch is the best!</title><br />
</head><br />
<body><br />
<p>Arch is the best!</p><br />
</body><br />
</html><br />
</pre><br />
<br />
'''Io'''<br />
"Arch is the best!" println<br />
<br />
<br />
'''Java''' - An extremely portable language, this will run on pretty much anything, it might even run on your toaster!<br />
public class ArchIsTheBest {<br />
public static void main(String[] args) {<br />
System.out.println("Arch is the best!");<br />
}<br />
}<br />
<br />
<br />
'''JavaScript''' - Also known as ECMAScript, a prototype-based object-oriented scripting language. <br />
console.log('Arch is the best!');<br />
<br />
<br />
'''JavaScript (in a web browser)'''<br />
alert('Arch is the best!');<br />
<br />
<br />
'''LilyPond''' - A powerful music engraving program with an intuitive LaTeX-like input language.<br />
\version "2.12.3"<br />
\include "english.ly"<br />
\header { title = "Arch is the best!" }<br />
\score<br />
{<br />
<<<br />
\relative c' { c4 e g c \bar "||" }<br />
\addlyrics { Arch is the best! }<br />
>><br />
}<br />
<br />
<br />
'''LOLCODE''' - Why not?<br />
HAI<br />
CAN HAS STDIO?<br />
VISIBLE "ARCH IS TEH PWNZ LOL!"<br />
KTHXBYE<br />
<br />
<br />
'''Lua''' - A lightweight, extensible programming language.<br />
print "Arch is the best!"<br />
<br />
'''Morpho''' - Morpho is a multi-paradigm programming language that supports procedural, object-oriented and functional programming. <br />
<br />
writeln("Arch is the best!");<br />
<br />
<br />
'''Nasm(x86_64) (or yasm)''' - Notice that the string is in the .text section, which feels superior<br />
<br />
;nasm -f elf64 arch.asm<br />
;ld -o arch arch.o<br />
;./arch<br />
<br />
section .text<br />
global _start<br />
_start:<br />
mov edx,len<br />
mov ecx,msg<br />
mov ebx,1<br />
mov eax,4<br />
int 0x80<br />
xor ebx,ebx<br />
mov eax,1<br />
int 0x80<br />
msg: db "Arch is the best!",10<br />
len equ $-msg<br />
<br />
<br />
'''Nimrod''' - Portable lightweight programming language.<br />
echo "Arch is the best!"<br />
<br />
<br />
'''Objective-C''' - A reflective, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.<br />
NSLog(@"Arch is the best!");<br />
<br />
<br />
'''OCaml''' - The main implementation of the Caml programming language.<br />
print_endline "Arch is the best!"<br />
<br />
'''Octave''' - High-level interpreted language, primarily intended for numerical computations.<br />
printf("Arch is the best!\n")<br />
<br />
'''Ook!''' - brainfuck, translated to Orangutan<br />
Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook! Ook? Ook. Ook? Ook! Ook? Ook! Ook! Ook. Ook? Ook. Ook. Ook? Ook. Ook? Ook! Ook? Ook. Ook! Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook. Ook! Ook? Ook! Ook! Ook? Ook! Ook. Ook? Ook! Ook? Ook! Ook! Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook! Ook! Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook? Ook! Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook! Ook. Ook! Ook? Ook! Ook! Ook? Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook.<br />
<br />
'''Perl''' - A high-level, general-purpose, interpreted, dynamic programming language.<br />
#!/usr/bin/perl<br />
print "Arch is the best!\n";<br />
<br />
<br />
'''PHP''' - A general-purpose scripting language.<br />
<?php<br />
echo "Arch is the best!\n";<br />
?> <br />
<br />
<br />
'''Pixilang''' - Make me pixels.<br />
print("Arch is the best!",0,0,#1897D1)<br />
frame<br />
<br />
<br />
'''Portable GNU assembler''' - as -o arch.o arch.s && ld -o arch -O0 arch.o<br />
<br />
.section .data<br />
archIsBest: <br />
.ascii "Arch is the best!\n"<br />
archIsBest_len:<br />
.long . - archIsBest<br />
.section .text<br />
.globl _start<br />
_start:<br />
xorl %ebx, %ebx<br />
movl $4, %eax <br />
xorl %ebx, %ebx<br />
incl %ebx <br />
leal archIsBest, %ecx<br />
movl archIsBest_len, %edx <br />
int $0x80 <br />
xorl %eax, %eax<br />
incl %eax<br />
xorl %ebx, %ebx <br />
int $0x80<br />
<br />
<br />
'''Processing''' - An open source programming language and IDE built for the electronic arts and visual design.<br />
println("Arch is the best!");<br />
<br />
<br />
'''Prolog''' - A general purpose logic programming language associated with artificial intelligence and computational linguistics.<br />
format('Arch is the best~n',[]).<br />
<br />
<br />
'''Python''' - A general-purpose high-level programming language.<br />
#!/usr/bin/env python3<br />
print('Arch is the best!')<br />
<br />
<br />
'''QBASIC''' - An interpreter for a variant of the BASIC programming language which is based on QuickBASIC.<br />
PRINT "Arch is the best!"<br />
<br />
<br />
'''R''' - A language for statistical computing (and much more!).<br />
archIsBest <- function() { cat("Arch is the best!\n") }<br />
archIsBest()<br />
<br />
<br />
'''Ruby''' - A dynamic, reflective, general purpose object-oriented programming language.<br />
#!/usr/bin/ruby -w<br />
puts 'Arch is the best!'<br />
<br />
<br />
'''Scala''' - A multi paradigm language that runs on the JVM<br />
object ArchIsBest extends App {<br />
println("Arch is the best!")<br />
} <br />
<br />
<br />
<br />
'''Scheme''' - A dialect of Lisp.<br />
(display "Arch is the best!\n")<br />
or in XunDu style<br />
#!/usr/bin/guile1.8 -s<br />
!#<br />
(define 节 or)<br />
(define 哀 #t)<br />
(define (xi) (display "Arch is the best!\n"))<br />
(节 (xi) 哀 (wen) 顺 (le) 变 (jian) )<br />
<br />
<br />
'''Seed''' - A library and interpreter, dynamically bridging the WebKit JavaScriptCore engine, with the GNOME platform.<br />
#!/usr/bin/env seed<br />
print ('Arch is the best');<br />
<br />
<br />
'''Shoes''' - A Ruby version using Shoes for a GUI<br />
Shoes.app :width => 135, :height => 30 do <br />
para "Arch is the Best!"<br />
end<br />
<br />
<br />
'''SQL''' - Structured Query Language, the query language for relational databases<br />
SELECT 'Arch is the best!';<br />
SELECT 'Arch is the best!' from dual; -- for Oracle DB<br />
<br />
<br />
'''Standard ML''' - A general-purpose, modular, functional programming language with compile-time type checking and type inference.<br />
print "Arch is the best!\n"<br />
<br />
<br />
'''Tcl/Tk''' - A scripting language that is commonly used for rapid prototyping, scripted applications, GUIs and testing.<br />
#!/usr/bin/env tclsh<br />
puts "Arch is the best!"<br />
<br />
<br />
'''Vala''' - "Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C"<br />
void main(string[] args) {<br />
stdout.printf("\nArch is the best!\n\n");<br />
}<br />
<br />
<br />
''' Wiring (Arduino)''' - Built on Processing, the open source programming language developed at the Massachusetts Institute of Technology.<br />
void setup() <br />
{<br />
Serial.begin(9600); <br />
}<br />
void loop() <br />
{ <br />
Serial.print("Arch is the best!");<br />
}<br />
<br />
<br />
''' X11 ''' - X11 is an architecture independent system for display of graphical user interfaces.<br />
#include <stdio.h><br />
#include <stdlib.h><br />
#include <string.h><br />
<br />
#include <X11/Xlib.h><br />
<br />
int main()<br />
{<br />
Display *d;<br />
Window w;<br />
XEvent e;<br />
int s;<br />
<br />
if (!(d = XOpenDisplay(NULL))) {<br />
fprintf(stderr, "Couldn't open display, but Arch is the best!\n");<br />
exit(1);<br />
}<br />
<br />
s = DefaultScreen(d);<br />
w = XCreateSimpleWindow(d, RootWindow(d,s), 0, 0, 110, 20, 0, <br />
0, WhitePixel(d,s));<br />
XSelectInput(d, w, ExposureMask | KeyPressMask);<br />
XMapWindow(d,w);<br />
<br />
while (1) {<br />
XNextEvent(d, &e);<br />
if (e.type == Expose) {<br />
XDrawString(d, w, DefaultGC(d, s), 5, 15, "Arch is the best!", 17);<br />
}<br />
}<br />
<br />
XCloseDisplay(d);<br />
return 0;<br />
}<br />
<br />
==Translations==<br />
<br />
'''Ancient Chinese'''<br />
阿祺,盡善矣。<br />
<br />
'''Ancient Greek'''<br />
Ἡ Ἀψίς ἄριστη ἐστί!<br />
<br />
'''Arabic'''<br />
ارتش هو الأفضل<br />
<br />
'''Australian'''<br />
Arch is fair dinkum, mate!<br />
<br />
'''Bahasa Indonesia'''<br />
Arch terbaik!<br />
<br />
'''Basque'''<br />
Arch onena da!<br />
<br />
'''Belarusian'''<br />
Арч - самы лепшы!<br />
<br />
'''Bengali'''<br />
আর্চ সবচেয়ে ভালো!<br />
<br />
'''British'''<br />
Arch is simply spiffing.<br />
<br />
'''Bulgarian'''<br />
Арч е най-добрият!<br />
<br />
'''Catalan'''<br />
Arch és el millor!<br />
<br />
'''Chinese (Simplified)'''<br />
Arch 最棒了!<br />
<br />
'''Chinese (Traditional)'''<br />
狀哉我大 Arch!<br />
<br />
'''Chinese (Taobao Style - 淘宝体)'''<br />
Arch,好评哦,亲!<br />
<br />
'''Czech'''<br />
Arch je nejlepší!<br />
<br />
'''Croatian'''<br />
Arch je najbolji!<br />
<br />
'''Danish'''<br />
Arch er bedst!<br />
<br />
'''Dutch'''<br />
Arch is de beste!<br />
<br />
'''Esperanto'''<br />
Arch plejbonas!<br />
<br />
'''Estonian'''<br />
Arch on parim!<br />
<br />
'''Fikonspråket'''<br />
Firch Arkon fir äkon fist bäkon<br />
<br />
'''Filipino'''<br />
Mabuhay ang Arch!<br />
<br />
'''Finnish'''<br />
Arch on paras!<br />
<br />
'''French'''<br />
Arch est le meilleur!<br />
<br />
'''Galician'''<br />
Arch é o mellor!<br />
<br />
'''German'''<br />
Arch ist das Beste!<br />
<br />
'''Greek (Modern)'''<br />
Το Αρτς είναι το καλύτερο!<br />
<br />
'''Haitian Creole'''<br />
Arch se meye bagay!<br />
<br />
'''Hantec'''<br />
Arch je nejbetélnější!<br />
<br />
'''Hebrew'''<br />
ארצ' זה הכי אחי!<br />
<br />
'''Hindi'''<br />
आर्च सर्वोत्तम है ।<br />
<br />
'''Hungarian'''<br />
Az Arch a legjobb!<br />
<br />
'''Irish'''<br />
Arch é is fearr!<br />
<br />
'''Italian'''<br />
Arch è il migliore!<br />
<br />
'''Japanese'''<br />
Archが一番ですよ!<br />
<br />
'''Kazakh'''<br />
Арч - ең жақсы!<br />
<br />
'''Klingon'''<br />
Arch'pu'ta' 'a'<br />
<br />
'''Latin'''<br />
Arch optimus est!<br />
<br />
'''Latvian'''<br />
Arch ir labākais!<br />
<br />
'''Lithuanian'''<br />
Arch yra geriausias!<br />
<br />
'''Lojban'''<br />
la .artc. xagrai<br />
<br />
'''Malayalam'''<br />
ആർച് ആണ് ഏറ്റവും നല്ലത് <br />
<br />
'''Marathi'''<br />
आर्च सगळ्यात भारी आहे!<br />
<br />
'''Norwegian'''<br />
Arch er best!<br />
<br />
'''Old English'''<br />
Arch biþ betst!<br />
<br />
'''Persian'''<br />
طاق بزرگ است<br />
<br />
'''Pig Latin'''<br />
Archway isway ethay estbay!<br />
<br />
'''Polish'''<br />
Arch jest najlepszy!<br />
<br />
'''Portuguese'''<br />
Arch é o melhor!<br />
<br />
'''Québécois'''<br />
Arch est le plus meilleure du monde!<br />
<br />
'''Romanian'''<br />
Аrch e cel mai bun!<br />
<br />
'''Russian'''<br />
Арч — лучший!<br />
<br />
'''Serbian'''<br />
Arch je najbolji!<br />
<br />
'''Singaporean'''<br />
Arch the best lah!<br />
<br />
'''Slovenian'''<br />
Arch je najboljši!<br />
<br />
'''Spanish (Standard)'''<br />
¡Arch es el mejor!<br />
<br />
'''Spanish (Argentina)'''<br />
Arch es una mazza!!<br />
<br />
'''Spanish (Chile)'''<br />
Arch es bacán<br />
<br />
'''Spanish (Chile, low class)'''<br />
Arch es la raja<br />
<br />
'''Spanish (Chile, marginal)'''<br />
This are writted in IPA because standard spanish not have those sounds<br />
ˈæɹʃ ɛːʰ tɜ.rˈiː.u.lɛ la rˈa.χa ʃʊ.ɹʊ<br />
<br />
'''Spanish (Uruguay)'''<br />
Arch la rompe!<br />
<br />
'''Swedish'''<br />
Arch är bäst!<br />
<br />
'''Turkish'''<br />
Arch en iyisidir!<br />
<br />
'''Tamil'''<br />
ஆர்ச்சே சிறந்தது!<br />
<br />
'''Telugu'''<br />
ఆర్చ్ ఉత్తమమైనది!<br />
<br />
'''Ukrainian'''<br />
Arch є найкращий!<br />
<br />
'''Urdu'''<br />
آرچ سب سے بہتر ہے! <br />
<br />
'''Vietnamese'''<br />
Arch là tốt nhất!<br />
<br />
'''Welsh (Cymraeg)'''<br />
<br />
Emphasis on Arch:<br />
Arch sydd yr orau un!<br />
Arch sydd y gorau un!<br />
<br />
Emphasis on being the best (one):<br />
Yr orau un yw Arch!<br />
Y gorau un yw Arch!<br />
<br />
== Encodings ==<br />
<br />
'''ASCII Banner'''<br />
_ _ _ _ _ _ _ <br />
/\ | | (_) | | | | | | | | | |<br />
/ \ _ __ ___| |__ _ ___ | |_| |__ ___ | |__ ___ ___| |_| |<br />
/ /\ \ | '__/ __| '_ \ | / __| | __| '_ \ / _ \ | '_ \ / _ \/ __| __| |<br />
/ ____ \| | | (__| | | | | \__ \ | |_| | | | __/ | |_) | __/\__ \ |_|_|<br />
/_/ \_\_| \___|_| |_| |_|___/ \__|_| |_|\___| |_.__/ \___||___/\__(_)<br />
<br />
<br />
'''Base64'''<br />
QXJjaCBpcyB0aGUgYmVzdCEK<br />
<br />
'''Binary ASCII'''<br />
0100000101110010011000110110100000100000011010010111001100100000011101000110100001100101001000000110001001100101011100110111010000100001<br />
<br />
'''Braille'''<br />
⠁⠗⠉⠓⠀⠊⠎⠀⠮⠀⠃⠑⠎⠞⠲<br />
<br />
'''Desrever (Reversed)'''<br />
!tseb eht si hcrA<br />
<br />
'''h4x0r'''<br />
Arch 15 7h3 b357!<br />
<br />
'''Hexadecimal ASCII'''<br />
4172636820697320746865206265737421<br />
<br />
'''md5sum'''<br />
2d9092e089d77a8e23f47ba3dfe77027<br />
<br />
'''Morse Code'''<br />
.- .-. -.-. .... .. ... - .... . -... . ... -<br />
<br />
'''ROT13'''<br />
Nepu vf gur orfg!<br />
<br />
'''Upside Down'''<br />
¡ʇsǝq ǝɥʇ s! ɥɔɹ∀<br />
<br />
'''URL Encoded'''<br />
Arch%20is%20the%20best!</div>Qguvhttps://wiki.archlinux.org/index.php?title=Arch_is_the_best&diff=325174Arch is the best2014-07-15T02:08:41Z<p>Qguv: add ASCII Banner to /* Encodings */</p>
<hr />
<div>[[Category:About Arch]]<br />
[[Category:Programming language]]<br />
[[ja:Arch_is_the_best]]<br />
The '''Arch is the best''' project is a very sophisticated and exquisite, ego-boosting and mind-blowing (albeit perhaps a bit over-engineered) project which gives proof of Arch's superiority.<br />
<br />
== History ==<br />
<br />
The visionary project was originally devised in April 2008 by long time Arch community member [https://bbs.archlinux.org/profile.php?id=2529 lucke] as a simple shell script which provided irrefutable proof that "Arch is the best". It was announced to the world with a [https://bbs.archlinux.org/viewtopic.php?id=47306 forum post], thus illuminating other people's minds, who immediately started porting it to multiple different languages, both programming and verbal, so that every human being on the planet could fully appreciate and benefit from this revolutionary discovery.<br />
<br />
== Installation ==<br />
<br />
A sample PKGBUILD called {{AUR|archbest-mod1}} has been uploaded to [[AUR]].<br />
<br />
== The code ==<br />
<br />
The "Arch is the best" project is ported to many programming languages.<br />
<br />
'''Ada''' - A systems critical programming language.<br />
with Ada.Text_IO;<br />
use Ada.Text_IO;<br />
procedure ArchIsTheBest is<br />
begin<br />
Put_Line("Arch is the best!");<br />
end HelloWorld;<br />
<br />
'''APL''' - A Programming Language.<br />
'Arch is the best!'<br />
<br />
'''ATS''' - A functional programming language that uses dependent types to improve programs' reliability.<br />
implement main () = println! "Arch is the best!"<br />
<br />
'''Awk''' - A data-driven programming language designed for processing text-based data.<br />
BEGIN {<br />
print "Arch is the best!"<br />
}<br />
<br />
'''Befunge''' - Believed to be the first two-dimensional, ASCII-based, general-purpose (in the sense of "you could plausibly write Hunt the Wumpus in it") programming language.<br />
<v"Arch is the best!"0<br />
<,_@#:<br />
<br />
'''Boo''' - A stablished object oriented statically typed programming language for .NET and Mono with a python inspired syntax and a special focus on metaprogramming through language and compiler extensibility features such as macros and custom compilation pipelines.<br />
print "Arch is the best!"<br />
<br />
'''Bourne shell''' - The original program, should be compatible with any shell.<br />
#!/bin/sh<br />
echo "Arch is the best!"<br />
<br />
<br />
'''Bourne shell (Alternate)''' - Handy for piping the output to your favourite IRC/email/IM client. Should work with any shell.<br />
#!/bin/sh<br />
yes Arch is the best!<br />
<br />
<br />
'''Bourne shell (Dynamically updated)'''<br />
<pre style='overflow:auto'><br />
#!/bin/bash<br />
wget http://wiki.archlinux.org/index.php/Arch_is_the_best -qO-| sed -n ':b;n;s/id="Translations"//;Tb;:d;n;s/id="See_also"//;t;p;bd'|sed '/<i>.*<\/i>/d;s/<[^>]*>//g'|sed 'N;s/\n/: /;N;N;s/\n//g'<br />
</pre><br />
<br />
<br />
'''brainfuck''' - Doesn't the language name explain it?<br />
++>++++++>+++++<+[>[->+<]<->++++++++++<]>>.<[-]>[-<++>]<br />
<----------------.---------------.+++++.<+++[-<++++++++++>]<.<br />
>>+.++++++++++.<<.>>+.------------.---.<<.>>---.<br />
+++.++++++++++++++.+.<<+.[-]++++++++++.<br />
<br />
<br />
'''C''' - Note the three space indenting used in this project, much like that used by other superior beings.<br />
#include <stdio.h><br />
#include <stdlib.h><br />
int main(void) <br />
{<br />
puts("Arch is the best!");<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
<br />
'''C#''' - Intended to be a simple, modern, general-purpose, object-oriented programming language.<br />
using System;<br />
public class ArchIsTheBest<br />
{<br />
static public void Main ()<br />
{<br />
Console.WriteLine ("Arch is the best!");<br />
}<br />
}<br />
<br />
<br />
'''C++''' - Arch == Linux++<br />
#include <iostream><br />
#include <cstdlib><br />
int main ()<br />
{<br />
std::cout << "Arch is the best!" << std::endl;<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
<br />
'''COBOL''' - A simple, lightweight programming language.<br />
IDENTIFICATION DIVISION.<br />
PROGRAM-ID. TheBest.<br />
<br />
PROCEDURE DIVISION.<br />
DISPLAY "Arch is the best!".<br />
STOP RUN.<br />
<br />
<br />
'''CoffeeScript''' - A programming language that transcompiles to JavaScript.<br />
alert 'Arch is the best!'<br />
<br />
<br />
'''Clojure''' - A Lisp dialect that runs on the JVM.<br />
(def translations {"english" "Arch is the best!",<br />
"german" "Arch ist das Beste!",<br />
"australian" "Arch is fair dinkum, mate!",<br />
"h4x0r" "arhc 51 7he be57!",<br />
"spanish" "¡Arch es el mejor!"})<br />
<br />
(defn read-choice []<br />
(println "\nAvailable languages: ")<br />
(doall (map #(println (key %)) translations))<br />
(print "Enter language or Ctrl-c: ") (flush)<br />
(translations (read-line) :badinput))<br />
<br />
(defn arch-is-the-best []<br />
(loop [choice (read-choice)]<br />
(case choice<br />
:badinput (do (print "\nBad input!\n")<br />
(recur (read-choice)))<br />
(do (print "\n" choice "\n")<br />
(recur (read-choice))))))<br />
or<br />
(def translations {"english" "Arch is the best!",<br />
"german" "Arch ist das Beste!",<br />
"australian" "Arch is fair dinkum, mate!",<br />
"h4x0r" "arhc 51 7he be57!",<br />
"spanish" "¡Arch es el mejor!"<br />
"street" "Arch iz da shizzle ma nizzle"})<br />
(while 1<br />
(println "\nPick a language:\n" (map #(key %) translations) "\n language: ")<br />
(println (translations (read-line) "Not a valid language")))<br />
<br />
<br />
or<br />
(prn "Arch is the best!")<br />
<br />
'''Common Lisp''' - Tested on SBCL, feel free to add more of the translations.<br />
#!/usr/bin/sbcl --script<br />
(defparameter *best-list* '((English "Arch is the best!")<br />
(Chinese "Arch, 她出类拔萃!")<br />
(German "Arch ist das Beste!")<br />
(Greek "Το Arch είναι το καλύτερο!")))<br />
(defun aitb ()<br />
(format t "Available languages: ~{~{~@(~a~)~*~}~^, ~}.~%" *best-list*)<br />
(loop for input = (progn (format t "~&Input the desired language, (or 'quit'): ~%")<br />
(force-output)<br />
(read-line))<br />
if (string-equal input "quit")<br />
do (loop-finish)<br />
else<br />
do (let ((language-def<br />
(assoc input *best-list*<br />
:key (lambda (lang) (symbol-name lang))<br />
:test #'string-equal)))<br />
(if language-def<br />
(format t "~&~A~%" (second language-def))<br />
(format t "~&Invalid language.~%"))))<br />
(format t "~&May the Arch be with you!~%"))<br />
(aitb)<br />
<br />
<br />
'''Common Lisp (Alternate)''' - Should run on any implementation (Clisp, Allegro, SBCL...)<br />
(princ "Arch is the best!")<br />
<br />
<br />
'''D''' - A C-style language. The benefits of hindsight, with modern conveniences.<br />
import std.stdio : writeln;<br />
void main()<br />
{<br />
writeln("Arch is the best");<br />
}<br />
<br />
<br />
'''Dart''' - Google's javascript killer<br />
main(){<br />
print('Arch is the best');<br />
}<br />
<br />
'''Emacs Lisp''' - A dialect of the Lisp programming language used by the GNU Emacs and XEmacs text editors <br />
(message "Arch is the best!")<br />
<br />
<br />
'''Erlang''' - A concurrent, garbage-collected programming language and runtime system.<br />
-module(arch).<br />
-export([is_the_best/0]).<br />
is_the_best() -> io:fwrite("Arch is the best!\n").<br />
<br />
Or using message passing between processes<br />
<br />
-module(arch).<br />
-export([ultimate_question/0,the_answer/0]).<br />
the_answer() -><br />
receive<br />
{Client,who_is_the_best} -><br />
Client ! {self(),"Arch is the best!"};<br />
{Client,_} -><br />
Client ! {self(),"Taco Taco Taco!"}<br />
end,<br />
the_answer().<br />
ultimate_question() -><br />
Pid = spawn(arch,the_answer,[]),<br />
Pid ! {self(),who_is_the_best},<br />
receive<br />
{Pid,Response} -> io:format("~s~n",[Response])<br />
end.<br />
<br />
'''F#''' - A strongly-typed, functional-first programming language for writing simple code to solve complex problems.<br />
printfn "Arch is the best!"<br />
<br />
'''Factor''' - High-level stack-based language.<br />
"Arch is the best" print<br />
<br />
'''FIM++''' - A wordy, imperative, dynamically-typed, and interpreted language that can use Java classes.<br />
Dear Princess Celestia: Letter About Arch Linux.<br />
Today I learned:<br />
I wrote "Arch is the best!".<br />
Your faithful student, Twilight Sparkle<br />
<br />
'''Forth''' - Stack-based language.<br />
." Arch is the best" cr -- kiss way<br />
<br />
'''Fortran95'''<br />
program arch<br />
print *,"Arch is the best!"<br />
end program arch<br />
<br />
'''Genie''' - A new programming language, that allows for a more modern programming style while being able to effortlessly create and use GObjects natively. <br />
init<br />
print "Arch is the best"<br />
<br />
<br />
'''Gjs''' - A Javascript binding for GNOME. It's mainly based on Spidermonkey javascript engine and the GObject introspection framework.<br />
#!/usr/bin/env gjs<br />
print ('Arch is the best');<br />
<br />
<br />
'''Go''' - A language created by Google that's a love child between C, C++ and Python.<br />
package main<br />
<br />
import "fmt"<br />
<br />
func main() {<br />
fmt.Println("Arch is the best!")<br />
}<br />
<br />
<br />
'''Haskell''' - The language where IO is easy and unproblematic.<br />
main = putStrLn "Arch is the best!"<br />
<br />
<br />
'''HTML''' - A markup language used to create and define web pages and their content.<br />
<pre><br />
<!DOCTYPE html><br />
<html lang='en'><br />
<head><br />
<title>Arch is the best!</title><br />
</head><br />
<body><br />
<p>Arch is the best!</p><br />
</body><br />
</html><br />
</pre><br />
<br />
'''Io'''<br />
"Arch is the best!" println<br />
<br />
<br />
'''Java''' - An extremely portable language, this will run on pretty much anything, it might even run on your toaster!<br />
public class ArchIsTheBest {<br />
public static void main(String[] args) {<br />
System.out.println("Arch is the best!");<br />
}<br />
}<br />
<br />
<br />
'''JavaScript''' - Also known as ECMAScript, a prototype-based object-oriented scripting language. <br />
console.log('Arch is the best!');<br />
<br />
<br />
'''JavaScript (in a web browser)'''<br />
alert('Arch is the best!');<br />
<br />
<br />
'''LilyPond''' - A powerful music engraving program with an intuitive LaTeX-like input language.<br />
\version "2.12.3"<br />
\include "english.ly"<br />
\header { title = "Arch is the best!" }<br />
\score<br />
{<br />
<<<br />
\relative c' { c4 e g c \bar "||" }<br />
\addlyrics { Arch is the best! }<br />
>><br />
}<br />
<br />
<br />
'''LOLCODE''' - Why not?<br />
HAI<br />
CAN HAS STDIO?<br />
VISIBLE "ARCH IS TEH PWNZ LOL!"<br />
KTHXBYE<br />
<br />
<br />
'''Lua''' - A lightweight, extensible programming language.<br />
print "Arch is the best!"<br />
<br />
'''Morpho''' - Morpho is a multi-paradigm programming language that supports procedural, object-oriented and functional programming. <br />
<br />
writeln("Arch is the best!");<br />
<br />
<br />
'''Nasm(x86_64) (or yasm)''' - Notice that the string is in the .text section, which feels superior<br />
<br />
;nasm -f elf64 arch.asm<br />
;ld -o arch arch.o<br />
;./arch<br />
<br />
section .text<br />
global _start<br />
_start:<br />
mov edx,len<br />
mov ecx,msg<br />
mov ebx,1<br />
mov eax,4<br />
int 0x80<br />
xor ebx,ebx<br />
mov eax,1<br />
int 0x80<br />
msg: db "Arch is the best!",10<br />
len equ $-msg<br />
<br />
<br />
'''Nimrod''' - Portable lightweight programming language.<br />
echo "Arch is the best!"<br />
<br />
<br />
'''Objective-C''' - A reflective, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.<br />
NSLog(@"Arch is the best!");<br />
<br />
<br />
'''OCaml''' - The main implementation of the Caml programming language.<br />
print_endline "Arch is the best!"<br />
<br />
'''Octave''' - High-level interpreted language, primarily intended for numerical computations.<br />
printf("Arch is the best!\n")<br />
<br />
'''Ook!''' - brainfuck, translated to Orangutan<br />
Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook! Ook? Ook. Ook? Ook! Ook? Ook! Ook! Ook. Ook? Ook. Ook. Ook? Ook. Ook? Ook! Ook? Ook. Ook! Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook. Ook! Ook? Ook! Ook! Ook? Ook! Ook. Ook? Ook! Ook? Ook! Ook! Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook! Ook! Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook? Ook! Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook! Ook. Ook! Ook? Ook! Ook! Ook? Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook.<br />
<br />
'''Perl''' - A high-level, general-purpose, interpreted, dynamic programming language.<br />
#!/usr/bin/perl<br />
print "Arch is the best!\n";<br />
<br />
<br />
'''PHP''' - A general-purpose scripting language.<br />
<?php<br />
echo "Arch is the best!\n";<br />
?> <br />
<br />
<br />
'''Pixilang''' - Make me pixels.<br />
print("Arch is the best!",0,0,#1897D1)<br />
frame<br />
<br />
<br />
'''Portable GNU assembler''' - as -o arch.o arch.s && ld -o arch -O0 arch.o<br />
<br />
.section .data<br />
archIsBest: <br />
.ascii "Arch is the best!\n"<br />
archIsBest_len:<br />
.long . - archIsBest<br />
.section .text<br />
.globl _start<br />
_start:<br />
xorl %ebx, %ebx<br />
movl $4, %eax <br />
xorl %ebx, %ebx<br />
incl %ebx <br />
leal archIsBest, %ecx<br />
movl archIsBest_len, %edx <br />
int $0x80 <br />
xorl %eax, %eax<br />
incl %eax<br />
xorl %ebx, %ebx <br />
int $0x80<br />
<br />
<br />
'''Processing''' - An open source programming language and IDE built for the electronic arts and visual design.<br />
println("Arch is the best!");<br />
<br />
<br />
'''Prolog''' - A general purpose logic programming language associated with artificial intelligence and computational linguistics.<br />
format('Arch is the best~n',[]).<br />
<br />
<br />
'''Python''' - A general-purpose high-level programming language.<br />
#!/usr/bin/env python3<br />
print('Arch is the best!')<br />
<br />
<br />
'''QBASIC''' - An interpreter for a variant of the BASIC programming language which is based on QuickBASIC.<br />
PRINT "Arch is the best!"<br />
<br />
<br />
'''R''' - A language for statistical computing (and much more!).<br />
archIsBest <- function() { cat("Arch is the best!\n") }<br />
archIsBest()<br />
<br />
<br />
'''Ruby''' - A dynamic, reflective, general purpose object-oriented programming language.<br />
#!/usr/bin/ruby -w<br />
puts 'Arch is the best!'<br />
<br />
<br />
'''Scala''' - A multi paradigm language that runs on the JVM<br />
object ArchIsBest extends App {<br />
println("Arch is the best!")<br />
} <br />
<br />
<br />
<br />
'''Scheme''' - A dialect of Lisp.<br />
(display "Arch is the best!\n")<br />
or in XunDu style<br />
#!/usr/bin/guile1.8 -s<br />
!#<br />
(define 节 or)<br />
(define 哀 #t)<br />
(define (xi) (display "Arch is the best!\n"))<br />
(节 (xi) 哀 (wen) 顺 (le) 变 (jian) )<br />
<br />
<br />
'''Seed''' - A library and interpreter, dynamically bridging the WebKit JavaScriptCore engine, with the GNOME platform.<br />
#!/usr/bin/env seed<br />
print ('Arch is the best');<br />
<br />
<br />
'''Shoes''' - A Ruby version using Shoes for a GUI<br />
Shoes.app :width => 135, :height => 30 do <br />
para "Arch is the Best!"<br />
end<br />
<br />
<br />
'''SQL''' - Structured Query Language, the query language for relational databases<br />
SELECT 'Arch is the best!';<br />
SELECT 'Arch is the best!' from dual; -- for Oracle DB<br />
<br />
<br />
'''Standard ML''' - A general-purpose, modular, functional programming language with compile-time type checking and type inference.<br />
print "Arch is the best!\n"<br />
<br />
<br />
'''Tcl/Tk''' - A scripting language that is commonly used for rapid prototyping, scripted applications, GUIs and testing.<br />
#!/usr/bin/env tclsh<br />
puts "Arch is the best!"<br />
<br />
<br />
'''Vala''' - "Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C"<br />
void main(string[] args) {<br />
stdout.printf("\nArch is the best!\n\n");<br />
}<br />
<br />
<br />
''' Wiring (Arduino)''' - Built on Processing, the open source programming language developed at the Massachusetts Institute of Technology.<br />
void setup() <br />
{<br />
Serial.begin(9600); <br />
}<br />
void loop() <br />
{ <br />
Serial.print("Arch is the best!");<br />
}<br />
<br />
<br />
''' X11 ''' - X11 is an architecture independent system for display of graphical user interfaces.<br />
#include <stdio.h><br />
#include <stdlib.h><br />
#include <string.h><br />
<br />
#include <X11/Xlib.h><br />
<br />
int main()<br />
{<br />
Display *d;<br />
Window w;<br />
XEvent e;<br />
int s;<br />
<br />
if (!(d = XOpenDisplay(NULL))) {<br />
fprintf(stderr, "Couldn't open display, but Arch is the best!\n");<br />
exit(1);<br />
}<br />
<br />
s = DefaultScreen(d);<br />
w = XCreateSimpleWindow(d, RootWindow(d,s), 0, 0, 110, 20, 0, <br />
0, WhitePixel(d,s));<br />
XSelectInput(d, w, ExposureMask | KeyPressMask);<br />
XMapWindow(d,w);<br />
<br />
while (1) {<br />
XNextEvent(d, &e);<br />
if (e.type == Expose) {<br />
XDrawString(d, w, DefaultGC(d, s), 5, 15, "Arch is the best!", 17);<br />
}<br />
}<br />
<br />
XCloseDisplay(d);<br />
return 0;<br />
}<br />
<br />
==Translations==<br />
<br />
'''Ancient Chinese'''<br />
阿祺,盡善矣。<br />
<br />
'''Ancient Greek'''<br />
Ἡ Ἀψίς ἄριστη ἐστί!<br />
<br />
'''Arabic'''<br />
ارتش هو الأفضل<br />
<br />
'''Australian'''<br />
Arch is fair dinkum, mate!<br />
<br />
'''Bahasa Indonesia'''<br />
Arch terbaik!<br />
<br />
'''Basque'''<br />
Arch onena da!<br />
<br />
'''Belarusian'''<br />
Арч - самы лепшы!<br />
<br />
'''Bengali'''<br />
আর্চ সবচেয়ে ভালো!<br />
<br />
'''British'''<br />
Arch is simply spiffing.<br />
<br />
'''Bulgarian'''<br />
Арч е най-добрият!<br />
<br />
'''Catalan'''<br />
Arch és el millor!<br />
<br />
'''Chinese (Simplified)'''<br />
Arch 最棒了!<br />
<br />
'''Chinese (Tranditional)'''<br />
狀哉我大 Arch!<br />
<br />
'''Chinese (Taobao Style - 淘宝体)'''<br />
Arch,好评哦,亲!<br />
<br />
'''Czech'''<br />
Arch je nejlepší!<br />
<br />
'''Croatian'''<br />
Arch je najbolji!<br />
<br />
'''Danish'''<br />
Arch er bedst!<br />
<br />
'''Dutch'''<br />
Arch is de beste!<br />
<br />
'''Esperanto'''<br />
Arch plejbonas!<br />
<br />
'''Estonian'''<br />
Arch on parim!<br />
<br />
'''Fikonspråket'''<br />
Firch Arkon fir äkon fist bäkon<br />
<br />
'''Filipino'''<br />
Mabuhay ang Arch!<br />
<br />
'''Finnish'''<br />
Arch on paras!<br />
<br />
'''French'''<br />
Arch est le meilleur!<br />
<br />
'''Galician'''<br />
Arch é o mellor!<br />
<br />
'''German'''<br />
Arch ist das Beste!<br />
<br />
'''Greek (Modern)'''<br />
Το Αρτς είναι το καλύτερο!<br />
<br />
'''Haitian Creole'''<br />
Arch se meye bagay!<br />
<br />
'''Hantec'''<br />
Arch je nejbetélnější!<br />
<br />
'''Hebrew'''<br />
ארצ' זה הכי אחי!<br />
<br />
'''Hindi'''<br />
आर्च सर्वोत्तम है ।<br />
<br />
'''Hungarian'''<br />
Az Arch a legjobb!<br />
<br />
'''Irish'''<br />
Arch é is fearr!<br />
<br />
'''Italian'''<br />
Arch è il migliore!<br />
<br />
'''Japanese'''<br />
Archが一番ですよ!<br />
<br />
'''Kazakh'''<br />
Арч - ең жақсы!<br />
<br />
'''Klingon'''<br />
Arch'pu'ta' 'a'<br />
<br />
'''Latin'''<br />
Arch optimus est!<br />
<br />
'''Latvian'''<br />
Arch ir labākais!<br />
<br />
'''Lithuanian'''<br />
Arch yra geriausias!<br />
<br />
'''Lojban'''<br />
la .artc. xagrai<br />
<br />
'''Malayalam'''<br />
ആർച് ആണ് ഏറ്റവും നല്ലത് <br />
<br />
'''Marathi'''<br />
आर्च सगळ्यात भारी आहे!<br />
<br />
'''Norwegian'''<br />
Arch er best!<br />
<br />
'''Old English'''<br />
Arch biþ betst!<br />
<br />
'''Persian'''<br />
طاق بزرگ است<br />
<br />
'''Pig Latin'''<br />
Archway isway ethay estbay!<br />
<br />
'''Polish'''<br />
Arch jest najlepszy!<br />
<br />
'''Portuguese'''<br />
Arch é o melhor!<br />
<br />
'''Québécois'''<br />
Arch est le plus meilleure du monde!<br />
<br />
'''Romanian'''<br />
Аrch e cel mai bun!<br />
<br />
'''Russian'''<br />
Арч — лучший!<br />
<br />
'''Serbian'''<br />
Arch je najbolji!<br />
<br />
'''Singaporean'''<br />
Arch the best lah!<br />
<br />
'''Slovenian'''<br />
Arch je najboljši!<br />
<br />
'''Spanish (Standard)'''<br />
¡Arch es el mejor!<br />
<br />
'''Spanish (Argentina)'''<br />
Arch es una mazza!!<br />
<br />
'''Spanish (Chile)'''<br />
Arch es bacán<br />
<br />
'''Spanish (Chile, low class)'''<br />
Arch es la raja<br />
<br />
'''Spanish (Chile, marginal)'''<br />
This are writted in IPA because standard spanish not have those sounds<br />
ˈæɹʃ ɛːʰ tɜ.rˈiː.u.lɛ la rˈa.χa ʃʊ.ɹʊ<br />
<br />
'''Spanish (Uruguay)'''<br />
Arch la rompe!<br />
<br />
'''Swedish'''<br />
Arch är bäst!<br />
<br />
'''Turkish'''<br />
Arch en iyisidir!<br />
<br />
'''Tamil'''<br />
ஆர்ச்சே சிறந்தது!<br />
<br />
'''Telugu'''<br />
ఆర్చ్ ఉత్తమమైనది!<br />
<br />
'''Ukrainian'''<br />
Arch є найкращий!<br />
<br />
'''Urdu'''<br />
آرچ سب سے بہتر ہے! <br />
<br />
'''Vietnamese'''<br />
Arch là tốt nhất!<br />
<br />
'''Welsh (Cymraeg)'''<br />
<br />
Emphasis on Arch:<br />
Arch sydd yr orau un!<br />
Arch sydd y gorau un!<br />
<br />
Emphasis on being the best (one):<br />
Yr orau un yw Arch!<br />
Y gorau un yw Arch!<br />
<br />
== Encodings ==<br />
<br />
'''ASCII Banner'''<br />
_ _ _ _ _ _ _ <br />
/\ | | (_) | | | | | | | | | |<br />
/ \ _ __ ___| |__ _ ___ | |_| |__ ___ | |__ ___ ___| |_| |<br />
/ /\ \ | '__/ __| '_ \ | / __| | __| '_ \ / _ \ | '_ \ / _ \/ __| __| |<br />
/ ____ \| | | (__| | | | | \__ \ | |_| | | | __/ | |_) | __/\__ \ |_|_|<br />
/_/ \_\_| \___|_| |_| |_|___/ \__|_| |_|\___| |_.__/ \___||___/\__(_)<br />
<br />
<br />
'''Base64'''<br />
QXJjaCBpcyB0aGUgYmVzdCEK<br />
<br />
'''Binary ASCII'''<br />
0100000101110010011000110110100000100000011010010111001100100000011101000110100001100101001000000110001001100101011100110111010000100001<br />
<br />
'''Braille'''<br />
⠁⠗⠉⠓⠀⠊⠎⠀⠮⠀⠃⠑⠎⠞⠲<br />
<br />
'''Desrever (Reversed)'''<br />
!tseb eht si hcrA<br />
<br />
'''h4x0r'''<br />
Arch 15 7h3 b357!<br />
<br />
'''Hexadecimal ASCII'''<br />
4172636820697320746865206265737421<br />
<br />
'''md5sum'''<br />
2d9092e089d77a8e23f47ba3dfe77027<br />
<br />
'''Morse Code'''<br />
.- .-. -.-. .... .. ... - .... . -... . ... -<br />
<br />
'''ROT13'''<br />
Nepu vf gur orfg!<br />
<br />
'''Upside Down'''<br />
¡ʇsǝq ǝɥʇ s! ɥɔɹ∀<br />
<br />
'''URL Encoded'''<br />
Arch%20is%20the%20best!</div>Qguvhttps://wiki.archlinux.org/index.php?title=Network_configuration&diff=313096Network configuration2014-05-03T00:23:02Z<p>Qguv: Undo revision 313095: did not know about %i-replacement in config files</p>
<hr />
<div>[[Category:Networking]]<br />
[[Category:Getting and installing Arch]]<br />
[[cs:Configuring Network]]<br />
[[el:Configuring Network]]<br />
[[es:Configuring Network]]<br />
[[fr:Connexions reseau]]<br />
[[it:Configuring Network]]<br />
[[ja:Network Configuration]]<br />
[[nl:Configuring Network]]<br />
[[pt:Configuring Network]]<br />
[[ro:Configurare retea]]<br />
[[ru:Configuring Network]]<br />
[[sk:Configuring Network]]<br />
[[tr:Ağ_Yapılandırması]]<br />
[[zh-CN:Network Configuration]]<br />
[[zh-TW:Network Configuration]]<br />
{{Related articles start}}<br />
{{Related|Jumbo Frames}}<br />
{{Related|Firewalls}}<br />
{{Related|Wireless network configuration}}<br />
{{Related|List of applications#Network managers}}<br />
{{Related articles end}}<br />
<br />
This page explains how to set up a '''wired''' connection to a network. If you need to set up '''wireless''' networking see the [[Wireless network configuration]] page.<br />
<br />
== Check the connection ==<br />
<br />
{{Note|If you receive an error like {{ic|ping: icmp open socket: Operation not permitted}} when executing ping, try to re-install the {{ic|iputils}} package.}} <br />
<br />
Many times, the basic installation procedure has created a working network configuration. To check if this is so, use the following command:<br />
<br />
{{Note|The {{ic|-c 3}} option calls it three times. See {{ic|man ping}} for more information.}}<br />
<br />
{{hc|$ ping -c 3 www.google.com|<nowiki><br />
PING www.l.google.com (74.125.224.146) 56(84) bytes of data.<br />
64 bytes from 74.125.224.146: icmp_req=1 ttl=50 time=437 ms<br />
64 bytes from 74.125.224.146: icmp_req=2 ttl=50 time=385 ms<br />
64 bytes from 74.125.224.146: icmp_req=3 ttl=50 time=298 ms<br />
<br />
--- www.l.google.com ping statistics ---<br />
3 packets transmitted, 3 received, 0% packet loss, time 1999ms<br />
rtt min/avg/max/mdev = 298.107/373.642/437.202/57.415 ms<br />
</nowiki>}}<br />
<br />
If it works, then you may only wish to personalize your settings from the options below.<br />
<br />
If the previous command complains about unknown hosts, it means that your machine was unable to resolve this domain name. It might be related to your service provider or your router/gateway. You can try pinging a static IP address to prove that your machine has access to the Internet.<br />
<br />
{{hc|$ ping -c 3 8.8.8.8|<nowiki><br />
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.<br />
64 bytes from 8.8.8.8: icmp_req=1 ttl=53 time=52.9 ms<br />
64 bytes from 8.8.8.8: icmp_req=2 ttl=53 time=72.5 ms<br />
64 bytes from 8.8.8.8: icmp_req=3 ttl=53 time=70.6 ms<br />
<br />
--- 8.8.8.8 ping statistics ---<br />
3 packets transmitted, 3 received, 0% packet loss, time 2002ms<br />
rtt min/avg/max/mdev = 52.975/65.375/72.543/8.803 ms<br />
</nowiki>}}<br />
<br />
{{Note|{{ic|8.8.8.8}} is a static address that is easy to remember. It is the address of Google's primary DNS server, therefore it can be considered reliable, and is generally not blocked by content filtering systems and proxies.}}<br />
<br />
If you are able to ping {{ic|8.8.8.8}} but not {{ic|www.google.com}}, check your DNS configuration. See [[resolv.conf]] for details.<br />
<br />
== Set the hostname ==<br />
<br />
A [[Wikipedia:Hostname|hostname]] is a unique name created to identify a machine on a network: it is configured in {{ic|/etc/hostname}}. The file can contain the system's domain name, if any. To set the hostname, do:<br />
<br />
# hostnamectl set-hostname ''myhostname''<br />
<br />
This will put {{ic|''myhostname''}} into {{ic|/etc/hostname}}.<br />
<br />
See {{ic|man 5 hostname}} and {{ic|man 1 hostnamectl}} for details.<br />
<br />
Add the same hostname to {{ic|/etc/hosts}}:<br />
<br />
{{hc|/etc/hosts|<br />
#<ip-address> <hostname.domain.org> <hostname><br />
127.0.0.1 localhost.localdomain localhost ''myhostname''<br />
::1 localhost.localdomain localhost<br />
}}<br />
<br />
To set the hostname temporarily (until a reboot), use ''hostname'' from {{Pkg|inetutils}}:<br />
<br />
# hostname ''myhostname''<br />
<br />
== Device Driver ==<br />
<br />
=== Check the driver status ===<br />
<br />
[[udev]] should detect your network interface card ([[Wikipedia:Network_interface_controller|NIC]]) and automatically load the necessary module at start up. Check the "Ethernet controller" entry (or similar) from the {{ic|lspci -v}} output. It should tell you which kernel module contains the driver for your network device. For example:<br />
<br />
{{hc|$ lspci -v|<br />
02:00.0 Ethernet controller: Attansic Technology Corp. L1 Gigabit Ethernet Adapter (rev b0)<br />
...<br />
Kernel driver in use: atl1<br />
Kernel modules: atl1<br />
}}<br />
<br />
Next, check that the driver was loaded via {{ic|dmesg <nowiki>|</nowiki> grep ''module_name''}}. For example:<br />
<br />
$ dmesg | grep atl1<br />
...<br />
atl1 0000:02:00.0: eth0 link is up 100 Mbps full duplex<br />
<br />
Skip the next section if the driver was loaded successfully. Otherwise, you will need to know which module is needed for your particular model.<br />
<br />
=== Load the device module ===<br />
<br />
Google for the right module/driver for the chipset. Some common modules are {{ic|8139too}} for cards with a Realtek chipset, or {{ic|sis900}} for cards with a SiS chipset. Once you know which module to use, try to [[Kernel modules#Manual module handling|load it manually]]. If you get an error saying that the module was not found, it's possible that the driver is not included in Arch kernel. You may search the [[AUR]] for the module name.<br />
<br />
If udev is not detecting and loading the proper module automatically during bootup, see [[Kernel modules#Loading]].<br />
<br />
== Network Interfaces ==<br />
<br />
=== Device names ===<br />
<br />
For computers with multiple NICs, it is important to have fixed device name. Many configuration problems are caused by interface name changing.<br />
<br />
[[udev]] is responsible for which device gets which name. Systemd v197 introduced [http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames Predictable Network Interface Names], which automatically assigns static names to network devices. Interfaces are now prefixed with {{ic|en}} (ethernet), {{ic|wl}} (WLAN), or {{ic|ww}} (WWAN) followed by an automatically generated identifier, creating an entry such as {{ic|enp0s25}}. <br />
<br />
This behavior may be disabled by adding {{ic|1=net.ifnames=0}} in your kernel command line.<br />
<br />
{{Tip|You can run {{ic|ip link}} or {{ic|ls /sys/class/net}} to list all available interfaces.}}<br />
<br />
{{Note|When changing the interface naming scheme, do not forget to update all network-related configuration files and custom systemd unit files to reflect the change. Specifically, if you have [[netctl#Basic method|netctl static profiles]] enabled, run {{ic|netctl reenable ''profile''}} to update the generated service file.}}<br />
<br />
==== Change device name ====<br />
<br />
You can change the device name by defining the name manually with an udev-rule. For example:<br />
<br />
{{hc|/etc/udev/rules.d/10-network.rules|<nowiki><br />
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="aa:bb:cc:dd:ee:ff", NAME="net1"<br />
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="ff:ee:dd:cc:bb:aa", NAME="net0"<br />
</nowiki>}}<br />
<br />
A couple of things to note:<br />
<br />
* To get the MAC address of each card, use this command: {{ic|cat /sys/class/net/''device_name''/address}}<br />
* Make sure to use the lower-case hex values in your udev rules. It doesn't like upper-case.<br />
<br />
If the network card has a dynamic MAC, you can use DEVPATH, for example:<br />
<br />
{{hc|/etc/udev/rules.d/10-network.rules|<nowiki><br />
SUBSYSTEM=="net", DEVPATH=="/devices/platform/wemac.*", NAME="int"<br />
</nowiki>}}<br />
<br />
{{Note|When choosing the static names '''it should be avoided to use names in the format of "eth''X''" and "wlan''X''"''', because this may lead to race conditions between the kernel and udev during boot. Instead, it is better to use interface names that are not used by the kernel as default, e.g.: {{ic|net0}}, {{ic|net1}}, {{ic|wifi0}}, {{ic|wifi1}}. For further details please see the [http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames systemd] documentation.}}<br />
<br />
=== Set device MTU and queue Length ===<br />
<br />
You can change the device MTU and queue length by defining manually with an udev-rule. For example:<br />
<br />
{{hc|/etc/udev/rules.d/10-network.rules|<nowiki><br />
ACTION=="add", SUBSYSTEM=="net", KERNEL=="wl*", ATTR{mtu}="1480", ATTR{tx_queue_len}="2000"<br />
</nowiki>}}<br />
<br />
=== Get current device names ===<br />
<br />
Current NIC names can be found via sysfs<br />
<br />
{{hc|$ ls /sys/class/net|<br />
lo eth0 eth1 firewire0<br />
}}<br />
<br />
=== Enabling and disabling network interfaces ===<br />
<br />
You can activate or deactivate network interfaces using:<br />
<br />
# ip link set eth0 up<br />
# ip link set eth0 down<br />
<br />
To check the result:<br />
<br />
{{hc|$ ip link show dev eth0|<br />
2: eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP mode DEFAULT qlen 1000<br />
...<br />
}}<br />
<br />
== Configure the IP address ==<br />
<br />
You have two options: a dynamically assigned address using [[Wikipedia:Dynamic Host Configuration Protocol|DHCP]], or an unchanging "static" address.<br />
<br />
=== Dynamic IP address ===<br />
<br />
==== dhcpcd ====<br />
The easiest is to use [[dhcpcd]], which is included in the {{Grp|base}} group. Either use the provided service file {{ic|dhcpcd@.service}}, passing the interface name as an argument, or start it manually by running {{ic|dhcpcd ''interface''}}.<br />
<br />
=== Static IP address ===<br />
<br />
There are various reasons why you may wish to assign static IP addresses on your network. For instance, one may gain a certain degree of predictability with unchanging addresses, or you may not have a DHCP server available.<br />
<br />
{{Note|If you share your Internet connection from a Windows machine without a router, be sure to use static IP addresses on both computers to avoid LAN problems.}}<br />
<br />
You need:<br />
<br />
* Static IP address<br />
* [[Wikipedia:Subnetwork|Subnet mask]]<br />
* [[Wikipedia:Broadcast_address|Broadcast address]]<br />
* [[Wikipedia:Default_gateway|Gateway]]'s IP address<br />
<br />
If you are running a private network, it is safe to use IP addresses in 192.168.*.* for your IP addresses, with a subnet mask of 255.255.255.0 and a broadcast address of 192.168.*.255. The gateway is usually 192.168.*.1 or 192.168.*.254.<br />
<br />
{{Tip|You may need to manually set the DNS servers, see [[resolv.conf]] for details.}}<br />
<br />
==== Manual assignment ====<br />
<br />
You can assign a static IP address in the console:<br />
<br />
# ip addr add ''IP_address''/''subnet_mask'' broadcast ''broadcast_address'' dev ''interface''<br />
<br />
For example:<br />
<br />
# ip addr add 192.168.1.2/24 broadcast 192.168.1.255 dev eth0<br />
<br />
{{Note|The subnet mask was specified using [[Wikipedia:CIDR_notation|CIDR notation]].}}<br />
<br />
For more options, see {{ic|man ip}}.<br />
<br />
Add your gateway IP address like so:<br />
<br />
# ip route add default via ''default_gateway''<br />
<br />
For example:<br />
<br />
# ip route add default via 192.168.1.1<br />
<br />
If you the get the error "No such process", it means you have to run {{ic|ip link set dev eth0 up}} as root.<br />
<br />
==== Persistent configuration on boot using systemd and udev rules ====<br />
<br />
First create a configuration file for the [[systemd]] service, replace {{ic|''interface''}} with the proper network interface name:<br />
<br />
{{hc|/etc/conf.d/network@''interface''|<nowiki><br />
address=192.168.0.15<br />
netmask=24<br />
broadcast=192.168.0.255<br />
gateway=192.168.0.1<br />
</nowiki>}}<br />
<br />
Create a systemd unit file:<br />
<br />
{{hc|/etc/systemd/system/network@.service|<nowiki><br />
[Unit]<br />
Description=Network connectivity (%i)<br />
Wants=network.target<br />
Before=network.target<br />
BindsTo=sys-subsystem-net-devices-%i.device<br />
After=sys-subsystem-net-devices-%i.device<br />
<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
EnvironmentFile=/etc/conf.d/network@%i<br />
<br />
ExecStart=/usr/bin/ip link set dev %i up<br />
ExecStart=/usr/bin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev %i<br />
ExecStart=/usr/bin/sh -c 'test -n ${gateway} && /usr/bin/ip route add default via ${gateway}'<br />
<br />
ExecStop=/usr/bin/ip addr flush dev %i<br />
ExecStop=/usr/bin/ip link set dev %i down<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
Enable the unit and start it, passing the name of the interface:<br />
<br />
# systemctl enable network@''interface''.service<br />
# systemctl start network@''interface''.service<br />
<br />
==== Calculating addresses ====<br />
<br />
You can use {{ic|ipcalc}} provided by the {{Pkg|ipcalc}} package to calculate IP broadcast, network, netmask, and host ranges for more advanced configurations. For example, I use ethernet over firewire to connect a windows machine to arch. For security and network organization, I placed them on their own network and configured the netmask and broadcast so that they are the only 2 machines on it. To figure out the netmask and broadcast addresses for this, I used ipcalc, providing it with the IP of the arch firewire nic 10.66.66.1, and specifying ipcalc should create a network of only 2 hosts.<br />
<br />
{{hc|$ ipcalc -nb 10.66.66.1 -s 1|<nowiki><br />
Address: 10.66.66.1<br />
<br />
Netmask: 255.255.255.252 = 30<br />
Network: 10.66.66.0/30<br />
HostMin: 10.66.66.1<br />
HostMax: 10.66.66.2<br />
Broadcast: 10.66.66.3<br />
Hosts/Net: 2 Class A, Private Internet<br />
</nowiki>}}<br />
<br />
=== systemd-networkd ===<br />
<br />
With [[systemd]] version >= 209, it is possible to manage network connections with [[systemd-networkd]], which is intended to easily set up network on containers and virtual machines. It can manage both dynamic and static IP addresses.<br />
<br />
== Load configuration ==<br />
<br />
To test your settings either reboot the computer or reload the relevant systemd services. Then try pinging your gateway, DNS server, ISP provider and other Internet sites, in that order, to detect any connection problems along the way, as in this example:<br />
<br />
$ ping -c 3 www.google.com<br />
<br />
== Additional settings ==<br />
<br />
=== ifplugd for laptops ===<br />
<br />
{{Tip|[[dhcpcd]] provides the same feature out of the box.}}<br />
<br />
{{Pkg|ifplugd}} in [[official repositories]] is a daemon which will automatically configure your Ethernet device when a cable is plugged in and automatically unconfigure it if the cable is pulled. This is useful on laptops with onboard network adapters, since it will only configure the interface when a cable is really connected. Another use is when you just need to restart the network but do not want to restart the computer or do it from the shell.<br />
<br />
By default it is configured to work for the {{ic|eth0}} device. This and other settings like delays can be configured in {{ic|/etc/ifplugd/ifplugd.conf}}.<br />
<br />
{{Note|[[Netctl]] package includes {{ic|netctl-ifplugd@.service}}, otherwise you can use {{ic|ifplugd@.service}} from {{Pkg|ifplugd}} package. Use for example {{ic|systemctl enable ifplugd@eth0.service}}.}}<br />
<br />
=== Bonding or LAG ===<br />
<br />
See [[netctl#Bonding]].<br />
<br />
=== IP address aliasing ===<br />
<br />
{{Expansion|Manual method using [[Core utilities#ip|ip]] should be added; then move current example using ''netctl'' into [[netctl]].}}<br />
<br />
IP aliasing is the process of adding more than one IP address to a network interface. With this, one node on a network can have multiple connections to a network, each serving a different purpose. Typical uses are virtual hosting of Web and FTP servers, or reorganizing servers without having to update any other machines (this is especially useful for nameservers).<br />
<br />
==== Example ====<br />
<br />
You will need {{Pkg|netctl}} from the [[official repositories]].<br />
<br />
Prepare the configuration:<br />
<br />
{{hc|/etc/netctl/mynetwork|<nowiki><br />
Connection='ethernet'<br />
Description='Five different addresses on the same NIC.'<br />
Interface='eth0'<br />
IP='static'<br />
Address=('192.168.1.10' '192.168.178.11' '192.168.1.12' '192.168.1.13' '192.168.1.14' '192.168.1.15')<br />
Gateway='192.168.1.1'<br />
DNS=('192.168.1.1')<br />
</nowiki>}}<br />
<br />
Then simply execute: <br />
<br />
$ netctl start mynetwork<br />
<br />
=== Change MAC/hardware address ===<br />
<br />
See [[MAC Address Spoofing]].<br />
<br />
=== Internet Sharing ===<br />
<br />
See [[Internet sharing]].<br />
<br />
=== Router Configuration ===<br />
<br />
See [[Router]].<br />
<br />
=== Local network hostname resolution ===<br />
<br />
The pre-requisite is to [[#Set the hostname]] after which hostname resolution works on the local system itself {{hc|$ ping hostname|<br />
PING hostname <nowiki>(192.168.1.2) 56(84) bytes of data.<br />
64 bytes from hostname (192.168.1.2): icmp_seq=1 ttl=64 time=0.043 ms</nowiki>}}<br />
To enable other machines to address the host by name, either a manual configuration of the respective {{ic|/etc/hosts}} files or a service to propagate/resolve the name is required. <br />
<br />
When setting up a DNS server such as [[BIND]] or [[Unbound]] is overkill, manually editing your {{ic|/etc/hosts}} is too cumbersome, or when you want more flexibility with dynamic leaving and joining of hosts to the network, it is possible to handle hostname resolution on your local network using zero-configuration networking. There are two options available:<br />
<br />
*[[Samba]] provides hostname resolution via Microsoft's '''NetBIOS'''. It only requires installation of {{Pkg|samba}} and enabling of the {{ic|nmbd.service}} service. Computers running Windows, OS X, or Linux with {{ic|nmbd}} running, will be able to find your machine.<br />
<br />
*[[Avahi]] provides hostname resolution via '''zeroconf''', also known as Avahi or Bonjour. It requires slightly more complex configuration than Samba: see [[Avahi#Hostname resolution]] for details. Computers running OS X, or Linux with an Avahi daemon running, will be able to find your machine. Windows does not have an built-in Avahi client or daemon.<br />
<br />
=== Promiscuous mode ===<br />
<br />
Toggling [https://en.wikipedia.org/wiki/Promiscuous_mode promiscuous mode] will make a (wireless) NIC forward all traffic it receives to the OS for further processing. This is opposite to "normal mode" where a NIC will drop frames it is not intended to receive. It is most often used for advanced network troubleshooting and [https://en.wikipedia.org/wiki/Packet_sniffing packet sniffing].<br />
<br />
{{hc|/etc/systemd/system/promiscuous@.service|<nowiki><br />
[Unit]<br />
Description=Set %i interface in promiscuous mode<br />
After=network.target<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/ip link set dev %i promisc on<br />
RemainAfterExit=yes<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
If you want to enable promiscuous mode on interface {{ic|eth0}} run:<br />
<br />
# systemctl enable promiscuous@eth0.service<br />
<br />
== Troubleshooting ==<br />
<br />
=== Swapping computers on the cable modem ===<br />
<br />
Some cable ISPs (videotron for example) have the cable modem configured to recognize only one client PC, by the MAC address of its network interface. Once the cable modem has learned the MAC address of the first PC or equipment that talks to it, it will not respond to another MAC address in any way. Thus if you swap one PC for another (or for a router), the new PC (or router) will not work with the cable modem, because the new PC (or router) has a MAC address different from the old one. To reset the cable modem so that it will recognise the new PC, you must power the cable modem off and on again. Once the cable modem has rebooted and gone fully online again (indicator lights settled down), reboot the newly connected PC so that it makes a DHCP request, or manually make it request a new DHCP lease.<br />
<br />
If this method does not work, you will need to clone the MAC address of the original machine. See also [[Configuring Network#Change MAC/hardware address|Change MAC/hardware address]].<br />
<br />
=== The TCP window scaling problem ===<br />
<br />
TCP packets contain a "window" value in their headers indicating how much data the other host may send in return. This value is represented with only 16 bits, hence the window size is at most 64Kb. TCP packets are cached for a while (they have to be reordered), and as memory is (or used to be) limited, one host could easily run out of it.<br />
<br />
Back in 1992, as more and more memory became available, [http://www.faqs.org/rfcs/rfc1323.html RFC 1323] was written to improve the situation: Window Scaling. The "window" value, provided in all packets, will be modified by a Scale Factor defined once, at the very beginning of the connection.<br />
<br />
That 8-bit Scale Factor allows the Window to be up to 32 times higher than the initial 64Kb.<br />
<br />
It appears that some broken routers and firewalls on the Internet are rewriting the Scale Factor to 0 which causes misunderstandings between hosts.<br />
<br />
The Linux kernel 2.6.17 introduced a new calculation scheme generating higher Scale Factors, virtually making the aftermaths of the broken routers and firewalls more visible.<br />
<br />
The resulting connection is at best very slow or broken.<br />
<br />
==== How to diagnose the problem ====<br />
<br />
First of all, let's make it clear: this problem is odd. In some cases, you will not be able to use TCP connections (HTTP, FTP, ...) at all and in others, you will be able to communicate with some hosts (very few).<br />
<br />
When you have this problem, the {{ic|dmesg}}'s output is OK, logs are clean and {{ic|ip addr}} will report normal status... and actually everything appears normal.<br />
<br />
If you cannot browse any website, but you can ping some random hosts, chances are great that you're experiencing this problem: ping uses ICMP and is not affected by TCP problems.<br />
<br />
You can try to use Wireshark. You might see successful UDP and ICMP communications but unsuccessful TCP communications (only to foreign hosts).<br />
<br />
==== How to fix it (The bad way) ====<br />
<br />
To fix it the bad way, you can change the tcp_rmem value, on which Scale Factor calculation is based. Although it should work for most hosts, it is not guaranteed, especially for very distant ones.<br />
<br />
# echo "4096 87380 174760" > /proc/sys/net/ipv4/tcp_rmem<br />
<br />
==== How to fix it (The good way) ====<br />
<br />
Simply disable Window Scaling. Since Window Scaling is a nice TCP feature, it may be uncomfortable to disable it, especially if you cannot fix the broken router. There are several ways to disable Window Scaling, and it seems that the most bulletproof way (which will work with most kernels) is to add the following line to {{ic|/etc/sysctl.d/99-disable_window_scaling.conf}} (see also [[sysctl]])<br />
<br />
net.ipv4.tcp_window_scaling = 0<br />
<br />
==== How to fix it (The best way) ====<br />
<br />
This problem is caused by broken routers/firewalls, so let's change them. Some users have reported that the broken router was their very own DSL router.<br />
<br />
==== More about it ====<br />
<br />
This section is based on the LWN article [http://lwn.net/Articles/92727/ TCP window scaling and broken routers] and a Kernel Trap article: [http://kerneltrap.org/node/6723 Window Scaling on the Internet].<br />
<br />
There are also several relevant threads on the LKML.<br />
<br />
=== Realtek no link / WOL problem ===<br />
<br />
Users with Realtek 8168 8169 8101 8111(C) based NICs (cards / and on-board) may notice a problem where the NIC seems to be disabled on boot and has no Link light. This can usually be found on a dual boot system where Windows is also installed. It seems that using the offical Realtek drivers (dated anything after May 2007) under Windows is the cause. These newer drivers disable the Wake-On-LAN feature by disabling the NIC at Windows shutdown time, where it will remain disabled until the next time Windows boots. You will be able to notice if this problem is affecting you if the Link light remains off until Windows boots up; during Windows shutdown the Link light will switch off. Normal operation should be that the link light is always on as long as the system is on, even during POST. This problem will also affect other operative systems without newer drivers (eg. Live CDs). Here are a few fixes for this problem:<br />
<br />
==== Method 1 - Enable the NIC directly in Linux ====<br />
<br />
Get the ethernet NIC name from the output of<br />
<br />
$ ip a<br />
<br />
Bring up the device as root using the NIC name:<br />
<br />
# ip link set dev <NIC_name> up<br />
<br />
For ex, if <NIC_name> is enp7s0<br />
<br />
# ip link set dev enp7s0 up<br />
<br />
If it worked and the card is powered on, you should see {{ic|state UP}} for the given interface in the output of {{ic|ip link}}.<br />
<br />
==== Method 2 - Rollback/change Windows driver ====<br />
<br />
You can roll back your Windows NIC driver to the Microsoft provided one (if available), or roll back/install an official Realtek driver pre-dating May 2007 (may be on the CD that came with your hardware).<br />
<br />
==== Method 3 - Enable WOL in Windows driver ====<br />
<br />
Probably the best and the fastest fix is to change this setting in the Windows driver. This way it should be fixed system-wide and not only under Arch (eg. live CDs, other operative systems). In Windows, under Device Manager, find your Realtek network adapter and double-click it. Under the Advanced tab, change "Wake-on-LAN after shutdown" to Enable.<br />
<br />
In Windows XP (example)<br />
Right click my computer<br />
--> Hardware tab<br />
--> Device Manager<br />
--> Network Adapters<br />
--> "double click" Realtek ...<br />
--> Advanced tab<br />
--> Wake-On-Lan After Shutdown<br />
--> Enable<br />
<br />
{{Note|Newer Realtek Windows drivers (tested with ''Realtek 8111/8169 LAN Driver v5.708.1030.2008'', dated 2009/01/22, available from GIGABYTE) may refer to this option slightly differently, like ''Shutdown Wake-On-LAN --> Enable''. It seems that switching it to {{ic|Disable}} has no effect (you will notice the Link light still turns off upon Windows shutdown). One rather dirty workaround is to boot to Windows and just reset the system (perform an ungraceful restart/shutdown) thus not giving the Windows driver a chance to disable LAN. The Link light will remain on and the LAN adapter will remain accessible after POST - that is until you boot back to Windows and shut it down properly again.}}<br />
<br />
==== Method 4 - Newer Realtek Linux driver ====<br />
<br />
Any newer driver for these Realtek cards can be found for Linux on the realtek site. (untested but believed to also solve the problem).<br />
<br />
==== Method 5 - Enable ''LAN Boot ROM'' in BIOS/CMOS ====<br />
<br />
It appears that setting ''Integrated Peripherals --> Onboard LAN Boot ROM --> Enabled'' in BIOS/CMOS reactivates the Realtek LAN chip on system boot-up, despite the Windows driver disabling it on OS shutdown.<br />
<br />
{{Note|This was tested successfully multiple times with GIGABYTE system board GA-G31M-ES2L with BIOS version F8 released on 2009/02/05. YMMV.}}<br />
<br />
=== No interface with Atheros chipsets ===<br />
<br />
Users of some Atheros ethernet chips are reporting it does not work out-of-the-box (with installation media of February 2014). The working solution for this is to install the package {{AUR|backports-patched}} from AUR.<br />
<br />
=== Broadcom BCM57780 ===<br />
<br />
This Broadcom chipset sometimes does not behave well unless you specify the order of the modules to be loaded. The modules are {{ic|broadcom}} and {{ic|tg3}}, the former needing to be loaded first.<br />
<br />
These steps should help if your computer has this chipset:<br />
$ lspci | grep Ethernet<br />
02:00.0 Ethernet controller: Broadcom Corporation NetLink BCM57780 Gigabit Ethernet PCIe (rev 01)<br />
<br />
If your wired networking is not functioning in some way or another, try unplugging your cable then doing the following (as root):<br />
# modprobe -r tg3<br />
# modprobe broadcom<br />
# modprobe tg3<br />
<br />
Now plug you network cable in. If this solves your problems you can make this permanent by adding {{ic|broadcom}} and {{ic|tg3}} (in this order) to the {{ic|MODULES}} array in {{ic|/etc/mkinitcpio.conf}}:<br />
<br />
MODULES=".. broadcom tg3 .."<br />
<br />
Then rebuild the initramfs:<br />
<br />
# mkinitcpio -p linux<br />
<br />
{{Note|These methods may work for other chipsets, such as BCM57760.}}</div>Qguvhttps://wiki.archlinux.org/index.php?title=Network_configuration&diff=313095Network configuration2014-05-03T00:19:57Z<p>Qguv: fixes forgotten piece of filename in persistent config section</p>
<hr />
<div>[[Category:Networking]]<br />
[[Category:Getting and installing Arch]]<br />
[[cs:Configuring Network]]<br />
[[el:Configuring Network]]<br />
[[es:Configuring Network]]<br />
[[fr:Connexions reseau]]<br />
[[it:Configuring Network]]<br />
[[ja:Network Configuration]]<br />
[[nl:Configuring Network]]<br />
[[pt:Configuring Network]]<br />
[[ro:Configurare retea]]<br />
[[ru:Configuring Network]]<br />
[[sk:Configuring Network]]<br />
[[tr:Ağ_Yapılandırması]]<br />
[[zh-CN:Network Configuration]]<br />
[[zh-TW:Network Configuration]]<br />
{{Related articles start}}<br />
{{Related|Jumbo Frames}}<br />
{{Related|Firewalls}}<br />
{{Related|Wireless network configuration}}<br />
{{Related|List of applications#Network managers}}<br />
{{Related articles end}}<br />
<br />
This page explains how to set up a '''wired''' connection to a network. If you need to set up '''wireless''' networking see the [[Wireless network configuration]] page.<br />
<br />
== Check the connection ==<br />
<br />
{{Note|If you receive an error like {{ic|ping: icmp open socket: Operation not permitted}} when executing ping, try to re-install the {{ic|iputils}} package.}} <br />
<br />
Many times, the basic installation procedure has created a working network configuration. To check if this is so, use the following command:<br />
<br />
{{Note|The {{ic|-c 3}} option calls it three times. See {{ic|man ping}} for more information.}}<br />
<br />
{{hc|$ ping -c 3 www.google.com|<nowiki><br />
PING www.l.google.com (74.125.224.146) 56(84) bytes of data.<br />
64 bytes from 74.125.224.146: icmp_req=1 ttl=50 time=437 ms<br />
64 bytes from 74.125.224.146: icmp_req=2 ttl=50 time=385 ms<br />
64 bytes from 74.125.224.146: icmp_req=3 ttl=50 time=298 ms<br />
<br />
--- www.l.google.com ping statistics ---<br />
3 packets transmitted, 3 received, 0% packet loss, time 1999ms<br />
rtt min/avg/max/mdev = 298.107/373.642/437.202/57.415 ms<br />
</nowiki>}}<br />
<br />
If it works, then you may only wish to personalize your settings from the options below.<br />
<br />
If the previous command complains about unknown hosts, it means that your machine was unable to resolve this domain name. It might be related to your service provider or your router/gateway. You can try pinging a static IP address to prove that your machine has access to the Internet.<br />
<br />
{{hc|$ ping -c 3 8.8.8.8|<nowiki><br />
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.<br />
64 bytes from 8.8.8.8: icmp_req=1 ttl=53 time=52.9 ms<br />
64 bytes from 8.8.8.8: icmp_req=2 ttl=53 time=72.5 ms<br />
64 bytes from 8.8.8.8: icmp_req=3 ttl=53 time=70.6 ms<br />
<br />
--- 8.8.8.8 ping statistics ---<br />
3 packets transmitted, 3 received, 0% packet loss, time 2002ms<br />
rtt min/avg/max/mdev = 52.975/65.375/72.543/8.803 ms<br />
</nowiki>}}<br />
<br />
{{Note|{{ic|8.8.8.8}} is a static address that is easy to remember. It is the address of Google's primary DNS server, therefore it can be considered reliable, and is generally not blocked by content filtering systems and proxies.}}<br />
<br />
If you are able to ping {{ic|8.8.8.8}} but not {{ic|www.google.com}}, check your DNS configuration. See [[resolv.conf]] for details.<br />
<br />
== Set the hostname ==<br />
<br />
A [[Wikipedia:Hostname|hostname]] is a unique name created to identify a machine on a network: it is configured in {{ic|/etc/hostname}}. The file can contain the system's domain name, if any. To set the hostname, do:<br />
<br />
# hostnamectl set-hostname ''myhostname''<br />
<br />
This will put {{ic|''myhostname''}} into {{ic|/etc/hostname}}.<br />
<br />
See {{ic|man 5 hostname}} and {{ic|man 1 hostnamectl}} for details.<br />
<br />
Add the same hostname to {{ic|/etc/hosts}}:<br />
<br />
{{hc|/etc/hosts|<br />
#<ip-address> <hostname.domain.org> <hostname><br />
127.0.0.1 localhost.localdomain localhost ''myhostname''<br />
::1 localhost.localdomain localhost<br />
}}<br />
<br />
To set the hostname temporarily (until a reboot), use ''hostname'' from {{Pkg|inetutils}}:<br />
<br />
# hostname ''myhostname''<br />
<br />
== Device Driver ==<br />
<br />
=== Check the driver status ===<br />
<br />
[[udev]] should detect your network interface card ([[Wikipedia:Network_interface_controller|NIC]]) and automatically load the necessary module at start up. Check the "Ethernet controller" entry (or similar) from the {{ic|lspci -v}} output. It should tell you which kernel module contains the driver for your network device. For example:<br />
<br />
{{hc|$ lspci -v|<br />
02:00.0 Ethernet controller: Attansic Technology Corp. L1 Gigabit Ethernet Adapter (rev b0)<br />
...<br />
Kernel driver in use: atl1<br />
Kernel modules: atl1<br />
}}<br />
<br />
Next, check that the driver was loaded via {{ic|dmesg <nowiki>|</nowiki> grep ''module_name''}}. For example:<br />
<br />
$ dmesg | grep atl1<br />
...<br />
atl1 0000:02:00.0: eth0 link is up 100 Mbps full duplex<br />
<br />
Skip the next section if the driver was loaded successfully. Otherwise, you will need to know which module is needed for your particular model.<br />
<br />
=== Load the device module ===<br />
<br />
Google for the right module/driver for the chipset. Some common modules are {{ic|8139too}} for cards with a Realtek chipset, or {{ic|sis900}} for cards with a SiS chipset. Once you know which module to use, try to [[Kernel modules#Manual module handling|load it manually]]. If you get an error saying that the module was not found, it's possible that the driver is not included in Arch kernel. You may search the [[AUR]] for the module name.<br />
<br />
If udev is not detecting and loading the proper module automatically during bootup, see [[Kernel modules#Loading]].<br />
<br />
== Network Interfaces ==<br />
<br />
=== Device names ===<br />
<br />
For computers with multiple NICs, it is important to have fixed device name. Many configuration problems are caused by interface name changing.<br />
<br />
[[udev]] is responsible for which device gets which name. Systemd v197 introduced [http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames Predictable Network Interface Names], which automatically assigns static names to network devices. Interfaces are now prefixed with {{ic|en}} (ethernet), {{ic|wl}} (WLAN), or {{ic|ww}} (WWAN) followed by an automatically generated identifier, creating an entry such as {{ic|enp0s25}}. <br />
<br />
This behavior may be disabled by adding {{ic|1=net.ifnames=0}} in your kernel command line.<br />
<br />
{{Tip|You can run {{ic|ip link}} or {{ic|ls /sys/class/net}} to list all available interfaces.}}<br />
<br />
{{Note|When changing the interface naming scheme, do not forget to update all network-related configuration files and custom systemd unit files to reflect the change. Specifically, if you have [[netctl#Basic method|netctl static profiles]] enabled, run {{ic|netctl reenable ''profile''}} to update the generated service file.}}<br />
<br />
==== Change device name ====<br />
<br />
You can change the device name by defining the name manually with an udev-rule. For example:<br />
<br />
{{hc|/etc/udev/rules.d/10-network.rules|<nowiki><br />
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="aa:bb:cc:dd:ee:ff", NAME="net1"<br />
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="ff:ee:dd:cc:bb:aa", NAME="net0"<br />
</nowiki>}}<br />
<br />
A couple of things to note:<br />
<br />
* To get the MAC address of each card, use this command: {{ic|cat /sys/class/net/''device_name''/address}}<br />
* Make sure to use the lower-case hex values in your udev rules. It doesn't like upper-case.<br />
<br />
If the network card has a dynamic MAC, you can use DEVPATH, for example:<br />
<br />
{{hc|/etc/udev/rules.d/10-network.rules|<nowiki><br />
SUBSYSTEM=="net", DEVPATH=="/devices/platform/wemac.*", NAME="int"<br />
</nowiki>}}<br />
<br />
{{Note|When choosing the static names '''it should be avoided to use names in the format of "eth''X''" and "wlan''X''"''', because this may lead to race conditions between the kernel and udev during boot. Instead, it is better to use interface names that are not used by the kernel as default, e.g.: {{ic|net0}}, {{ic|net1}}, {{ic|wifi0}}, {{ic|wifi1}}. For further details please see the [http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames systemd] documentation.}}<br />
<br />
=== Set device MTU and queue Length ===<br />
<br />
You can change the device MTU and queue length by defining manually with an udev-rule. For example:<br />
<br />
{{hc|/etc/udev/rules.d/10-network.rules|<nowiki><br />
ACTION=="add", SUBSYSTEM=="net", KERNEL=="wl*", ATTR{mtu}="1480", ATTR{tx_queue_len}="2000"<br />
</nowiki>}}<br />
<br />
=== Get current device names ===<br />
<br />
Current NIC names can be found via sysfs<br />
<br />
{{hc|$ ls /sys/class/net|<br />
lo eth0 eth1 firewire0<br />
}}<br />
<br />
=== Enabling and disabling network interfaces ===<br />
<br />
You can activate or deactivate network interfaces using:<br />
<br />
# ip link set eth0 up<br />
# ip link set eth0 down<br />
<br />
To check the result:<br />
<br />
{{hc|$ ip link show dev eth0|<br />
2: eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP mode DEFAULT qlen 1000<br />
...<br />
}}<br />
<br />
== Configure the IP address ==<br />
<br />
You have two options: a dynamically assigned address using [[Wikipedia:Dynamic Host Configuration Protocol|DHCP]], or an unchanging "static" address.<br />
<br />
=== Dynamic IP address ===<br />
<br />
==== dhcpcd ====<br />
The easiest is to use [[dhcpcd]], which is included in the {{Grp|base}} group. Either use the provided service file {{ic|dhcpcd@.service}}, passing the interface name as an argument, or start it manually by running {{ic|dhcpcd ''interface''}}.<br />
<br />
=== Static IP address ===<br />
<br />
There are various reasons why you may wish to assign static IP addresses on your network. For instance, one may gain a certain degree of predictability with unchanging addresses, or you may not have a DHCP server available.<br />
<br />
{{Note|If you share your Internet connection from a Windows machine without a router, be sure to use static IP addresses on both computers to avoid LAN problems.}}<br />
<br />
You need:<br />
<br />
* Static IP address<br />
* [[Wikipedia:Subnetwork|Subnet mask]]<br />
* [[Wikipedia:Broadcast_address|Broadcast address]]<br />
* [[Wikipedia:Default_gateway|Gateway]]'s IP address<br />
<br />
If you are running a private network, it is safe to use IP addresses in 192.168.*.* for your IP addresses, with a subnet mask of 255.255.255.0 and a broadcast address of 192.168.*.255. The gateway is usually 192.168.*.1 or 192.168.*.254.<br />
<br />
{{Tip|You may need to manually set the DNS servers, see [[resolv.conf]] for details.}}<br />
<br />
==== Manual assignment ====<br />
<br />
You can assign a static IP address in the console:<br />
<br />
# ip addr add ''IP_address''/''subnet_mask'' broadcast ''broadcast_address'' dev ''interface''<br />
<br />
For example:<br />
<br />
# ip addr add 192.168.1.2/24 broadcast 192.168.1.255 dev eth0<br />
<br />
{{Note|The subnet mask was specified using [[Wikipedia:CIDR_notation|CIDR notation]].}}<br />
<br />
For more options, see {{ic|man ip}}.<br />
<br />
Add your gateway IP address like so:<br />
<br />
# ip route add default via ''default_gateway''<br />
<br />
For example:<br />
<br />
# ip route add default via 192.168.1.1<br />
<br />
If you the get the error "No such process", it means you have to run {{ic|ip link set dev eth0 up}} as root.<br />
<br />
==== Persistent configuration on boot using systemd and udev rules ====<br />
<br />
First create a configuration file for the [[systemd]] service, replace {{ic|''interface''}} with the proper network interface name:<br />
<br />
{{hc|/etc/conf.d/network@''interface''|<nowiki><br />
address=192.168.0.15<br />
netmask=24<br />
broadcast=192.168.0.255<br />
gateway=192.168.0.1<br />
</nowiki>}}<br />
<br />
Create a systemd unit file:<br />
<br />
{{hc|/etc/systemd/system/network@''interface''.service|<nowiki><br />
[Unit]<br />
Description=Network connectivity (%i)<br />
Wants=network.target<br />
Before=network.target<br />
BindsTo=sys-subsystem-net-devices-%i.device<br />
After=sys-subsystem-net-devices-%i.device<br />
<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
EnvironmentFile=/etc/conf.d/network@%i<br />
<br />
ExecStart=/usr/bin/ip link set dev %i up<br />
ExecStart=/usr/bin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev %i<br />
ExecStart=/usr/bin/sh -c 'test -n ${gateway} && /usr/bin/ip route add default via ${gateway}'<br />
<br />
ExecStop=/usr/bin/ip addr flush dev %i<br />
ExecStop=/usr/bin/ip link set dev %i down<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
Enable the unit and start it, passing the name of the interface:<br />
<br />
# systemctl enable network@''interface''.service<br />
# systemctl start network@''interface''.service<br />
<br />
==== Calculating addresses ====<br />
<br />
You can use {{ic|ipcalc}} provided by the {{Pkg|ipcalc}} package to calculate IP broadcast, network, netmask, and host ranges for more advanced configurations. For example, I use ethernet over firewire to connect a windows machine to arch. For security and network organization, I placed them on their own network and configured the netmask and broadcast so that they are the only 2 machines on it. To figure out the netmask and broadcast addresses for this, I used ipcalc, providing it with the IP of the arch firewire nic 10.66.66.1, and specifying ipcalc should create a network of only 2 hosts.<br />
<br />
{{hc|$ ipcalc -nb 10.66.66.1 -s 1|<nowiki><br />
Address: 10.66.66.1<br />
<br />
Netmask: 255.255.255.252 = 30<br />
Network: 10.66.66.0/30<br />
HostMin: 10.66.66.1<br />
HostMax: 10.66.66.2<br />
Broadcast: 10.66.66.3<br />
Hosts/Net: 2 Class A, Private Internet<br />
</nowiki>}}<br />
<br />
=== systemd-networkd ===<br />
<br />
With [[systemd]] version >= 209, it is possible to manage network connections with [[systemd-networkd]], which is intended to easily set up network on containers and virtual machines. It can manage both dynamic and static IP addresses.<br />
<br />
== Load configuration ==<br />
<br />
To test your settings either reboot the computer or reload the relevant systemd services. Then try pinging your gateway, DNS server, ISP provider and other Internet sites, in that order, to detect any connection problems along the way, as in this example:<br />
<br />
$ ping -c 3 www.google.com<br />
<br />
== Additional settings ==<br />
<br />
=== ifplugd for laptops ===<br />
<br />
{{Tip|[[dhcpcd]] provides the same feature out of the box.}}<br />
<br />
{{Pkg|ifplugd}} in [[official repositories]] is a daemon which will automatically configure your Ethernet device when a cable is plugged in and automatically unconfigure it if the cable is pulled. This is useful on laptops with onboard network adapters, since it will only configure the interface when a cable is really connected. Another use is when you just need to restart the network but do not want to restart the computer or do it from the shell.<br />
<br />
By default it is configured to work for the {{ic|eth0}} device. This and other settings like delays can be configured in {{ic|/etc/ifplugd/ifplugd.conf}}.<br />
<br />
{{Note|[[Netctl]] package includes {{ic|netctl-ifplugd@.service}}, otherwise you can use {{ic|ifplugd@.service}} from {{Pkg|ifplugd}} package. Use for example {{ic|systemctl enable ifplugd@eth0.service}}.}}<br />
<br />
=== Bonding or LAG ===<br />
<br />
See [[netctl#Bonding]].<br />
<br />
=== IP address aliasing ===<br />
<br />
{{Expansion|Manual method using [[Core utilities#ip|ip]] should be added; then move current example using ''netctl'' into [[netctl]].}}<br />
<br />
IP aliasing is the process of adding more than one IP address to a network interface. With this, one node on a network can have multiple connections to a network, each serving a different purpose. Typical uses are virtual hosting of Web and FTP servers, or reorganizing servers without having to update any other machines (this is especially useful for nameservers).<br />
<br />
==== Example ====<br />
<br />
You will need {{Pkg|netctl}} from the [[official repositories]].<br />
<br />
Prepare the configuration:<br />
<br />
{{hc|/etc/netctl/mynetwork|<nowiki><br />
Connection='ethernet'<br />
Description='Five different addresses on the same NIC.'<br />
Interface='eth0'<br />
IP='static'<br />
Address=('192.168.1.10' '192.168.178.11' '192.168.1.12' '192.168.1.13' '192.168.1.14' '192.168.1.15')<br />
Gateway='192.168.1.1'<br />
DNS=('192.168.1.1')<br />
</nowiki>}}<br />
<br />
Then simply execute: <br />
<br />
$ netctl start mynetwork<br />
<br />
=== Change MAC/hardware address ===<br />
<br />
See [[MAC Address Spoofing]].<br />
<br />
=== Internet Sharing ===<br />
<br />
See [[Internet sharing]].<br />
<br />
=== Router Configuration ===<br />
<br />
See [[Router]].<br />
<br />
=== Local network hostname resolution ===<br />
<br />
The pre-requisite is to [[#Set the hostname]] after which hostname resolution works on the local system itself {{hc|$ ping hostname|<br />
PING hostname <nowiki>(192.168.1.2) 56(84) bytes of data.<br />
64 bytes from hostname (192.168.1.2): icmp_seq=1 ttl=64 time=0.043 ms</nowiki>}}<br />
To enable other machines to address the host by name, either a manual configuration of the respective {{ic|/etc/hosts}} files or a service to propagate/resolve the name is required. <br />
<br />
When setting up a DNS server such as [[BIND]] or [[Unbound]] is overkill, manually editing your {{ic|/etc/hosts}} is too cumbersome, or when you want more flexibility with dynamic leaving and joining of hosts to the network, it is possible to handle hostname resolution on your local network using zero-configuration networking. There are two options available:<br />
<br />
*[[Samba]] provides hostname resolution via Microsoft's '''NetBIOS'''. It only requires installation of {{Pkg|samba}} and enabling of the {{ic|nmbd.service}} service. Computers running Windows, OS X, or Linux with {{ic|nmbd}} running, will be able to find your machine.<br />
<br />
*[[Avahi]] provides hostname resolution via '''zeroconf''', also known as Avahi or Bonjour. It requires slightly more complex configuration than Samba: see [[Avahi#Hostname resolution]] for details. Computers running OS X, or Linux with an Avahi daemon running, will be able to find your machine. Windows does not have an built-in Avahi client or daemon.<br />
<br />
=== Promiscuous mode ===<br />
<br />
Toggling [https://en.wikipedia.org/wiki/Promiscuous_mode promiscuous mode] will make a (wireless) NIC forward all traffic it receives to the OS for further processing. This is opposite to "normal mode" where a NIC will drop frames it is not intended to receive. It is most often used for advanced network troubleshooting and [https://en.wikipedia.org/wiki/Packet_sniffing packet sniffing].<br />
<br />
{{hc|/etc/systemd/system/promiscuous@.service|<nowiki><br />
[Unit]<br />
Description=Set %i interface in promiscuous mode<br />
After=network.target<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/ip link set dev %i promisc on<br />
RemainAfterExit=yes<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
If you want to enable promiscuous mode on interface {{ic|eth0}} run:<br />
<br />
# systemctl enable promiscuous@eth0.service<br />
<br />
== Troubleshooting ==<br />
<br />
=== Swapping computers on the cable modem ===<br />
<br />
Some cable ISPs (videotron for example) have the cable modem configured to recognize only one client PC, by the MAC address of its network interface. Once the cable modem has learned the MAC address of the first PC or equipment that talks to it, it will not respond to another MAC address in any way. Thus if you swap one PC for another (or for a router), the new PC (or router) will not work with the cable modem, because the new PC (or router) has a MAC address different from the old one. To reset the cable modem so that it will recognise the new PC, you must power the cable modem off and on again. Once the cable modem has rebooted and gone fully online again (indicator lights settled down), reboot the newly connected PC so that it makes a DHCP request, or manually make it request a new DHCP lease.<br />
<br />
If this method does not work, you will need to clone the MAC address of the original machine. See also [[Configuring Network#Change MAC/hardware address|Change MAC/hardware address]].<br />
<br />
=== The TCP window scaling problem ===<br />
<br />
TCP packets contain a "window" value in their headers indicating how much data the other host may send in return. This value is represented with only 16 bits, hence the window size is at most 64Kb. TCP packets are cached for a while (they have to be reordered), and as memory is (or used to be) limited, one host could easily run out of it.<br />
<br />
Back in 1992, as more and more memory became available, [http://www.faqs.org/rfcs/rfc1323.html RFC 1323] was written to improve the situation: Window Scaling. The "window" value, provided in all packets, will be modified by a Scale Factor defined once, at the very beginning of the connection.<br />
<br />
That 8-bit Scale Factor allows the Window to be up to 32 times higher than the initial 64Kb.<br />
<br />
It appears that some broken routers and firewalls on the Internet are rewriting the Scale Factor to 0 which causes misunderstandings between hosts.<br />
<br />
The Linux kernel 2.6.17 introduced a new calculation scheme generating higher Scale Factors, virtually making the aftermaths of the broken routers and firewalls more visible.<br />
<br />
The resulting connection is at best very slow or broken.<br />
<br />
==== How to diagnose the problem ====<br />
<br />
First of all, let's make it clear: this problem is odd. In some cases, you will not be able to use TCP connections (HTTP, FTP, ...) at all and in others, you will be able to communicate with some hosts (very few).<br />
<br />
When you have this problem, the {{ic|dmesg}}'s output is OK, logs are clean and {{ic|ip addr}} will report normal status... and actually everything appears normal.<br />
<br />
If you cannot browse any website, but you can ping some random hosts, chances are great that you're experiencing this problem: ping uses ICMP and is not affected by TCP problems.<br />
<br />
You can try to use Wireshark. You might see successful UDP and ICMP communications but unsuccessful TCP communications (only to foreign hosts).<br />
<br />
==== How to fix it (The bad way) ====<br />
<br />
To fix it the bad way, you can change the tcp_rmem value, on which Scale Factor calculation is based. Although it should work for most hosts, it is not guaranteed, especially for very distant ones.<br />
<br />
# echo "4096 87380 174760" > /proc/sys/net/ipv4/tcp_rmem<br />
<br />
==== How to fix it (The good way) ====<br />
<br />
Simply disable Window Scaling. Since Window Scaling is a nice TCP feature, it may be uncomfortable to disable it, especially if you cannot fix the broken router. There are several ways to disable Window Scaling, and it seems that the most bulletproof way (which will work with most kernels) is to add the following line to {{ic|/etc/sysctl.d/99-disable_window_scaling.conf}} (see also [[sysctl]])<br />
<br />
net.ipv4.tcp_window_scaling = 0<br />
<br />
==== How to fix it (The best way) ====<br />
<br />
This problem is caused by broken routers/firewalls, so let's change them. Some users have reported that the broken router was their very own DSL router.<br />
<br />
==== More about it ====<br />
<br />
This section is based on the LWN article [http://lwn.net/Articles/92727/ TCP window scaling and broken routers] and a Kernel Trap article: [http://kerneltrap.org/node/6723 Window Scaling on the Internet].<br />
<br />
There are also several relevant threads on the LKML.<br />
<br />
=== Realtek no link / WOL problem ===<br />
<br />
Users with Realtek 8168 8169 8101 8111(C) based NICs (cards / and on-board) may notice a problem where the NIC seems to be disabled on boot and has no Link light. This can usually be found on a dual boot system where Windows is also installed. It seems that using the offical Realtek drivers (dated anything after May 2007) under Windows is the cause. These newer drivers disable the Wake-On-LAN feature by disabling the NIC at Windows shutdown time, where it will remain disabled until the next time Windows boots. You will be able to notice if this problem is affecting you if the Link light remains off until Windows boots up; during Windows shutdown the Link light will switch off. Normal operation should be that the link light is always on as long as the system is on, even during POST. This problem will also affect other operative systems without newer drivers (eg. Live CDs). Here are a few fixes for this problem:<br />
<br />
==== Method 1 - Enable the NIC directly in Linux ====<br />
<br />
Get the ethernet NIC name from the output of<br />
<br />
$ ip a<br />
<br />
Bring up the device as root using the NIC name:<br />
<br />
# ip link set dev <NIC_name> up<br />
<br />
For ex, if <NIC_name> is enp7s0<br />
<br />
# ip link set dev enp7s0 up<br />
<br />
If it worked and the card is powered on, you should see {{ic|state UP}} for the given interface in the output of {{ic|ip link}}.<br />
<br />
==== Method 2 - Rollback/change Windows driver ====<br />
<br />
You can roll back your Windows NIC driver to the Microsoft provided one (if available), or roll back/install an official Realtek driver pre-dating May 2007 (may be on the CD that came with your hardware).<br />
<br />
==== Method 3 - Enable WOL in Windows driver ====<br />
<br />
Probably the best and the fastest fix is to change this setting in the Windows driver. This way it should be fixed system-wide and not only under Arch (eg. live CDs, other operative systems). In Windows, under Device Manager, find your Realtek network adapter and double-click it. Under the Advanced tab, change "Wake-on-LAN after shutdown" to Enable.<br />
<br />
In Windows XP (example)<br />
Right click my computer<br />
--> Hardware tab<br />
--> Device Manager<br />
--> Network Adapters<br />
--> "double click" Realtek ...<br />
--> Advanced tab<br />
--> Wake-On-Lan After Shutdown<br />
--> Enable<br />
<br />
{{Note|Newer Realtek Windows drivers (tested with ''Realtek 8111/8169 LAN Driver v5.708.1030.2008'', dated 2009/01/22, available from GIGABYTE) may refer to this option slightly differently, like ''Shutdown Wake-On-LAN --> Enable''. It seems that switching it to {{ic|Disable}} has no effect (you will notice the Link light still turns off upon Windows shutdown). One rather dirty workaround is to boot to Windows and just reset the system (perform an ungraceful restart/shutdown) thus not giving the Windows driver a chance to disable LAN. The Link light will remain on and the LAN adapter will remain accessible after POST - that is until you boot back to Windows and shut it down properly again.}}<br />
<br />
==== Method 4 - Newer Realtek Linux driver ====<br />
<br />
Any newer driver for these Realtek cards can be found for Linux on the realtek site. (untested but believed to also solve the problem).<br />
<br />
==== Method 5 - Enable ''LAN Boot ROM'' in BIOS/CMOS ====<br />
<br />
It appears that setting ''Integrated Peripherals --> Onboard LAN Boot ROM --> Enabled'' in BIOS/CMOS reactivates the Realtek LAN chip on system boot-up, despite the Windows driver disabling it on OS shutdown.<br />
<br />
{{Note|This was tested successfully multiple times with GIGABYTE system board GA-G31M-ES2L with BIOS version F8 released on 2009/02/05. YMMV.}}<br />
<br />
=== No interface with Atheros chipsets ===<br />
<br />
Users of some Atheros ethernet chips are reporting it does not work out-of-the-box (with installation media of February 2014). The working solution for this is to install the package {{AUR|backports-patched}} from AUR.<br />
<br />
=== Broadcom BCM57780 ===<br />
<br />
This Broadcom chipset sometimes does not behave well unless you specify the order of the modules to be loaded. The modules are {{ic|broadcom}} and {{ic|tg3}}, the former needing to be loaded first.<br />
<br />
These steps should help if your computer has this chipset:<br />
$ lspci | grep Ethernet<br />
02:00.0 Ethernet controller: Broadcom Corporation NetLink BCM57780 Gigabit Ethernet PCIe (rev 01)<br />
<br />
If your wired networking is not functioning in some way or another, try unplugging your cable then doing the following (as root):<br />
# modprobe -r tg3<br />
# modprobe broadcom<br />
# modprobe tg3<br />
<br />
Now plug you network cable in. If this solves your problems you can make this permanent by adding {{ic|broadcom}} and {{ic|tg3}} (in this order) to the {{ic|MODULES}} array in {{ic|/etc/mkinitcpio.conf}}:<br />
<br />
MODULES=".. broadcom tg3 .."<br />
<br />
Then rebuild the initramfs:<br />
<br />
# mkinitcpio -p linux<br />
<br />
{{Note|These methods may work for other chipsets, such as BCM57760.}}</div>Qguvhttps://wiki.archlinux.org/index.php?title=User:Qguv&diff=271175User:Qguv2013-08-14T15:48:31Z<p>Qguv: Created page with "I run Arch Linux installations on the following systems: * my main machine for programming * a club [http://nascifi.com Craftbukkit server] * my personal testing netbook Natu..."</p>
<hr />
<div>I run Arch Linux installations on the following systems:<br />
* my main machine for programming<br />
* a club [http://nascifi.com Craftbukkit server]<br />
* my personal testing netbook<br />
<br />
Natural Languages:<br />
* English (native)<br />
* German (proficient)<br />
* French (proficient)<br />
* Russian (learning)<br />
* Japanese (learning)<br />
<br />
Programming/Scripting Languages:<br />
* Python<br />
* Lua<br />
* Bash, Zsh...</div>Qguvhttps://wiki.archlinux.org/index.php?title=Talk:Kernel&diff=271170Talk:Kernel2013-08-14T15:37:04Z<p>Qguv: </p>
<hr />
<div>== Style of Address ==<br />
Who is the "I" mentioned in [[Kernels#Patches and Patchsets]]? First-person address doesn't fit the style of this wiki. The form of address should be changed to pose a more neutral style. [[User:Qguv|Qguv]] ([[User talk:Qguv|talk]]) 15:37, 14 August 2013 (UTC)<br />
<br />
== Regression Testing ==<br />
Would it be valuable to add a section or article on doing kernel regression testing using git? Ideally, such an article would cover everything from git clone to the bug-report itself.<br />
<br />
Given that we are a highly up to date release, we do live on the edge of new commits. It seems likely that we are some of the first in the "general" public that encounter regressions and I'd like to encourage people to track down these issues in a decent manner.--[[User:Stefanwilkens|stefanwilkens]] ([[User talk:Stefanwilkens|talk]]) 08:31, 3 October 2012 (UTC)<br />
<br />
:This sounds like a good idea, please go on and try to interlink the new article with the others it's related with. In general, keep [[Help:Style#Hypertext metaphor]] in mind ;) -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 13:56, 3 October 2012 (UTC)<br />
<br />
== Relevence? ==<br />
Whatever [[Kernels#Gensplash.2Ffbsplash|Gensplash]] was, it appears now not to be a patchset, but rather a set of utilities for init. [[http://fbsplash.alanhaggai.org/ Reference page]] Why is it mentioned here? [[User:T1nk3r3r|T1nk3r3r]] ([[User talk:T1nk3r3r|talk]]) 18:39, 23 May 2013 (UTC)</div>Qguvhttps://wiki.archlinux.org/index.php?title=User_talk:Qguv&diff=271169User talk:Qguv2013-08-14T15:36:26Z<p>Qguv: cleared; was on the wrong tab</p>
<hr />
<div></div>Qguvhttps://wiki.archlinux.org/index.php?title=User_talk:Qguv&diff=271168User talk:Qguv2013-08-14T15:35:37Z<p>Qguv: style in Kernels#Patches and Patchsets</p>
<hr />
<div>Who is the "I" mentioned in [[Kernels#Patches and Patchsets]]? First-person address doesn't fit the style of this wiki. The form of address should be changed to pose a more neutral style. [[User:Qguv|Qguv]] ([[User talk:Qguv|talk]]) 15:35, 14 August 2013 (UTC)</div>Qguvhttps://wiki.archlinux.org/index.php?title=Kernel&diff=271167Kernel2013-08-14T15:32:49Z<p>Qguv: /* Patches and Patchsets */ grammar</p>
<hr />
<div>[[Category:Kernel]]<br />
[[cs:Kernel Compilation]]<br />
[[es:Kernel Compilation]]<br />
[[it:Kernels]]<br />
[[ja:Kernels]]<br />
[[zh-CN:Kernels]]<br />
{{Article summary start}}<br />
{{Article summary text|This article discusses kernels in Arch, kernel patches and kernel compilation.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Kernel modules}}<br />
{{Article summary wiki|Kernel Panics}}<br />
{{Article summary wiki|Linux-ck}}<br />
{{Article summary wiki|sysctl}}<br />
{{Article summary end}}<br />
<br />
From [[Wikipedia:Kernel (computing)|Wikipedia]]:<br />
:''the kernel is the main component of most computer operating systems; it is a bridge between applications and the actual data processing done at the hardware level. The kernel's responsibilities include managing the system's resources (the communication between hardware and software components).''<br />
<br />
There are various alternative kernels available for Arch Linux in addition to the mainline Linux kernel. This article lists some of the options available in the repositories with a brief description of each. There is also a description of patches that can be applied to the system's kernel. The article ends with an overview of custom kernel compilation with links to various methods.<br />
<br />
==Precompiled kernels==<br />
===Official packages===<br />
;{{Pkg|linux}}<br />
:The Linux kernel and modules from the [core] repository. Vanilla kernel with [https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/linux two patches applied].<br />
<br />
;{{Pkg|linux-lts}}<br />
:Long term support (LTS) Linux kernel and modules from the [core] repository.<br />
<br />
===AUR packages===<br />
;{{AUR|linux-bfs}}<br />
:Linux kernel and modules with the [[Wikipedia:Brain_Fuck_Scheduler|Brain Fuck Scheduler]] (BFS) - created by Con Kolivas for desktop computers with fewer than 4096 cores, with BFQ I/O scheduler as optional.<br />
<br />
;{{AUR|linux-ck}}<br />
:Linux Kernel built with Con Kolivas' ck1 patchset.<br />
:Additional options which can be toggled on/off in the [[PKGBUILD]] include: BFQ scheduler, nconfig, localmodconfig and use running kernel's config.<br />
:These are patches designed to improve system responsiveness with specific emphasis on the desktop, but suitable to any workload. The ck patches include BFS.<br />
:For further information and installation instructions, please read the [[linux-ck]] main article.<br />
<br />
;{{AUR|linux-eee-ck}}<br />
:The Linux Kernel and modules for the Asus Eee PC 701, built with Con Kolivas' ck1 patchset.<br />
<br />
;{{AUR|linux-fbcondecor}}<br />
:The Linux Kernel and modules with [[Fbsplash|fbcondecor support]]. <br />
<br />
;{{AUR|linux-grsec}}<br />
:The Linux Kernel and modules with [[Grsecurity Patchset]] and PaX patches for increased security. <br />
<br />
;{{AUR|linux-pax}}<br />
:The Linux Kernel and modules with PaX patches for increased security.<br />
<br />
;{{AUR|linux-ice}}<br />
:The Linux Kernel and modules with gentoo-sources patchset and [[TuxOnIce]] support.<br />
<br />
;{{AUR|linux-lqx}}<br />
:[http://liquorix.net Liquorix] is a distro kernel replacement built using a Debian-targeted configuration and the ZEN kernel sources. Designed for desktop, multimedia, and gaming workloads, it is often used as a Debian Linux performance replacement kernel. Damentz, the maintainer of the Liquorix patchset, is a developer for the ZEN patchset as well.<br />
<br />
;{{AUR|linux-pf}}<br />
:Linux kernel and modules with the [http://pf.natalenko.name/ pf-kernel] patchset [-ck patchset (BFS included), TuxOnIce, BFQ], aufs2 and squashfs-lzma.<br />
<br />
;{{AUR|linux-zen}}<br />
:The [http://zen-kernel.org ZEN Kernel] is a the result of a collaborative effort of kernel hackers to provide the best Linux kernel possible for every day systems. Builds of a ZEN kernel are available [https://bbs.archlinux.org/viewtopic.php?id=117157 in this repository].<br />
<br />
;{{AUR|kernel-netbook}}<br />
:Static kernel for netbooks with Intel Atom N270/N280/N450/N550 such as the Eee PC with the add-on of external firmware ({{AUR|broadcom-wl}}) and patchset (BFS + TuxOnIce + BFQ optional) - Only Intel GPU<br />
<br />
;{{AUR|linux-lts-tresor}}<br />
:The stable LTS Linux Kernel and modules with integrated [http://www1.informatik.uni-erlangen.de/tresor TRESOR]<br />
<br />
;{{AUR|linux-git}}<br />
:Linux kernel and modules built using sources from [http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git Linus Torvalds' git repository].<br />
<br />
==Patches and Patchsets==<br />
<br />
There are lots of reasons to patch your kernel, the major ones are for performance or support for non-mainline features such as reiser4 file system support. Other reasons might include fun and to see how it is done and what the improvements are.<br />
<br />
However, it is important to note that the best way to increase the speed of your system is to first tailor your kernel to your system, especially the architecture and processor type. For this reason using pre-packaged versions of custom kernels with generic architecture settings is not recommended or really worth it. A further benefit is that you can reduce the size of your kernel (and therefore build time) by not including support for things you do not have or use. For example, I always start with the stock kernel config when a new kernel version is released and I remove support for things like bluetooth, video4linux, 1000Mbit ethernet, etc. Stuff '''I''' know I won't use '''before''' I build my next kernel! Although this page is not about customizing your kernel config, I would recommend that as a first step to be combined with a patchset later.<br />
<br />
===How to install===<br />
<br />
The installation process of custom kernel packages relies on the Arch Build System (ABS). If you haven't built any custom packages yet you may consult the following articles: [[Arch Build System]] and [[Creating Packages]].<br />
<br />
If you haven't actually patched or customized a kernel before it is not that hard and there are many PKGBUILDs on the forum for individual patchsets. However, I would advise you to start from scratch with a bit of research on the benefits of each patchset rather than jumping on the nearest bandwagon! This way you'll learn much more about what you are doing rather than just choosing a kernel at startup and wondering what it actually does.<br />
<br />
See [[#Compilation]].<br />
<br />
{{note|Don't forget to change the boot options in your bootloader, e.g. grub, to use the new kernel.}}<br />
<br />
===Major patchsets===<br />
<br />
First of all it is important to note that patchsets are developed by a variety of people. Some of these people are actually involved in the production of the linux kernel and others are hobbyists, which may reflect its level of reliability and stability.<br />
<br />
It is also worth noting that some patchsets are built on the back of other patchsets (which may or may not be reflected in the title of the patch). Patchsets (and kernel updates) can be released '''very''' frequently and often it is not worth keeping up with ALL of them so do not go crazy, unless you make it your hobby!<br />
<br />
You can search google for more sets - remember to use quotes {{ic|"-nitro"}} for example otherwise google will deliberately '''NOT''' show the results you want!<br />
<br />
{{note|This section is for '''information only''' - clearly no guarantees of stability or reliability are implied by inclusion on this page.}}<br />
<br />
====[[Linux-ck|-ck]] ====<br />
<br />
These are patches designed to improve system responsiveness with specific emphasis on the desktop, but suitable to any workload. The patches are created and maintained by Con Kolivas, his site is at http://users.on.net/~ckolivas/kernel/. Con maintains a full set but also provides the patches broken down so you can add only those you prefer.<br />
<br />
The -ck patches can be found at http://ck.kolivas.org/patches/3.0/<br />
<br />
====-rt====<br />
<br />
This patchset is maintained by a small group of core developers, led by Ingo Molnar. This patch allows nearly all of the kernel to be preempted, with the exception of a few very small regions of code ("raw_spinlock critical regions"). This is done by replacing most kernel spinlocks with mutexes that support priority inheritance, as well as moving all interrupt and software interrupts to kernel threads. <br />
<br />
It further incorporates high resolution timers - a patch set, which is independently maintained.<br />
<br />
[as said from the [http://rt.wiki.kernel.org/index.php/CONFIG_PREEMPT_RT_Patch Real-Time Linux Wiki]]<br />
<br />
patch at http://www.kernel.org/pub/linux/kernel/projects/rt/<br />
<br />
====-bld====<br />
{{Warning|This scheduler is in development.}}<br />
BLD is best described as a O(1) CPU picking technique. Which is done by reordering CPU runqueues based on runqueue loads. In other words, it keeps the scheduler aware of the load changes, which helps scheduler to keep runqueues in an order. This technique doesn't depend on scheduler ticks. The two most simple things in this technique are: load tracking and runqueue ordering; these are relatively simpler operations. Load tracking will be done whenever a load change happens on the system and based on this load change runqueue will be ordered. So, if we have an ordered runqueue from lowest to highest, then picking the less (or even busiest) runqueue is easy. Scheduler can pick the lowest runqueue without calculation and comparison at the time of placing a task in a runqueue. And while trying to distribute load at sched_exec and sched_fork our best choice is to pick the lowest busiest runqueue of the system. And in this way, system remains balanced without doing any load balancing. At the time of try_to_wake_up picking the idlest runqueue is topmost priority but it has been done as per domain basis to utilize CPU cache properly and it's an area where more concentration is requires.<br />
<br />
Google code Webpage: http://code.google.com/p/bld/<br />
<br />
Patches are only available for 3.3-rc3, 3.4-rc4 and 3.5.0.<br />
<br />
====-grsecurity====<br />
<br />
Grsecurity is a security focused patchset. It adds numerous security related features such as Role-Based Access Control and utilizes features of the PaX project. It can be used on a desktop but a public server would receive the greatest benefit. Some applications are incompatible with the additional security measures implemented by this patchset. If this occurs, consider using a lower security level.<br />
<br />
The -grsecurity patches can be found at http://grsecurity.net<br />
<br />
====Tiny-Patches====<br />
The goal of [http://elinux.org/Linux_Tiny Linux Tiny] is to reduce its memory and disk footprint, as well as to add features to aid working on small systems. Target users are developers of embedded system and users of small or legacy machines such as 386s.<br />
<br />
Patch releases against the mainstream Linux kernel have been discontinued. The developers chose to focus on a few patches and spend their time trying to get them merged into the mainline kernel.<br />
<br />
====-pf====<br />
{{AUR|linux-pf}} is yet another Linux kernel fork which provides you with a handful of awesome features not merged into mainline. It is based on neither existing Linux fork nor patchset, although some unofficial ports may be used if required patches haven't been released officially.<br />
The most prominent patches of linux-pf are TuxOnIce, the CK patchset (most notably BFS), AUFS3, LinuxIMQ, l7 filter and BFQ.<br />
<br />
===Individual patches===<br />
<br />
These are patches which can be simply included in any build of a vanilla kernel or incorporated (probably with some major tweaking) into another patchset. I have included some common ones for starters.<br />
<br />
====Reiser4====<br />
<br />
[[Reiser4]]<br />
<br />
====Gensplash/fbsplash====<br />
[[Gensplash]] - http://dev.gentoo.org/~spock/projects/ {{linkrot|2013|05|20}}<br />
<br />
== Compilation ==<br />
Arch Linux provides for several methods of kernel compilation.<br />
<br />
=== Using the Arch Build System ===<br />
Using the [[Arch Build System]] takes advantage of the high quality of the existing {{Pkg|linux}} [[PKGBUILD]] and the benefits of [[Wikipedia:Package management system|package management]]. The PKGBUILD is structured so that you can stop the build after the source is downloaded and configure the kernel.<br />
<br />
See [[Kernels/Compilation/Arch Build System]].<br />
<br />
=== Traditional ===<br />
This involves manually downloading a source tarball, and compiling in your home directory as a normal user. Once configured, two installation methods are available; the traditional manual method, or with [[Makepkg]] + [[Pacman]].<br />
<br />
An advantage of learning the traditional method is that it is ''not'' distribution-specific. <br />
<br />
See [[Kernels/Compilation/Traditional]].<br />
<br />
===Proprietary NVIDIA driver===<br />
See [[NVIDIA#Alternate install: custom kernel]] for instructions on using the proprietary NVIDIA driver with a custom kernel.<br />
<br />
== See also ==<br />
*[http://www.kroah.com/lkn/ O'Reilly - Linux Kernel in a Nutshell] (free ebook)</div>Qguvhttps://wiki.archlinux.org/index.php?title=List_of_applications/Science&diff=270018List of applications/Science2013-08-05T19:03:48Z<p>Qguv: /* Scientific or technical computing */ punctuation</p>
<hr />
<div><noinclude><br />
[[Category:Mathematics and science]]<br />
[[Category:Applications]]<br />
[[it:List of Applications/Science]]<br />
[[ja:List of Applications/Science]]<br />
[[zh-CN:List of Applications/Science]]<br />
{{List of Applications navigation}}<br />
</noinclude><br />
<br />
== Science ==<br />
<br />
{{Note|1=For possibly more up to date selection of scientific applications, try checking the [https://aur.archlinux.org/packages.php?O=0&do_Search=Go&detail=1&C=15&SeB=nd&SB=v&SO=d&PP=50 AUR 'science' category]}}<br />
<br />
=== Scientific documents ===<br />
<br />
{{Box||See the main article: [[List of Applications/Documents#Scientific Documents]]|#E5E5FF|#FCFCFC}}<br />
<br />
=== Mathematics ===<br />
<br />
==== Calculator ====<br />
<br />
{{Wikipedia|Comparison of software calculators}}<br />
<br />
* {{App|[[Wikipedia:bc programming language|bc]]|Arbitrary precision calculator language.|http://www.gnu.org/software/bc/|{{Pkg|bc}}}}<br />
* {{App|calc|Arbitrary precision console calculator.|http://www.isthe.com/chongo/tech/comp/calc/|{{Pkg|calc}}}}<br />
* {{App|Extcalc|Qt-based scientfic graphical calculator.|http://extcalc-linux.sourceforge.net/|{{AUR|extcalc}}}}<br />
* {{App|[[Wikipedia:GCalctool|GCalctool]]|Scientific calculator included in the GNOME desktop.|http://www.gnome.org|{{AUR|gcalctool-oldgui}}}}<br />
* {{App|KAlgebra|Calculator and 3D plotter included in KDE EDU.|http://www.kde.org/applications/education/kalgebra/|{{Pkg|kdeedu-kalgebra}}}}<br />
* {{App|[[Wikipedia:KCalc|KCalc]]|Scientific calculator included in the KDE desktop.|http://kde.org/applications/utilities/kcalc/|{{Pkg|kdeutils-kcalc}}}}<br />
* {{App|Qalculate|Calculator and equation solver with fault-tolerant parsing, constant recognition and units.|http://qalculate.sourceforge.net/|{{Pkg|libqalculate}}}}<br />
* {{App|SpeedCrunch|Fast, high precision and powerful cross-platform calculator.|http://speedcrunch.org|{{AUR|speedcrunch}}}}<br />
* {{App|[[Wikipedia:xcalc|xcalc]]|Scientific calculator for X with algebraic and reverse polish notation modes.|http://xorg.freedesktop.org/|{{Pkg|xorg-xcalc}}}}<br />
<br />
==== Computer algebra system ====<br />
<br />
{{Wikipedia|Comparison of computer algebra systems}}<br />
<br />
* {{App|[[Wikipedia:Fermat (computer algebra system)|Fermat]]|Computer algebra system that does arithmetic of arbitrarily long integers and fractions, multivariate polynomials, symbolic calculations, matrices over polynomial rings, graphics, and other numerical calculations.|http://home.bway.net/lewis/|{{AUR|fermat}}}}<br />
* {{App|[[Wikipedia:Mathomatic|Mathomatic]]|General purpose Computer Algebra System written in C.|http://www.mathomatic.org/|{{Pkg|mathomatic}}}}<br />
* {{App|[[Wikipedia:Maxima (software)|Maxima]]|[[Wikipedia:Maple (software)|Maple]]/[[Wikipedia:Wolfram Mathematica|Mathematica]]-like program with a wxWidgets based frontend.|http://maxima.sourceforge.net/|{{Pkg|maxima}} {{Pkg|wxmaxima}}}}<br />
* {{App|[[Wikipedia:PARI/GP|PARI/GP]]|Computer algebra system designed for fast computations in number theory.|http://pari.math.u-bordeaux.fr/|{{Pkg|pari}}}}<br />
* {{App|[[Sage]]|Algebra system similar to Maxima, but written in Python.|http://www.sagemath.org/|{{Pkg|sage-mathematics}}}}<br />
* {{App|[[Wikipedia:Xcas|Xcas]]|User interface to Giac, a free, basic computer algebra system.|http://www-fourier.ujf-grenoble.fr/~parisse/giac.html|{{AUR|xcas}}}}<br />
<br />
==== Scientific or technical computing ====<br />
<br />
{{Wikipedia|Comparison of numerical analysis software}}<br />
<br />
* {{App|EngLab|Cross-compile mathematical platform with a C like syntax.|http://englab.bugfest.net|{{AUR|englab}}}}<br />
* {{App|[[Wikipedia:Euler (software)|Euler]]|Numerical application designed for higher level math such as calculus, optimization, and statistics that uses Maxima for symbolic operations.|http://euler.sourceforge.net|{{AUR|euler}}}}<br />
* {{App|[[Wikipedia:FreeMat|FreeMat]]|Matlab-like program that supports many of its functions and features a codeless interface to external C, C++, and Fortran code, further parallel distributed algorithm development (via MPI), and 3D visualization capabilities.|http://freemat.sourceforge.net/|{{Pkg|freemat}}}}<br />
* {{App|[[Octave]]|[[Matlab]]-like language and interface for numerical computations.|http://www.gnu.org/software/octave/ |{{Pkg|octave}}}}<br />
* {{App|[[Wikipedia:matplotlib|PyLab]]|Collection of Python modules (pyplot, numpy, etc.) used for scientific calculations.|http://www.scipy.org/PyLab|{{Pkg|python2-matplotlib}}}}<br />
* {{App|[[Wikipedia:Scilab|Scilab]]|Matlab alternative used for numerical computations. Its syntax is not equivalent to that of Matlab, but it can be easily converted.|http://www.scilab.org/|{{AUR|scilab}}}}<br />
<br />
==== Statistics ====<br />
<br />
{{Wikipedia|Comparison of statistical packages}}<br />
<br />
* {{App|[[Wikipedia:Just another Gibbs sampler|JAGS]] (Just another Gibbs sampler)|Cross-platform program for analysis of Bayesian hierarchical models using Markov Chain Monte Carlo (MCMC) simulation.|http://mcmc-jags.sourceforge.net/|{{AUR|jags}}}}<br />
* {{App|[[Wikipedia:PSPP|PSPP]]|Free SPSS implementation.|http://www.gnu.org/software/pspp/|{{AUR|pspp}}}}<br />
* {{App|[[R]]|Software environment for statistical computing and graphics.|http://cran.r-project.org/|{{Pkg|r}}}}<br />
* {{App|[[Wikipedia:RKWard|RKWard]]|Frontend for the statistical language R.|http://rkward.sourceforge.net/|{{AUR|rkward}}}}<br />
<br />
==== Data evaluation ====<br />
<br />
{{Wikipedia|List of information graphics software}}<br />
<br />
* {{App|Extrema|Visualization and data analysis tool.|http://sourceforge.net/projects/extrema|{{AUR|extrema}}}}<br />
* {{App|[[Wikipedia:Fityk|Fityk]]|Curve fitting and data analysis application, predominantly used to fit analytical, bell-shaped functions to experimental data.|http://fityk.nieto.pl/|{{AUR|fityk}}}}<br />
* {{App|[[Wikipedia:gnuplot|Gnuplot]]|Command-line program that can generate 2D and 3D plots of functions, data, and data fits. |http://www.gnuplot.info/|{{Pkg|gnuplot}}}}<br />
* {{App|[[Wikipedia:Grace (plotting tool)|Grace]]|WYSIWYG 2D graph plotting tool.|http://plasma-gate.weizmann.ac.il/Grace/|{{Pkg|grace}} {{AUR|qtgrace}} {{AUR|gracegtk}}}}<br />
* {{App|[[Wikipedia:LabPlot|LabPlot]]|Free software data analysis and visualization application, similar to SciDAVis.|http://labplot.sourceforge.net/|{{AUR|labplot2}}}}<br />
* {{App|[[Wikipedia:QtiPlot|QtiPlot]]|Platform-independent application used for interactive scientific graphing and data analysis, similar to the proprietary [[Wikipedia: Origin (software)|Origin]] or [[Wikipedia:SigmaPlot|SigmaPlot]].|http://soft.proindependent.com/qtiplot.html|{{Pkg|qtiplot}}}}<br />
* {{App|[[Wikipedia:ROOT|ROOT]]|Data analysis program and library (originally for particle physics) developed by CERN.|http://root.cern.ch/drupal/|{{AUR|root}}}}<br />
* {{App|[[Wikipedia:SciDAVis|SciDAVis]]|Fork of QtiPlot with the goal of being better documented and more user friendly.|http://scidavis.sourceforge.net/|{{AUR|scidavis}}}}<br />
See also [[List of Applications#Spreadsheets]]<br />
<br />
=== Chemistry and biology ===<br />
<br />
====Computational biology and bioinformatics====<br />
<br />
{{Wikipedia|List of open source bioinformatics software}}<br />
<br />
* {{App|[[Wikipedia:BALL|BALL]] (Biochemical Algorithms Library)|Application framework in C++ that provides an extensive set of data structures as well as classes for molecular nechanics, advanced solvation methods, comparison and analysis of protein structures, file import/export, and visualization.|http://www.ball-project.org/|{{AUR|ball}}}}<br />
* {{App|[[Wikipedia:BioJava|BioJava]]|Set of Java tools for computational biology, as well as bioinformatics.|http://biojava.org/wiki/Main_Page|{{AUR|biojava}}}}<br />
* {{App|[[Wikipedia:Biopython|Biopython]]|Python package with tools for computational biology, as well as bioinformatics.|http://biopython.org/wiki/Biopython|{{AUR|python-biopython}} {{AUR|python2-biopython}}}}<br />
* {{App|[[Wikipedia:EMBOSS|EMBOSS]] (European Molecular Biology Open Software Suite)|Open source software analysis package specially developed for the needs of the molecular biology and bioinformatics user community.|http://emboss.sourceforge.net/|{{AUR|emboss}}}}<br />
* {{App|[[Wikipedia:MEGA, Molecular Evolutionary Genetics Analysis|MEGA]] (Molecular Evolutionary Genetics Analysis)|Integrated tool for conducting automatic and manual sequence alignment, inferring phylogenetic trees, mining web-based databases, estimating rates of molecular evolution, inferring ancestral sequences, and testing evolutionary hypotheses.|http://www.megasoftware.net/|{{AUR|mega}}}}<br />
* {{App|[[Wikipedia:MUMmer|MUMmer]]|Bioinformatics software system for sequence alignment based on suffix trees.|http://mummer.sourceforge.net/|{{AUR|mummer}}}}<br />
* {{App|[[Wikipedia:UGENE|UGENE]]|Application that integrates dozens of well-known biological tools and algorithms, providing both graphical user and command-line interfaces.|http://ugene.unipro.ru/|{{AUR|ugene}}}}<br />
<br />
==== Molecule viewer ====<br />
<br />
{{Wikipedia|List of molecular graphics systems}}<br />
<br />
* {{App|[[Wikipedia:Avogadro_(software)|Avogadro]]|Editor, viewer and simulator for 3D molecule structures (also supports downloading files from the [[Wikipedia:Protein Data Bank|Protein Data Bank]]).|http://avogadro.openmolecules.net/wiki/Main_Page|{{Pkg|avogadro}}}}<br />
* {{App|BALLView|Standalone molecular modeling and visualization application, part of the [[Wikipedia:BALL|BALL]] framework.|http://www.ballview.org/|{{AUR|ball}}}}<br />
* {{App|[[Wikipedia:Ghemical|Ghemical]]|Computational chemistry software package used to edit, view and simulate molecular structures.|http://bioinformatics.org/ghemical/ghemical/index.html|{{AUR|ghemical}}}}<br />
* {{App|[[Wikipedia:PyMOL|PyMOL]]|Open-source molecular visualization system that can produce high quality 3D images of small molecules and biological macromolecules, such as proteins.|http://pymol.org|{{AUR|pymol}}}}<br />
* {{App|[[Wikipedia:RasMol|RasMol]]|Computer program written for molecular graphics visualization intended and used primarily for the depiction and exploration of biological macromolecule structures.|http://www.rasmol.org/|{{AUR|rasmol}}}}<br />
<br />
==== Molecule drawing ====<br />
<br />
* {{App|[[Wikipedia:BKchem|BKChem]]|Practical and goodlooking skeletal formula molecule drawing program.|http://bkchem.zirael.org/|{{AUR|bkchem}}}}<br />
* {{App|[[Wikipedia:Chemtool|Chemtool]]|GTK+-based program for drawing chemical structural formulas.|http://ruby.chemie.uni-freiburg.de/~martin/chemtool/chemtool.html|{{Pkg|chemtool}}}}<br />
* {{App|EasyChem|Simple skeletal formula molecule drawing program with a focus on producing press-quality figures.|http://easychem.sourceforge.net/|{{AUR?|easychem}}}}<br />
* {{App|[[Wikipedia:Gabedit|Gabedit]]|Graphical user interface to computational chemistry packages like [[Wikipedia:GAMESS (US)|GAMESS]], [[Wikipedia:Gaussian (software)|Gaussian]], [[Wikipedia:MOLCAS|MOLCAS]], [[Wikipedia:MOLPRO|MOLPRO]], [[Wikipedia:MPQC|MPQC]], [[Wikipedia:MOPAC|OpenMopac]], [[Wikipedia:PC GAMESS|Firefly]] (previously PC GAMESS) and [[Wikipedia:Q-Chem|Q-Chem]].|http://gabedit.sourceforge.net/|{{AUR|gabedit}}}}<br />
* {{App|[[Wikipedia:XDrawChem|XDrawChem]]|Extensive skeletal formula molecule drawing program (includes spectroscopy prediction).|http://xdrawchem.sourceforge.net/|{{AUR|xdrawchem}}}}<br />
<br />
==== Periodic table ====<br />
<br />
* {{App|gElemental|Periodic table of the elements with additional information.|http://freshmeat.net/projects/gelemental|{{AUR|gelemental}}}}<br />
* {{App|[[Wikipedia:Kalzium|Kalzium]]|Periodic table of the elements with molecule editor and equation solver from the [[KDE]] desktop.|http://edu.kde.org/kalzium/|{{Pkg|kdeedu-kalzium}}}}<br />
<br />
==== Biochemistry ====<br />
<br />
* {{App|[[Wikipedia:Bioclipse|Bioclipse]]|Java-based visual platform for biochemestry that uses the Eclipse Rich Client Platform (RCP).|http://www.bioclipse.net/|{{AUR?|bioclipse}}}}<br />
<br />
==== Molecular modeling ====<br />
<br />
* {{App|[[Wikipedia:GROMACS|GROMACS]] (GROningen MAchine for Chemical Simulations)|Versatile package to perform molecular dynamics, i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles.|http://www.gromacs.org|{{AUR|gromacs}}}} <br />
* {{App|[[Wikipedia:Quantum ESPRESSO|Quantum ESPRESSO]]|Integrated suite of applications for electronic-structure calculations and materials modeling at nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials (both norm-conserving and ultrasoft).|http://www.quantum-espresso.org/|{{AUR|quantum-espresso}}}}<br />
<br />
==== Image manipulation ====<br />
<br />
* {{App|[[Wikipedia:ImageJ|ImageJ]]|Java-based image processing and analysing program that provides extensibility via plugins and macros. It is widely used in microscopy (e.g. for cell counting).|http://rsb.info.nih.gov/ij|{{AUR|imagej}}}}<br />
<br />
=== Astronomy ===<br />
<br />
* {{App|[[Wikipedia:Celestia|Celestia]]|3D astronomy simulation program that allows users to travel through an extensive universe, modeled after reality, at any speed, in any direction and at any time in history.|http://www.shatters.net/celestia/|{{Pkg|celestia}}}}<br />
* {{App|GIMP Astronomy Plugins|Set of GIMP plugins for astronomical image processing.|http://hennigbuam.de/georg/gimp.html|{{AUR|gimp-plugin-astronomy}}}}<br />
* {{App|GoQat|Camera acquisition software, especially for QSI cameras, that provides other features such as autoguiding, focusing help and others.|http://canburytech.net/GoQat/|{{AUR|goqat}}}}<br />
* {{App|[[Wikipedia:KStars|KStars]]|Planetarium application that provides an accurate graphical simulation of the night sky, from any location on Earth, at any date and time. It is included in KDE Edu.|http://edu.kde.org/kstars/|{{Pkg|kdeedu-kstars}}}}<br />
* {{App|Open PHD Guiding|Telescope autoguiding software based on the famous PHD Guiding.|http://code.google.com/p/open-phd-guiding/|{{AUR|open-phd-guiding-svn}}}}<br />
* {{App|Qastrocam-g2|Webcam acquisition software for planetary imaging.|http://sourceforge.net/projects/qastrocam-g2/|{{AUR|qastrocam-g2}}}}<br />
* {{App|[[Wikipedia:Cartes du Ciel|Skychart / Cartes du Ciel]]|Planetarium that maps out and labels most of the constellations, planets, and objects you can see with a telescope. It can also download Digitized Sky Survey Charts and superimpose images over these charts.|http://www.ap-i.net/skychart/start/|{{AUR|skychart}}}}<br />
* {{App|StarPlot|3-dimensional star chart viewer.|http://starplot.org/|{{AUR|starplot}}}}<br />
* {{App|[[Wikipedia:Stellarium (computer program)|Stellarium]]|Beautiful 3D planetarium that uses OpenGL to render a realistic sky in real time.|http://www.stellarium.org/|{{Pkg|stellarium}}}}<br />
* {{App|[[Wikipedia:XEphem|XEphem]]|Motif-based ephemeris and planetarium program.|http://www.clearskyinstitute.com/xephem/xephem.html|{{AUR|xephem}}}}<br />
<br />
=== Physics ===<br />
<br />
==== Electronics ====<br />
<br />
{{Wikipedia|Comparison of EDA software}}<br />
<br />
* {{App|[[gEDA]]|Full suite and toolkit of Electronic Design Automation tools that are used for electrical circuit design, schematic capture, simulation, prototyping, and production.|http://www.geda-project.org/|{{Pkg|geda-gaf}}}}<br />
* {{App|[[Wikipedia:KiCAD|KiCAD]]|Software suite for electronic design automation (EDA) that facilitates the design of schematics for electronic circuits and their conversion to PCB (printed circuit board).|http://www.kicad-pcb.org/display/KICAD/KiCad+EDA+Software+Suite|{{Pkg|kicad}}}}<br />
* {{App|KLogic|Application used for easily building and simulating digital circuits.|http://www.a-rostin.de/|{{AUR|klogic}}}}<br />
* {{App|[[Wikipedia:KTechLab|KTechLab]]|IDE for electronic and PIC microcontroller circuit design and simulation featuring an extensive circuit designer with autorouting and simulation of all common electronic components and logic elements.|http://sourceforge.net/projects/ktechlab/|{{Pkg|ktechlab}}}}<br />
* {{App|[[Wikipedia:Oregano (software)|Oregano]]|Graphical software application for schematic capture and simulation of electrical circuits. The actual simulation is done by the [[Wikipedia:Ngspice|ngspice]] or [[Wikipedia:GNU Circuit Analysis Package|Gnucap]] engines.|https://github.com/marc-lorber/oregano|{{AUR|oregano}}}}<br />
* {{App|QElectroTech|Application used to draw advanced electrical circuits.|http://qelectrotech.org/|{{AUR|qelectrotech}}}}<br />
* {{App|[[Wikipedia:Quite Universal Circuit Simulator|Qucs]]|Electronics circuit simulator application that gives you the ability to set up a circuit with a graphical user interface and simulate its large-signal, small-signal and noise behaviour.|http://qucs.sourceforge.net/|{{Pkg|qucs}}}}<br />
<br />
==== Physics simulation ====<br />
<br />
* {{App|[[Wikipedia:Code_Aster|Code_Aster]]|Software package for Civil and Structural Engineering finite element analysis and numeric simulation in structural mechanics.|http://www.code-aster.org|{{AUR|aster}}}}<br />
* {{App|[[Wikipedia:Step (software)|Step]]|Two-dimensional physics simulation engine that is included in the KDE desktop as part of KDE Edu.|http://edu.kde.org/step/|{{Pkg|kdeedu-step}}}}<br />
<br />
==== Unit conversion ====<br />
<br />
* {{App|ConvertAll|Unit conversion application that allows one to combine units in any way (e.g. inches per decade), even if it does not make sense.|http://convertall.bellz.org/|{{AUR|convertall}}}} <br />
* {{App|Gonvert|Conversion utility that allows conversion between many units like CGS, Ancient, Imperial with many categories like length, mass, numbers, etc.|http://www.unihedron.com/projects/gonvert/|{{AUR|gonvert}}}} <br />
* {{App|[[Wikipedia:GNU Units|Units]]|Command-line unit converter and calculator that can handle multiplicative scale changes, nonlinear conversions such as Fahrenheit to Celsius or wire gauge and others.|http://www.gnu.org/s/units/|{{Pkg|units}}}}</div>Qguvhttps://wiki.archlinux.org/index.php?title=Talk:Git&diff=269700Talk:Git2013-08-04T00:09:13Z<p>Qguv: /* Git prompt */</p>
<hr />
<div>== Merge with Gitweb ==<br />
<br />
As said, the sections to get git working over ssh, http and the git protocol should in my opinion be placed in this article.<br><br />
-- [[User:Markg85|Markg85]] 5 March 2011<br />
<br />
== Bash completion ==<br />
Unless I'm mistaken, bash completion comes with git now so the instructions should be changed to simply:<br />
source /usr/share/git/completion/git-completion.bash<br />
right?<br />
<br />
Maybe note that it's also possible by installing bash-completion?<br><br />
-- [[User:Xerdomii|Xerdomii]] 6 May 2011<br />
<br />
:The default {{ic|/etc/bash.bashrc}} (from the bash package) sources {{ic|/etc/bash_completion}} (optionally from the bash-completion package) if it exists. The {{ic|bash_completion}} script intern sources files in {{ic|/etc/bash_completion.d/}} if they exist. With Arch's git package a copy of {{ic|/usr/share/git/completion/git-completion.bash}} ends up in the {{ic|/etc/bash_completion.d/}} directory. So, if you have the {{Pkg|bash-completion}} package installed, completion for git should work automatically as soon as {{ic|/etc/bash.bashrc}} is processed.<br />
:-- [[User:James Eder|James Eder]] 13:27, 20 June 2011 (EDT)<br />
<br />
::AFAIK, [https://www.archlinux.org/packages/?name=bash-completion bash-completion] does not put anything into {{ic|/etc/bash_completion.d/}}, so the current instruction is misleading. The thread [https://bbs.archlinux.org/viewtopic.php?id=147462 __git_ps1 isn't found anymore] seems to be the only accurate guide available, at the moment.<br />
::-- [[User:Mloskot|Mloskot]] ([[User talk:Mloskot|talk]]) 19:52, 19 September 2012 (UTC)<br />
<br />
== Smart HTTP ==<br />
<br />
Trying to follow the instructions to set up HTTP access, I ran into following issue:<br />
<br />
error: Cannot access URL http://<server>/git/example/, return code 22<br />
fatal: git-http-push failed<br />
<br />
Acccording to http://dev.bazingaweb.fr/2011/02/23/how-to-set-up-git-over-http.html<br />
the ''config'' file on the remote repository needs to get a couple new lines:<br />
<br />
[http]<br />
receivepack = true<br />
<br />
After this little change it all works for me.<br><br />
-- [[User:Gunnar]] 4 May 2012<br />
<br />
== Git prompt ==<br />
<br />
I've tried the method explained here to add git status and features to a zsh prompt, but to no avail.<br />
<br />
The method explained here to add git status and features to a zsh prompt did not work in my case.<br />
<br />
A stackoverflow answer [http://stackoverflow.com/questions/1128496/to-get-a-prompt-which-indicates-git-branch-in-zsh] worked well for me. Here is what I added to my .zshrc:<br />
<br />
setopt prompt_subst<br />
autoload -Uz vcs_info<br />
zstyle ':vcs_info:*' actionformats \<br />
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '<br />
zstyle ':vcs_info:*' formats \<br />
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f '<br />
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'<br />
zstyle ':vcs_info:*' enable git cvs svn<br />
vcs_info_wrapper() {<br />
vcs_info<br />
if [ -n "$vcs_info_msg_0_" ]; then<br />
echo "%{$fg[grey]%}${vcs_info_msg_0_}%{$reset_color%}$del"<br />
fi<br />
}<br />
RPROMPT=$'$(vcs_info_wrapper)'<br />
<br />
Has anyone else had a similar issue? If so, I'll update the page to match this fix. [[User:Qguv|Qguv]] ([[User talk:Qguv|talk]]) 00:09, 4 August 2013 (UTC)</div>Qguvhttps://wiki.archlinux.org/index.php?title=Talk:Git&diff=269699Talk:Git2013-08-04T00:08:58Z<p>Qguv: /* Git prompt */ new section</p>
<hr />
<div>== Merge with Gitweb ==<br />
<br />
As said, the sections to get git working over ssh, http and the git protocol should in my opinion be placed in this article.<br><br />
-- [[User:Markg85|Markg85]] 5 March 2011<br />
<br />
== Bash completion ==<br />
Unless I'm mistaken, bash completion comes with git now so the instructions should be changed to simply:<br />
source /usr/share/git/completion/git-completion.bash<br />
right?<br />
<br />
Maybe note that it's also possible by installing bash-completion?<br><br />
-- [[User:Xerdomii|Xerdomii]] 6 May 2011<br />
<br />
:The default {{ic|/etc/bash.bashrc}} (from the bash package) sources {{ic|/etc/bash_completion}} (optionally from the bash-completion package) if it exists. The {{ic|bash_completion}} script intern sources files in {{ic|/etc/bash_completion.d/}} if they exist. With Arch's git package a copy of {{ic|/usr/share/git/completion/git-completion.bash}} ends up in the {{ic|/etc/bash_completion.d/}} directory. So, if you have the {{Pkg|bash-completion}} package installed, completion for git should work automatically as soon as {{ic|/etc/bash.bashrc}} is processed.<br />
:-- [[User:James Eder|James Eder]] 13:27, 20 June 2011 (EDT)<br />
<br />
::AFAIK, [https://www.archlinux.org/packages/?name=bash-completion bash-completion] does not put anything into {{ic|/etc/bash_completion.d/}}, so the current instruction is misleading. The thread [https://bbs.archlinux.org/viewtopic.php?id=147462 __git_ps1 isn't found anymore] seems to be the only accurate guide available, at the moment.<br />
::-- [[User:Mloskot|Mloskot]] ([[User talk:Mloskot|talk]]) 19:52, 19 September 2012 (UTC)<br />
<br />
== Smart HTTP ==<br />
<br />
Trying to follow the instructions to set up HTTP access, I ran into following issue:<br />
<br />
error: Cannot access URL http://<server>/git/example/, return code 22<br />
fatal: git-http-push failed<br />
<br />
Acccording to http://dev.bazingaweb.fr/2011/02/23/how-to-set-up-git-over-http.html<br />
the ''config'' file on the remote repository needs to get a couple new lines:<br />
<br />
[http]<br />
receivepack = true<br />
<br />
After this little change it all works for me.<br><br />
-- [[User:Gunnar]] 4 May 2012<br />
<br />
== Git prompt ==<br />
<br />
I've tried the method explained here to add git status and features to a zsh prompt, but to no avail.<br />
<br />
The method explained here to add git status and features to a zsh prompt did not work in my case.<br />
<br />
A stackoverflow answer [http://stackoverflow.com/questions/1128496/to-get-a-prompt-which-indicates-git-branch-in-zsh] worked well for me. Here is what I added to my .zshrc:<br />
<br />
setopt prompt_subst<br />
autoload -Uz vcs_info<br />
zstyle ':vcs_info:*' actionformats \<br />
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '<br />
zstyle ':vcs_info:*' formats \<br />
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f '<br />
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'<br />
zstyle ':vcs_info:*' enable git cvs svn<br />
vcs_info_wrapper() {<br />
vcs_info<br />
if [ -n "$vcs_info_msg_0_" ]; then<br />
echo "%{$fg[grey]%}${vcs_info_msg_0_}%{$reset_color%}$del"<br />
fi<br />
}<br />
RPROMPT=$'$(vcs_info_wrapper)'<br />
<br />
Has anyone else had a similar issue? If so, I'll update the page to match this fix.</div>Qguv