安装环境
Vbox新建虚拟机
安装arch系统
- 确定联网
1 | ping -c 3 baidu.com |
- 更新系统时间
1 | timedatectl set-ntp true |
- 硬盘分区
1 | fdisk /dev/sda |
- 格式化分区
1 | mkfs.ext4 /dev/sda1 |
- 挂载分区
1 | mount /dev/sda1 /mnt |
- 设置软件源
1 | vim /etc/pacman.d/mirrorlist |
地址:https://developer.aliyun.com/mirror/archlinux
1 | Server = http://mirrors.aliyun.com/archlinux/$repo/os/$arch |
- 安装基本的系统
1 | pacstrap /mnt base base-devel linux linux-firmware dhcpcd |
- 开机自动挂载磁盘分区
1 | genfstab -U /mnt >> /mnt/etc/fstab |
- 切换到新系统
1 | arch-chroot /mnt |
- 安装vim
1 | pacman -S vim --noconfirm |
- 设置时区
1 | ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime |
1 | hwclock --systohc |
- 设置本地化文本编码
1 | vi /etc/locale.gen |
去掉zh_CN.UTF-8 UTF-8、en_US.UTF-8 UTF-8,行首的#号
1 | locale-gen |
1 | vi /etc/locale.conf |
加入LANG=en_US.UTF-8
- 设置主机名
1 | vi /etc/hostname |
- 配置hosts文件
1 | vi /etc/hosts |
- 用户账户配置
1 | passwd |
1 | useradd -m scott |
1 | passwd scott |
- 安装grub设置引导
1 | pacman -S intel-ucode |
1 | pacman -S grub |
1 | grub-install --recheck /dev/sda |
1 | grub-mkconfig -o /boot/grub/grub.cfg |
安装完毕
1 | exit |
1 | reboot |
参考:
https://www.viseator.com/2017/05/17/arch_install/
https://starrycat.me/archlinux-install-gnome-desktop.html
https://linux.cn/article-8305-1.html
https://www.jianshu.com/p/7c78dc4c53e5
https://www.jianshu.com/p/fe2165cc6af8
https://www.jianshu.com/p/47f315a408b6