Basic ArchLinux(UEFI) + WayFire Install

Basic Arch Install

[ Check UEFI or BIOS ]

ls /sys/firmware/efi/efivars

If the directory not exist, you are not in UEFI mode.

[ Internet ]

Check system activate internet interface

ip link

For Ethernet (DHCP)

Good to go!

For WiFi (iwd)

enter interactive prompt

iwctl

list all wifi device

[iwd] device list

select the device you want to use, i.e: wlan0
and start scanning

[iwd] station <device> scan

after scanning, you can list all available networks

[iwd] station <device> get-networks

connect one network

[iwd] station <device> connect <network-name>

leave iwclt

[iwd] exit

Ping test

ping archlinux.org

[ Update System Time ]

timedatectl set-ntp true

[ Partition ]

List All Disks and Partitions

fdisk -l

Change Partition Table

You can use cfdisk to do this step.

cfdisk /dev/<your_disk>

Partition Table Example

mount point partition type recommend size
/mnt/boot /dev/efi_boot_partition EFI >=300M
[SWAP] /dev/swap_partition Linux Swap >=512M
/mnt /dev/root_partition Linux Filesystem space left

Partition Table Example (With Home Partition)

mount point partition type recommend size
/mnt/boot /dev/efi_boot_partition EFI >=300M
[SWAP] /dev/swap_partition Linux Swap >=512M
/mnt /dev/root_partition Linux Filesystem space left
/mnt/home /dev/home_partition Linux Filesystem space left

Format Partitions

  • For Boot Partition
mkfs.fat -F 32 -n ARCHBOOT /dev/efi_boot_partition
  • For Swap Partition
mkswap /dev/swap_partition
  • For Root Partition
mkfs.ext4 -L ARCHROOT /dev/root_partition
  • For Home Partition (If you have)
mkfs.ext4 -L ARCHHOME /dev/home_partition

Mount Partitions

  1. Mount Root Partition
mount /dev/disk/by-label/ARCHROOT /mnt
  1. Mount Boot Partition
mkdir /mnt/boot
mount /dev/disk/by-label/ARCHBOOT /mnt/boot
  1. Mount Swap Partition
swapon /dev/swap_partition
  1. Mount Home Partition (If you have)
mkdir /mnt/home
mount /dev/disk/by-label/ARCHHOME /mnt/home

[ Install Basic Package ]

(Optional) Setup Mirrorlist

edit /etc/pacman.d/mirrorlist file
Example For Chinese User:

# /etc/pacman.d/mirrorlist
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch

Install Packages

pacstrap /mnt base linux linux-firmware networkmanager vim man-db man-pages texinfo
  • base, linux, linux-firmware
    must install

  • networkmanager
    for internet

  • vim
    text editor, or you can choose nano

  • man-db, man-pages, texinfo
    For man page

[ Generate Fstab ]

genfstab -U /mnt >> /mnt/etc/fstab

[ Chroot to System ]

arch-chroot /mnt

[ Timezone ]

ln -sf /usr/share/zoneinfo/<Your_Region>/<Your_City> /etc/localtime

Example For Chinese User:

ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

run hwclock to generate /etc/adjtime

hwclock --systohc

[ Locale ]

  1. edit the file /etc/locale.gen, uncomment en_US.UTF-8 UTF-8
  2. run locale-gen to generate locale info
locale-gen
  1. build /etc/locale.conf file, set the variable LANG
# /etc/locale.conf
LANG=en_US.UTF-8

[ Host Name ]

build /etc/hostname file

# /etc/hostname
<your_host_name>

[ Set Root User Password ]

passwd

[ Enable NetworkManager Service ]

systemctl enable NetworkManager.service 

We are now in chroot, so we do not need to start NetworkManager service. After bootloader installed and reboot to system, the NetworkManager will start automatically.

[ Install Microcode ]

  • For AMD User
pacman -S amd-ucode
  • For Intel User
pacman -S intel-ucode

[ Install Grub ]

pacman -S grub efibootmgr

(Optional) os-prober – For Dual Boot

pacman -S os-prober

If you want dual boot with Windows OS, you may need ntfs-3g

pacman -S ntfs-3g

[ Messing with GRUB :( ]

I only need LINUX! (No Dual Boot)

  1. install grub on your boot partition
# command below is for x86_64 user
# you can find more info in https://wiki.archlinux.org/title/GRUB
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
  1. generate /boot/grub/grub.cfg
grub-mkconfig -o /boot/grub/grub.cfg

I cannot leave windows… (Dual Boot)

NOTE: Setup Dual Booting always has many problems, the following guidance is only for reference.

  1. install grub on your boot partition
# command below is for x86_64 user
# you can find more info in https://wiki.archlinux.org/title/GRUB
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
  1. edit /etc/default/grub
# /etc/default/grub
    ...
# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
GRUB_DISABLE_OS_PROBER=false # <-- Uncomment this Line
  1. generate /boot/grub/grub.cfg
grub-mkconfig -o /boot/grub/grub.cfg
# You must make sure os-prober find your windowsOS boot partition

[ Reboot ]

  1. leave chroot
exit
  1. umount /mnt
umount -R /mnt
  1. swapoff
swapoff /dev/swap_partition
  1. shutdown
shutdown now
  1. reboot your computer
    (Make sure you unplugged your Arch Linux Installer USB drive)
    If everything go well, you will see GRUB menu after booting.

Setup Basic Destop Environment

[ Root Login ]

We only have user root right now, use root account to log in

[ Check Internet ]

Normally, NetworkManager.service will start automatically, you can use ping to check your internet connection

# ping example
ping archlinux.org

You can use nmtui to configure your connection

[ Neofetch ] <– VERY IMPORTANT!!!

pacman -S neofetch
neofetch

If you don’t hava neofetch, you are not using Arch :)

[ GPU Card ]

If you are not using NVIDIA card, GOOOOOOD!!
I’m not familiar with AMD gpu…Please read wiki!

only Nvidia

pacman -S mesa-utils nvidia nvidia-utils

(Optional) You may need nvtop to be coooool(?)

pacman -S nvtop

After the installation, you need to reboot you computer

only AMD

Please read the wiki (AMD GPU) first :)
link

pacman -S mesa mesa-utils

For Vulkan support

pacman -S vulkan-radeon

Intel+NVIDIA

Please read the wiki (INTEL GPU) first :)
link
For our Intel card (with Vulkan)

pacman -S mesa mesa-utils vulkan-intel

For our Nvidia card :(

pacman -S mesa-utils nvidia nvidia-utils nvidia-prime

(Optional) You may need nvtop to be coooool(?)

pacman -S nvtop

You can use prime-run <command> to run stuff on Nvidia card
After the installation, you need to reboot you computer

[ Audio ]

Install Some Basic Packages

pacman -S alsa-utils alsa-firmware sof-firmware alsa-ucm-conf

Pipewire and Wireplumber

pacman -S pipewire wireplumber pipewire-pulse

[ Sudo ]

Install Sudo

pacman -S sudo

Create one normal user

useradd -m -G wheel -s /bin/bash <new_user_name>

set this user’s password

passwd <new_user_name>

Edit sudo file

edit file

EDITOR=vim visudo

uncomment one line in sudo file

# In visudo
    ...
###
### User privilege specification
###
root ALL=(ALL:ALL) ALL
## Uncomment to allow members of group wheel to execute any command
%wheel ALL=(ALL:ALL) ALL # <-- uncomment this line
    ...

Log out user root

After installed Sudo, now we can use new user account to do stuff

exit

(For Chinese User) [ Clash ]

We need a good way to Love GFW …

sudo pacman -S curl clash

You can use curl to get your config.yaml

cd <your_clash_directory>
curl https://gitee.com/mirrors/Pingtunnel/raw/master/GeoLite2-Country.mmdb > ./Country.mmdb
curl <your_sub_url> > ./config.yaml

Edit clash systemd unit

sudo vim /etc/systemd/user/clash.service
# /etc/systemd/user/clash.service
[Unit]
Description=Clash, Good Way to Love GFW
After=network.target

[Service]
Type=simple
Restart=on-abort
ExecStart=/usr/bin/clash -d <your_clash_directory>

[Install]
WantedBy=multi-user.target

Reload Daemon

systemctl --user daemon-reload

Start Clash Service

systemctl --user start clash.service

Check Clash Service

systemctl --user status clash.service

Set Clash as your current system porxy

export http_proxy=http://127.0.0.1:7890
export https_proxy=http://127.0.0.1:7890

[ YAY (AUR Helper) ]

link

sudo pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si

After installed yay, we can use yay -S 'package' instead of sudo pacman -S 'package'

(For Chinese User) [ Chinese Fonts ]

yay -S wqy-zenhei

[ Wayfire ]

install wayland packages

yay -S wayland wayland-protocals xorg-xwayland

install wayfire

yay -S wayfire

install basic font (For terminal emulator)

yay -S ttf-dejavu 

install terminal emulator

There are many terminal emulators on arch, such as Alacritty, Kitty, Foot

# I prefer foot
yay -S foot

download default config file

curl https://raw.githubusercontent.com/WayfireWM/wayfire/master/wayfire.ini > ~/.config/wayfire.ini

set default terminal emulator

edit ~/.config/wayfire.ini

# ~/.config/wayfire.ini
    ...
# Applications ─────────────────────────────────────────────────────────────────

[command]

# Start a terminal
# https://github.com/alacritty/alacritty
binding_terminal = <super> KEY_ENTER
command_terminal = alacritty # <-- Change Here
    ...

Run Wayfire

wayfire

If you use QEMU to run wayfire

WLR_RENDERER_ALLOW_SOFTWARE=1 wayfire