共有 1 篇文章
📅 最近更新
2020-02-14
- 2024-09-15
Download ISO file
https://www.archlinux.org/download/
https://mirrors.tuna.tsinghua.edu.cn/archlinux/iso/
Prepare an installation medium
1dd bs=4M if=path/to/archlinux.iso of=/dev/sdb status=progress oflag=sync
Boot the live environment
Connect Network
1iwctl
2device list
3station [device] scan
4station [device] get-networks
5station [device] connect SSID
6
7# Check
8ip address
9
10# Update the system clock
11timedatectl set-ntp true
12timedatectl status
Partition the disks
1lsblk -l
2
3cgdisk /dev/sda
4
5# Format
6# EFI `ef00`
7# Linux `8300`
8# SWAP `8200`
9mkfs.ext4
10mkfs.vfat
11mkswap
12
13# Mount
14mount /dev/sda3 /mnt
15mkdir /mnt/boot
16mount /dev/sda1 /mnt/boot
17swapon /dev/sda2
Edit Mirrorlist
1vim /etc/pacman.d/mirrorlist
1Setver = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch
2Setver = https://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch
3Setver = https://mirrors.xjtu.edu.cn/archlinux/$repo/os/$arch
4Setver = https://mirrors.163.com/archlinux/$repo/os/$arch
1pacman -Syy
Install essential packages
1pacstrap /mnt base linux-lts linux-firmware vim
Configure the system
1genfstab -U /mnt >> /mnt/etc/fstab
2arch-chroot /mnt /bin/bash
TimeZone
1ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
2hwclock --systohc --utc
Locale
1vim /etc/locale.gen
1en_US.UTF-8 UTF-8
2zh_CN.UTF-8 UTF-8
1locale-gen
2echo LANG=en_US.UTF-8 > /etc/locale.conf
3echo lap > /etc/hostname
Boot Loader
1pacman -S efibootmgr grub
2grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id="Arch Linux" --recheck
3grub-mkconfig -o /boot/grub/grub.cfg
User
1visudo /etc/sudoers
1%wheel ALL=(ALL) ALL
1# root password
2passwd
3# user
4useradd -m -G wheel -s /bin/zsh akvicor
5passwd akvicor
Network
1vim /etc/systemd/network/20-wired.network
Wired DHCP
1[Match]
2Name=enp1s0
3
4[Network]
5DHCP=yes
Wired Static
1[Match]
2Name=enp1s0
3
4[Network]
5Address=10.1.10.9/24
6Gateway=10.1.10.1
7DNS=10.1.10.1
8DNS=8.8.8.8
1vim /etc/systemd/network/25-wireless.network
Wired DHCP
1[Match]
2Name=wlan0
3
4[Network]
5DHCP=yes
1systemctl enable systemd-networkd
2systemctl start systemd-networkd
3systemctl enable systemd-resolved
4systemctl start systemd-resolved
5systemctl enable iwd
6systemctl start iwd
Extra Package
1pacman -S base-devel iwd zsh
2# Desktop Environment
3pacman -S xf86-video-intel xorg
4pacman -S noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra ttf-font-awesome terminus-font
5pacman -S i3-gaps i3blocks i3status xorg-xinit alsa-utils
6pacman -S rofi dunst libnotify ranger feh xclip
if use xorg-xinit