- Check whether the motherboard is in UEFI mode
ls /sys/firmware/efi/efivars
- Connect network
dhcpcd
- Test whether the connection is successful
ping baidu.com
- Ensure that the system time is accurate
timedatectl set-ntp true
- View hard disk partitions
fdisk -l
- Hard disk partition
Partition using cfdisk tool
cfdisk /dev/sda
- After entering the tool, select gpt
- Partition recommendation
EFI file system 512M
linux swap greater than 512M
Space left in root directory
EFI partition type (Tye) select the first EFI System
linux swap partition type (Tye) select linux swap
The root partition type (Tye) is linux filesystem - When the partition is completed, select Write. Here, you must enter yes and Quit
- Check the partition again
fdisk -l
- Format partition:
EFI partition format is f32
mkfs.fat -F32 /dev/sda1
The partition format of linux filesystem is ext4
mkfs.ext4 /dev/sda3
- swap partition settings
Swap space initialization
mkswap /dev/sda2
Enable swap space
swapon /dev/sda2
- Mount file
- Root directory file (linux filesystem)
mount /dev/sda3 /mnt
- Create additional mount points to the appropriate partition
mkdir /mnt/boot
Create the boot file in the root directory and hang it in sda1 (that is, hang the EFI file in sda1)
mount /dev/sda1 /mnt/boot
- Modify domestic image
vim /etc/pacman.d/mirrorlist
Two domestic images are recommended here
http://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch http://mirrors.aliyum.com/archlinux/$repo/os/$arch
- Install the basic software package, linux kernel and firmware of conventional hardware
pacstrap /mnt base base-devel linux linux-firmware vim dhcpcd
- Generate fstab file
genfstab -U /mnt >> /mnt/etc/fstab
- change root to the new system
arch-chroot /mnt
- Set time zone
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
- Synchronization time
hwclock --systohc
- localization
vim /etc/locale.gen
Remove the comments from the desired area
en_US.UTF-8 UTF-8 zh_CN.UTF-8 UTF-8
Generate locale information
locale-gen
Create locale.conf and edit it
vim /etc/locale.conf
input
LANG=en_US.UTF-8
Setting Chinese is not recommended here, which will cause TTY garbled code
15. Create the hostname file and add the hostname
echo "host name" >> /etc/hostname
Add information to hosts
127.0.0.1 localhost ::1 localhost 127.0.1.1 host name.localdomain host name
- Set root password
passwd
- Install motherboard microcode (for intel users only)
intel processor user installation
pacman -S intel-ucode
- The hard disk has dual systems that need to be installed (only arch does not need to be installed)
pacman -S os-prober
- Install startup management tools
pacman -S grub efibootmgr
Generate GRUB EFI
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
- Generate startup file
grub-mkconfig -o /boot/grub/grub.cfg
- Notebooks need to be installed
pacman -S iw wpa_supplicant dialog netctl
- Turn on the network
systemctl enable dhcpcd
- Start network
systemctl start dhcpcd
- Exit installation
exit
perhaps
Ctrl+D
- Manually unmount the mounted partition
umount -R /mnt
- reboot after installation
- Create a sudo user
useradd -m user name
- Set user password
passwd user name
- Install KDE Plasma desktop
-
Xorg group
-
KDE Plasma desktop environment
-
Session of Wayland KDE Plasma
-
KDE application group (including KDE specific applications: Dolphin manager and other useful applications).
pacman -S xorg plasma plasma-wayland-session kde-applications
Start the display manager and network manager services after installation
systemctl enable sddm.service systemctl enable NetworkManager.service
- Restart the computer after installation