Arch Linux 安装教程与笔记
此笔记为本人于 2022 年 4 月 6 日安装 Arch Linux 时的完全笔记。
(由于已经提前分好 brtfs 格式的 efi 及 / 的分区,故本教程不包含此方面的教程)
check ip:
ip link
open wifi:
rfkill unblock wifi
ip link set wlan0 up
connect wifi:
iwctl
station wlan0 scan
station wlan0 get-networks
station wlan0 connect MYWIFI
station wlan0 show
exit
update time:
timedatectl set-ntp true
format partition:
EFI:
mkfs.fat -F 32 /dev/efi_partition
SYSTEM:
mkfs.btrfs -fL system /dev/system_partition
mount partition:
mount /dev/root_partition /mnt
mkdir /mnt/boot
mount /dev/efi_partition /mnt/boot
install core libraries:
pacstrap /mnt base linux linux-firmware base-devel
install usage libraries:
pacstrap /mnt vim nano
set fstab:
genfstab -U /mnt >> /mnt/etc/fstab
cat /mnt/etc/fstab
in system do it
into new system
arch-chroot /mnt
set timezone:
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
set hard time:
hwclock —systohc
set locale:
echo “en_US.UTF-8 UTF-8” >> /etc/locale.gen
echo “LANG=en_US.UTF-8” > /etc/locale.conf
set hostname:
hostnamectl set-hostname —static archlinux
initramfs:
mkinitcpio -P
update root password:
passwd
install grub:
pacman -S grub efibootmgr os-prober amd-uncode
grub-install —target=x86_64-efi —efi-directory=/boot —bootloader-id=archlinux —recheck
grub-mkconfig -p /boot/grub/grub.cfg
add user:
useradd -m -u 1000 -G wheel -s /bin/bash your_login_name
network:
pacman -S networkmanager
systemctl enable NetworkManager
install sudo:
pacman -S sudo
echo “%wheel ALL=(ALL) ALL” > /etc/sudoers.d/wheel
bluetooth:
pacman -S bluez bluez-utils
systemctl enabe bluetooth
Chinese fonts:
pacman -S wqy-zenhei wqy-bitmapfont wqy-microhei ttf-fireflysung ttf-fireflysung
Wubi Input:
pacman -S ibus ibus-rime rime-wubi
cat >> ~/.config/ibus/rime/default.custom.yaml << EOF
> patch:
schema_list:
- schema: wubi86
> EOF
multi start with Windows:
/etc/default/grub
GRUB_DISABLE_OS_PROBER=false
Update grub:
grub-mkconfig -o /boot/grub/grub.cfg