GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing wiki.archlinux.org — Help:Reading - ArchWiki (Redirected from Add) Related articles Because the vast majority of the ArchWiki contains indications that may need clarification for users new to Arch Linux (or GNU/Linux in general), this rundown of basic procedures was written both to avoid confusion in the assimilation of the articles and to deter repetition in the content itself. OrganizationMost articles on the ArchWiki do not attempt to provide a holistic introduction to a single topic; they are instead written in adherence to the "Don't Repeat Yourself" principle, under the assumption that the user will seek out and read any supporting material that they do not yet understand. Where possible, such supporting material is indicated in the article via special formatting, see #Formatting. Because of this organization, it may be necessary to examine several related sources in order to fully understand an ArchWiki article. In particular, users who are new to Arch (or GNU/Linux in general) should expect to end up reading a great number of articles even when solving simple problems. It is especially important to study the supporting material before seeking additional help from other users. Formatting
Root, regular user or another userSome lines are written like so: # mkinitcpio -p linux Others have a different prefix: $ makepkg -s The numeral or hash sign ( Note The commands prefixed with
# are intended to be executed from a root shell, which can for example be easily accessed with sudo -i. Running sudo command from an unprivileged shell instead of command from a root shell will also work in most cases, with some notable exceptions such as redirection and command substitution, which strictly require a root shell. See sudo#Login shell.When the commands need to run as a specific user, they will be prefixed by the username in square brackets, for example: [postgres]$ initdb -D /var/lib/postgres/data This means you should use a privilege elevation tool, e.g. with sudo: $ sudo -u postgres initdb -D /var/lib/postgres/data A notable exception to watch out for: # This alias makes ls colorize the listing alias ls='ls --color=auto' In this example, the context surrounding the numeral sign communicates that this is not to be run as a command; it should be edited into a file instead. So in this case, the numeral sign denotes a comment. A comment can be explanatory text that will not be interpreted by the associated program. Bash scripts denotation for comments happens to coincide with the root PS1. After further examination, "give away" signs include the uppercase character following the Regardless, most articles make this easy to discern by notifying the reader: Append to # This alias makes ls colorize the listing alias ls='ls --color=auto' Append, add, create, editWhen prompted to append to, add to, create, or edit one or more files, it is implied that you should use one of the following methods. To create or modify multiline files, it is suggested to use a text editor. For example, using the nano command to edit the file # nano /etc/bash.bashrc Note Text files must end with a newline because a line is terminated with a newline. Most text editors insert an ending newline by default.
To create or overwrite a file from a string, it may be simpler to use output redirection. The following example creates or overwrites the contents of the file # echo myhostname > /etc/hostname Output redirection can also be used to append a string to a file. The following example appends the text # echo "[custom-repo]" >> /etc/pacman.conf When prompted to create directories, use the mkdir command: # mkdir /mnt/boot Make executableAfter creating a file, if it is meant to be run as a script (whether manually or called by another program), it needs to be set as executable, for example with: $ chmod +x script See chmod. Some applications such as file managers may provide graphical interfaces to do the same. SourceSome applications, notably command-line shells, use scripts for their configuration: after modifying them, they must be sourced in order for the changes to be applied. In the case of bash, for example, this is done by running (you can also replace $ source ~/.bashrc When the wiki suggests modifying such a configuration script, it will not explicitly remind you to source the file, and only in some cases will it point to this section with a reminder link. Installation of packagesWhen an article invites you to install some packages in the conventional way, it will not indicate the detailed instructions to do so; instead, it will simply mention the names of the packages to be installed. Note Frequently, the install or installed links are used to point to this article section.
Official packagesFor packages from the official repositories, you will read something like:
This means that you have to run: # pacman -S foobar The pacman article and the pacman(8) manual page contain detailed explanations to deal with package management in Arch Linux proficiently. Arch User RepositoryFor packages from the Arch User Repository (AUR), you will read something like:
This means that in general you have to follow the foobarAUR link, download the PKGBUILD archive, extract it, verify the content and finally run, in the same folder: $ makepkg -si Note The base-devel meta package is required to build packages from the AUR or with the Arch build system.
The Arch User Repository article contains all the detailed explanations and best practices to deal with AUR packages. Control of systemd unitsWhen an article invites to perform an operation with a systemd unit (e.g. a service), it will not indicate the detailed instructions to do so, but instead you will read something like:
This means you have to run the corresponding systemctl command (start, enable, etc.). For example: # systemctl start example.service Tip
Note The systemd#Using units section contains a structured list of available actions (like start, enable, enable and start, etc.) with their corresponding systemctl commands.
System-wide versus user-specific configurationIt is important to remember that there are two different kinds of configurations on a GNU/Linux system. System-wide configuration affects all users. Since system-wide settings are generally located in the User-specific configuration affects only a single user. Dotfiles are used for user-specific configuration. For example, the file Note
~/ and $HOME are shortcuts for the user's home directory, usually /home/username/.Common shell filesBash and other Bourne-compatible shells, such as Zsh, also source files depending on whether the shell is a login shell or an interactive shell. See Bash#Configuration files and Zsh#Startup/Shutdown files for details. Pseudo-variables in code examplesSome code blocks may contain so-called pseudo-variables, which, as the name says, are not actual variables used in the code. Instead they are generic placeholders and have to be manually replaced with system-specific configuration items before the code may be run or parsed. Common shells such as bash and zsh provide tab-completion to auto-complete parameters for common commands such as systemctl. In the articles that comply with Help:Style/Formatting and punctuation, pseudo-variables are formatted in italics. For example:
In this case
In this case the pseudo-variables are used to describe the parameters that must be substituted for them. Details on how to gather them are elaborated in the section Securely wipe disk#Calculate blocks to wipe manually, which features the command. In case of file examples, pasting pseudo-variables in real configuration files might break the programs that use them. EllipsesIn most cases, ellipses ( For example /etc/X11/xorg.conf.d/50-synaptics.conf Section "InputClass"
...
Option "CircularScrolling" "on"
Option "CircScrollTrigger" "0"
...
EndSection
Be aware though that, in a few instances, ellipses may be a meaningful part of the code syntax: attentive users should be able to recognize these cases by the context. Hidden category: |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |