系统安装

查看是否EFI

  1. ls /sys/firmware/efi/efivars

联网

  1. ip link
  2. ping archlinux.org

如果无线联网,使用命令 iwctl

更新系统时间

  1. timedatectl set-ntp true

创建分区

  1. fdisk -l 查看当前
  2. fdisk /dev/sda 进入第一个磁盘

根据 -m 查看命令

分区格式化

  1. mkfs.ext4

挂载分区

  1. mount /dev/sda1 /mnt

安装系统软件

  1. pacstrap /mnt base linux linux-firmware base-devel networkmanager dhcpcd

生成fstab

  1. genfstab -U /mnt >> /mnt/etc/fstab

chroot

  1. arch-chroot /mnt

系统安装完成

设置时区时间

  1. ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
  2. hwclock --systohc

本地化

  1. vim /etc/locale.conf
  2. 放开:en_US.UTF-8 UTF-8 zh_CN.UTF-8 UTF-8
  3. 然后运行命令:locale-gen

配置系统网络属性

  1. vim /etc/hostname
  2. xiaohanqing
  3. vim /etc/hosts
  4. 127.0.0.1 localhost
  5. ::1 localhost

磁盘(非必须)

  1. mkinitcpio -P

设置root密码

  1. passwd

新建用户并添加sudo权限

  1. useradd -m xhq
  2. vim /etc/sudoers
  3. xhq ALL=(ALL) ALL

cpu微码,驱动

  1. pacman -S intel-ucode
  2. 驱动根据显卡型号查询安装

安装引导

  1. BIOS
  2. pacman -S grub
  3. grub-install --target=i386 /dev/sda
  4. grub-mkconfig -o /boot/grub/grub.cfg
  5. UEFI

开机自启网络相关服务(重要)

  1. systemctl enable dhcpcd.service
  2. systemctl enable NetworkManager.service

安装桌面

安装xfce4

  1. pacman -S xorg xfce4 xfce4-goodies lightdm lightdm-gtk-greeter
  2. systemctl enable lightdm(驱动装好之前不要运行)

启用archlinuxcn

国内镜像源:https://github.com/archlinuxcn/mirrorlist-repo

  1. vim /etc/pacman.conf
  2. [archlinuxcn]
  3. Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch

然后安装:archlinuxcn-keyring

安装zsh并使用oh-my-zsh

  1. sudo pacman -S git wget
  2. sudo pacman -S zsh
  3. chsh -s $(which zsh)
  4. sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
  5. vim ~/.zshrc 主题设置ys

安装软件

  1. pacman -S google-chrome firefox terminator yay plank fcitx fcitx-configtool fcitx-qt5 fcitx-rime

中文环境:(搜索Localization_(简体中文))

安装字体:

  1. pacman -S wqy-microhei wqy-microhei-lite wqy-bitmapfont wqy-zenhei ttf-arphic-ukai ttf-arphic-uming adobe-source-han-sans-cn-fonts adobe-source-han-serif-cn-fonts noto-fonts-cjk