Arch Linux

Info about my particular machine:

Full disk encryption

Software Management

The high-level flags for pacman are -S (sync), -Q (query), -D (database), -R (remove), -T (test dependencies), -U (upgrade), -F (files database), -V (version).

  • pacman -S package installs package (the -S forces synchronisation with the remote repositories)
  • pacman -Ss package searches for packages that contain package
  • pacman -S $(pacman -Ssq package_regex) install all packages that regex match package_regex
  • pacman -Syy updates all indices
  • pacman -Su updates all installed packages
  • pacman -Q package lists installed packages
  • pacman -Qo file lists the package that owns file
  • pacman -Ql package lists all files owned by package
  • pacman -Rc package uninstalls package and all packages that depend on package (-c is cascade)
  • pacman -Rdd package uninstalls ONLY package ignoring all dependencies

Software from AUR packages

Alternativ: Download the package from the Arch User RepositoryPfeil and then run
  • makepkg -sri to install the package (this must not be run as root)
The directory /var/cache/pacman/pkg/ contains previously installed packages. Any of those can be (re-)installed by running
  • pacman -U <file_name_of_package>
Read more about

Building your own packages:

User Management

  • usermod -d /my/new/home -m username to change a user's home directory. (The -m option also automatically creates the new directory and moves the content there.)
  • usermod -aG additional_groups username to add a user to other groups use (additional_groups is a comma-separated list, -a makes sure that the groups are added to existing groups)

Drivers and kernel modules

See Kernel modulesPfeil and

Manually setting hardware properties

  • vi /sys/class/backlight/intel_backlight/brightness allows you to edit the display brightness (see also herePfeil)


See e.g.
  • ip link set eth0 up and ip link set eth down
  • ip link show dev eth0
  • ip addr show dev eth0
  • ip addr add IP_address/subnet_mask broadcast broadcast_address dev interface
  • ip route add default via default_gateway
  • ip addr flush dev interface, ip route flush dev interface, ip link set interface down





  • iw dev lists available devices
  • iw dev wlan0 scan scans for networks
  • iw dev wlan0 link shows the status of the link
  • wpa_supplicant -D nl80211,wext -i wlan0 -c <(wpa_passphrase "<ssid>" "<password>")


  • bluetoothctl opens a bluetooth control shell

See also:

Daemons and Services

  • systemctl list-unit-files lists all (enabled and disabled) services
  • systemctl status postgresql.service to the the state of service postgresql
  • systemctl start bluetooth.service starts the bluetooth service
  • systemctl enable sshd.service
  • systemctl {start|stop|restart} sshd.service
  • journalctl -xe display error logs for services (-e jumps to the end of the logfile, -x augments log lines with explanations from the catalog)
  • journalctl -f just follows the output


  • dmesg -l err prints messages from the kernel ring buffer (-l err gives you only the log level error)


  • gdb <command> to run gnu debug
  • strace -eopen <command> to trace system calls and signals


See I3WindowManager


To switch keyboard layout from the console use, e.g.,
  • setxkbmap -layout [de|us] to switch between de and us keyboard layout.
For more details see wiki.archlinux.orgPfeil.