记录了我曾经安装Arch Linux的大致步骤
update time:2023-4-16
0.连接 wifi 1 2 3 4 5 iwctl station wlan0 scan station wlan0 get-networks station wlan0 connect SSIDexit
1.确保 UEFI 模式启动 1 ls /sys/firmware/efi/efivars
2.禁用自动更新 mirrorlist 的 reflector 1 systemctl stop reflector.service
3.检查时钟服务状态
4.换源 1 2 3 vim /etc/pacman.d/mirrorlist Server = https://mirrors.ustc.edu.cn/archlinux/$repo /os/$arch Server = https://mirrors.hit.edu.cn/archlinux/$repo /os/$arch
5.分区
6.格式化 / 和 /home 格式化成 ext4 类型,EFI 分区格式化成 vfat 类型,交换分区使用 mkswap 初始化
1 2 3 mkfs.ext4 /dev/root_part mkfs.vfat /efi_system_part mkswap /dev/swap_part
7.挂载 1 2 3 mount /dev/root_part /mnt mount --mkdir /dev/efi_system_part /mnt/boot swapon /dev/swap_part
8.安装必需的软件包 1 pacstrap /mnt base base-devel linux linux-firmware dhcpcd iwd networkmanager wireless_tools wpa_supplicant vim git
9.配置系统 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 genfstab -U /mnt >> /mnt/etc/fstab arch-chroot /mntln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime hwclock --systohc vim /etc/locale.gen locale-genecho "LANG=en_US.UTF-8" > /etc/locale.conf pacman -S intel-ucode pacman -S amd-ucode pacman -S grub efibootmgr grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub grub-mkconfig -o /boot/grub/grub.cfg
10.完成安装 1 2 3 4 5 passwd umount -R /mnt reboot
11.图形化安装 1 2 3 4 5 6 7 8 9 10 11 12 13 14 pacman -Syyu useradd -m -G wheel -s /bin/bash <username> passwd <username> EDITOR=vim visudo pacman -S plasma-meta konsole dolphin systemctl enable sddm [archlinuxcn] SigLevel = Optional TrustAll Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch pacman -Syyu
12.基础功能包 1 2 3 4 5 6 7 8 9 sudo pacman -S ntfs-3g wqy-zenhei noto-fonts noto-fonts-cjk noto-fonts.emoji firefox yay sudo pacman -S fcitx5-im fcitx5-chinese-addons fcitx5-pinyin-moegirl fcitx5-pinyin-zhwiki yay -S fcitx5-material-color vim /etc/environment GTK_IM_MODULE=fcitx XMODIFIERS=@im=fcitx QT_IM_MODULE=fcitx