ArchLinux install notes(only commands, not friendly for novice)
Install Arch Linux
Partition
fdisk -l
fdisk /dev/sda
mkfs.ext4 /dev/sda1
mkfs.ext4 /dev/sda2
mkswap /dev/sda3
swapon /dev/sda3
Mount
mount /dev/sda1 /mnt
mkdir /mnt/boot
mount /dev/sda2 /mnt/boot
Installation
pacstrap /mnt base linux linux-firmware
Fstab
genfstab -U /mnt >> /mnt/etc/fstab
Chroot
arch-chroot /mnt
Time zone
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock –systohc
Localization
nano /etc/locale.gen # at least uncomment en_US.UTF-8 UTF-8 Or zh_CN.UtF-8 UTF-8
locale-gen
echo LANG=en_US.UTF-8 >> /etc/locale.conf
echo ‘yourhostname’ >> /etc/hostname
Initramfs
mkinitcpio -P
Root password
passwd
Add tsinghua source
- 编辑 /etc/pacman.d/mirrorlist, 在文件的最顶端添加:
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch
- 更新软件包缓存:
pacman -Syy
Grub
pacman -S grub
grub-install --target=i386-pc /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
Install Xorg
pacman -S xorg-server
Create new user
useradd -m -g wheel -s /bin/bash username
# pacman -S zsh
# useradd -m -g wheel -s /bin/zsh username
passwd username
Install software
pacman -S sddm plasma plasma-nm
pacman -S dialog ntfs-3g ark gimp kate
pacman -S firefox chromium
pacman -S gimp gwenview vlc okular sudo
解决安装archlinux后没有ifconfig命令
pacman -S net-tools dnsutils inetutils iproute2
Start service
systemctl enable sddm
systemctl enable NetworkManager