Arch Linux

Init

Login

After boot, login with [1]:

username: root
password: root

Wireless configure [2] (Optional):

ip link
systemctl status iwd
systemctl restart iwd
systemctl status iwd
iwctl
device list
station wlan0 scan
station wlan0 get-networks
station wlan0 connect "<ssid>"
ping archlinux.org

Pacman [3][4]

Use repository mirror:

sudo cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
sudo vim /etc/pacman.d/mirrorlist
Server = https://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch

Refreshes the package database and upgrades all installed packages:

pacman -Syyu

Additional tools for pacman:

sudo pacman -S pacman-contrib

Removes older versions of packages from the cache, keeping only the two most recent versions for each one.

sudo paccache -rk 2

Users and groups

sudo useradd -m <user>
sudo vim /etc/sudoers
<user> ALL=(ALL:ALL) ALL
sudo addgroup sudousers
sudo usermod -aG sudousers <user>
sudo vim /etc/sudoers
sudousers ALL=(ALL)ALL
reboot

Localization [5]

sudo vim /etc/locale.gen
en_US.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8
sudo locale-gen
sudo vim /etc/locale.conf
LANG=en_US.UTF-8

System time

timedatectl set-timezone Asia/Shanghai

Set the hostname

sudo vim /etc/hostname
<hostname>
sudo systemctl restart systemd-hostnamed

Domain name resolution [6]

sudo vim /etc/hosts
<ip> github.com
<ip> raw.githubusercontent.com
<ip> mirror.archlinuxarm.org
sudo systemctl restart systemd-resolved

NetworkManager

sudo pacman -S networkmanager
sudo systemctl stop netctl
sudo systemctl disable netctl
sudo systemctl enable --now networkmanager

Enable system tray:

sudo pacman -S network-manager-applet

Setup

sudo pacman -S mpv \
	yt-dlp

yay

sudo pacman -Syu yay
gh auth login
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg
sudo pacman -U yay-bin*.pkg.tar.xz
yay

Paru (Optional)

yay -S paru

Flatpak [7][8] (Optional)

sudo pacman -S flatpak
reboot
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo

You can find apps on Flathub.

Uncomplicated Firewall

sudo pacman -S ufw
sudo ufw status
sudo systemctl enable --now ufw
sudo ufw status

SSH [8]

sudo pacman -S openssh
sudo systemctl enable --now sshd
sudo ufw allow 22/tcp
ip addr show

Get your ip of inet. On client machine:

ssh <user>@<ip>

Xfce [9]

sudo pacman -S xorg
sudo pacman -S xfce4 xfce4-goodies

i3 [10] (Optional)

sudo pacman -S i3

Hyprland (Cache)

Sway [11] (Cache)

Thunar

  • Thunar → View → Show Hidden Files

  • Thunar → View → Configure Toolbar

    New Tab
    Split View
    View Switcher
    

Nemo [12] (Optional)

sudo pacman -S nemo

LightDM [13][14]

sudo pacman -S lightdm lightdm-webkit2-greeter
git clone --depth=1 https://github.com/TheTerrior/lightdm-minimal
cd lightdm-minimal
chmod +x ./risky_installer.sh
sudo ./risky_installer.sh
sudo vim /etc/lightdm/lightdm.conf
[Seat:*]
greeter-session=lightdm-webkit2-greeter
sudo vim /etc/lightdm/lightdm-webkit2-greeter.conf
webkit_theme = minimal
sudo systemctl enable --now lightdm

xfce-tile (Optional)

git clone --depth=1 https://github.com/dodophoenix/xfce-tile
cd xfce-tile
cp xfce-setup-shortcuts.sh xfce-setup-shortcuts.sh.bak
vim xfce-setup-shortcuts.sh
chmod +x ./xfce-setup-shortcuts.sh
./xfce-setup-shortcuts.sh

Console font [15][16] (Optional)

showconsolefont
ls /user/share/kbd/showconsolefont
sudo pacman -S terminus-font
setfont drdos8x14 -m 8859-2

Bluetooth [17][18]

sudo pacman -S bluez bluez-utils blueman
sudo systemctl enable --now bluetooth
systemctl status bluetooth
sudo vim /etc/bluetooth/main.conf
AutoEnable=true

If return Bluetooth service was skipped because of an unmet condition check ... [19]:

sudo modprobe bluetooth
sudo systemctl restart bluetooth
systemctl status bluetooth

Audio

sudo pacman -S pulseaudio
sudo pacman -R pulseaudio
yay -S pipewire-pulse
sudo systemctl enable --now pipewire

USB drive [20]

sudo pacman -S udisks2
sudo fdisk -l
udisksctl mount -b /dev/sda1
udisksctl unmount -b /dev/sda1
udisksctl power-off -b /dev/sda

auto-cpufreq [3]

git clone --depth=1 https://github.com/AdnanHodzic/auto-cpufreq.git
cd auto-cpufreq
sudo ./auto-cpufreq-installer
sudo auto-cpufreq --install
sudo systemctl status auto-cpufreq
sudo auto-cpufreq --stats

preload [3]

yay -S preload
sudo systemctl enable --now preload
sudo systemctl status preload
sudo systemctl stop preload && sudo systemctl disable preload
sudo reboot

Timeshift [3]

yay -S timeshift
sudo timeshift --list
sudo timeshift --restore --snapshot '20XX-XX-XX_XX-XX-XX' --skip-grub

restic (Cache)

Application Autostart

Settings → Session and Startup → Application Autostart → Add:

Name `<name>`
Command `<command>`

Configure Desktop

Materia

sudo pacman -S materia-gtk-theme

Settings → Appearance → Style → Materia-dark-compact.

Papirus

sudo pacman -S papirus-icon-theme

Settings → Appearance → Icons → Papirus-Dark.

SIF (Optional)

Configure Cursor

mkdir ~/.icons
cd ~/.icons
  1. Get Bibata-Rainbow-*.tar.gz from Bibata Cursor Rainbow - Releases.

  2. Get Chroma-*.tar.xz from Chroma Cursors for Linux.

tar -xvf Bibata-Rainbow-Modern.tar.gz
tar -xvf Bibata-Rainbow-Original.tar.gz
tar -xvf Chroma-Black-M.tar.xz
tar -xvf Chroma-Black-S.tar.xz

Settings → Mouse and Touchpad → Theme → <theme>

Configure applications menu

  • Settings → Panel → Appearance

    • Style → Solid color

    • Color → black

  • Settings → Panel → Items

    1. Separator → Edit

      • Style → Transparent

      • Expand (Off)

    2. Applications Menu → Edit

      • Show button title (Off)

      • Icon → Select icon from → Image Files → 100x100.png

    3. Separator → Expand (Off)

    4. Workspace Switcher → Edit

      • Appearance → Buttons

      • Workspace Settings → General → Names

        # Workspace Name
        1 1
        2 2
        3 3
        4 4
        
    5. Separator → Expand (On)

    6. Windows Buttons → Edit

      • Show button labels (Off)

      • Show handle (Off)

    7. Separator → Expand (On)

    8. Status Tray Plugin → Edit

      • Adjust size automatically (On)

      • Arrange items in a single row (On)

    9. Wavelan → Edit

      • Show signal bar (Off)

    10. Batter Monitor → Edit

      • Display icon (On)

      • Display bar (Off)

    11. Separator → Expand (Off)

    12. Clock → Edit

      • Timezone → Asia/Shanghai

      • Layout → Time Only

    13. Separator → Expand (Off)

Configure wallpaper

mkdir -p ~/Pictures/wallpaper
  1. Put wallpaper images into ~/Pictures/wallpaper.

  2. Thunar → Choice image → Context menu → Set as wallpaper

sudo pacman -S nitrogen

nitrogen → Preferences → Add → ~/Pictures/wallpaper → OK → Apply.

Disable screen lock

  • Settings → Xfce Screensaver

    • Screensaver → Enable Screensaver (Off)

    • Lock Screen → Enable Lock Screen (Off)

Fonts

sudo pacman -S adobe-source-han-serif-cn-fonts \
	noto-fonts-cjk \
	noto-fonts-emoji \
	noto-fonts-extra

Install Opts

picom

sudo pacman -S picom

dunst

sudo pacman -S dunst

Alacritty

sudo pacman -R xfce4-terminal
sudo pacman -S alacritty

Rime

sudo pacman -S fcitx5-im
sudo vim /etc/environment
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=fcitx
SDL_IM_MODULE=fcitx

Brave

yay -S brave-bin

qutebrowser (Optional)

pacman -S qutebrowser

mpv

sudo pacman -S mpv
cp -r /usr/share/doc/mpv/ ~/.config/

ClamAV

sudo pacman -S clamav
clamd
clamscan <file>

If return ERROR: Can't create freshclam.dat in /usr/local/share/clamav [21]:

sudo chown -R <user> /usr/local/share/clamav

Clipboard

sudo pacman -R xfce4-clipman-plugin
sudo pacman -S copyq

qView (Optional)

yay -S qview

Flameshot (Optional)

Snipaste

yay -S snipaste

eSearch (Optional)

git clone --depth=1 https://aur.archlinux.org/e-search-bin.git

Download eSearch-*-linux-x64.deb from releases.

mv eSearch-*-linux-x64.deb e-search-*.deb
mv e-search-*.deb e-search-bin/
cd e-search-bin
makepkg
sudo pacman -U e-search-bin-*-1-x86_64.pkg.tar.zst

Umi-OCR

yay -S umi-ocr-bin

Get Umi-OCR_Linux_Paddle_*.tar.xz from Umi-OCR - Releases.

tar -xf Umi-OCR_Linux_Paddle_*.tar.xz
mv Umi-OCR_Linux_Paddle_* Umi-OCR_Linux_Paddle
./umi-ocr.sh

Goldendict

sudo pacman -S goldendict-git

Download goldendict-1_1.5.0-3-x86_64.pkg.tar.zst, qt5-webkit-5.212.0alpha4-22-x86_64.pkg.tar.zst from https://sourceforge.net/projects/fabiololix-os-archive/files/Packages/

sudo pacman -U qt5-webkit-5.212.0alpha4-22-x86_64.pkg.tar.zst
sudo pacman -U goldendict-1_1.5.0-3-x86_64.pkg.tar.zst
yay -Ql goldendict

Rofi

sudo pacman -S rofi

rofi-shortcuts (Optional)

git clone --depth=1 https://github.com/Zeioth/rofi-shortcuts
cd rofi-shortcuts
mkdir -p ~/.config/rofi/rofi-shortcuts/
mkdir -p ~/.local/share/rofi/rofi-shortcuts/
cp ./rofi-shortcuts.conf ~/.config/rofi/rofi-shortcuts/rofi-shortcuts.conf
cp ./rofi-shortcuts.sh ~/.local/share/rofi/rofi-shortcuts/rofi-shortcuts.sh
chmod u+x ~/.local/share/rofi/rofi-shortcuts/rofi-shortcuts.sh
ln -sf ~/.local/share/rofi/rofi-shortcuts/rofi-shortcuts.sh ~/.local/bin/rofi-shortcuts
rofi-shortcuts

rofi-calc (Optional)

sudo pacman -S rofi-calc
rofi -show calc -modi calc -no-show-match -no-sort

Rofimoji

sudo pacman -S rofimoji

rofi-copyq

git clone --depth=1 https://github.com/cjbassi/rofi-copyq
cd rofi-copyq
./rofi-copyq

AHK_X11 (Cache)

yay -S ahk_x11-bin

keymapper (Later)

yay -S keymapper
sudo systemctl enable --now keymapperd

Input Leap (Optional)

yay -S input-leap-git
input-leap

On Client PC, install Barrier.

WeChat

flatpak install flathub com.tencent.WeChat

Photoshop CC (Cache)

Reference

Cross-reference