0x01 检查网络
# ping 9ee3.com
0x02 校对时间
# timedatectl set-ntp true
0x03 检查磁盘分区
# lsblk
0x04 建立新分区
# fdisk /dev/sdX
# g
# w
# cfdisk /dev/sdX
EFI分区建议128M,系统分区建议56G(一般用户足够),剩下的/home分区
0x05 格式化分区
# mkfs.fat -F32 /dev/sdX1 //EFI分区
# mkfs.ext4 /dev/sdX2 //系统分区
# mkfs.xfs /dev/sdx3 //home分区
0x06 挂载分区
# mount /dev/sdX2 /mnt
# mkidr -p /mnt/boot/EFI
# mkdir /mnt/home
# mount /dev/sdX1 /mnt/boot/EFI
# mount /dev/sdx3 /mnt/home
0x07 切换源
# nano /etc/pacman.d/mirrorlist
在文件的最顶端添加: Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch
# pacman -Syy
0x08 安装基本系统
# pacstrap -i base base-devel
0x09 配置系统
# genfstab -U /mnt >> /mnt/etc/fstab
# arch-chroot /mnt
# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# hwclock --systohc
# nano /etc/locale.gen
en_US.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8
zh_CN.*
# locale-gen
# echo "LANG=en_US.UTF-8" >> /etc/locale.conf
# echo "hostname" >> /etc/hostname
# passwd root
# useradd -m -g users -G wheel -s /bin/bash wit
# passwd wit
# pacman -S sudo
# nano /etc/sudoers
找到 root ALL=(ALL) ALL 并依葫芦画瓢添加 wit ALL=(ALL) ALL 即可,也可以去掉#%wheel ALL=(ALL) ALL这一行前面的#
# grub efibootmgr
# grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=arch_grub --recheck
# grub-mkconfig -o /boot/grub/grub.cfg
0x10 图形界面安装
# pacman -S xf86-video-intel mesa //安装显卡
# pacman -S xorg xorg-xinit gnome gnome-extra gdm
0x11 安装中文字体
# pacman -S wqy-microhei
0x12 安装解压
# pacman -S unrar unzip p7zip
0x13 中文输入法
# pacman -S fcitx-im fcitx-configtool
# nano ~/.xprofile
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=“@im=fcitx”
0x14 后续优化
# pacman -S ntfs-3g dosfstools
# nano /etc/pacman.conf
[archlinuxcn]
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch
0x15 美化
# pacman -S numix-gtk-theme numix-circle-icon-theme-git
0x16 善后
# systemctl enable gdm
# systemctl enable dhcpcd
# exit
# umount /mnt/boot/EFI
# umount /mnt/home
# umount /mnt
拔出U盘
# reboot