更新于2021.1
一、基本系统安装
前置准备
Disable BIOS Secure Boot
设置tty字体
setfont ter-132n
首次连接网络
iwctl
device list
station wlan0 scan
station wlan0 get-networks
station wlan0 connect SSID
quit
设置系统时间
timedatectl set-ntp true
格式化并挂载分区
lsblk
格式化根分区:
mkfs.btrfs -f -L Arch /dev/sdaX
挂载根分区:
mount /dev/sdaX /mnt
格式化ESP分区:
mkfs.vfat /dev/sdaY
挂载ESP分区:
mkdir /mnt/boot
mount /dev/sdaY /mnt/boot
安装系统基础软件包
pacstrap /mnt base base-devel linux linux-firmware btrfs-progs dosfstools intel-ucode efibootmgr fish iwd neovim
生成fstab
genfstab -U /mnt >> /mnt/etc/fstab
cat /mnt/etc/fstab
进入新系统
arch-chroot /mnt
时区
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock --systohc
本地化
nvim /etc/locale.gen
en_US.UTF-8 UTF-8
ja_JP.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
主机名
echo matebook > /etc/hostname
hosts
nvim /etc/hosts
127.0.0.1 localhost
::1 localhost
127.0.0.1 matebook.localdomain matebook
配置initramfs参数
nvim /etc/mkinitcpio.conf
HOOKS=(添加 btrfs)
mkinitcpio -P
设置root密码
passwd
安装引导程序
可在nvim中执行:r !blkid -s PARTUUID -o value /dev/sdaX
以获取根分区PARTUUID
bootctl --path=/boot install
nvim /boot/loader/loader.conf
timeout 0
default arch
nvim /boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=PARTUUID=598a6da7-fe58-42c6-a0e4-c21170aeaa6d rw rootflags=subvol=/
重启
exit
reboot
重新连接网络
systemctl enable --now systemd-networkd.service
systemctl enable --now systemd-resolved.service
systemctl enable --now iwd.service
nvim /etc/iwd/main.conf
[General]
EnableNetworkConfiguration=true
[Network]
NameResolvingService=systemd
systemctl restart iwd.service
iwctl
添加新用户
useradd -mG wheel,video,input huizhi
passwd huizhi
nvim /etc/sudoers
去掉# %wheel ALL=(ALL)ALL 之前的注释符#
二、图形界面安装
显示
pacman -S mesa vulkan-intel intel-media-driver light
声音
r
终端
pacman -S alacritty
启动器
pacman -S rofi
切换用户
su huizhi
cd
HiDPI
nvim ~/.Xresources
Xft.dpi: 120
xinitrc
nvim ~/.xinitrc
xrdb -merge ~/.Xresources
export LANG=zh_CN.UTF-8
exec bspwm
基础配置文件
mkdir -p .config/bspwm
cp /usr/share/doc/bspwm/examples/bspwmrc .config/bspwm
mkdir .config/sxhkd
cp /usr/share/doc/bspwm/examples/sxhkdrc .config/sxhkd
nvim .config/sxhkd/sxhkdrc
uxrvt ==> alacritty -e fish
dmenu ==> rofi -show drun
字体
sudo pacman -S ttf-sarasa-gothic adobe-source-han-serif-otc-fonts noto-fonts-emoji
重启
sudo reboot
使用普通用户登陆
启动图形界面
startx
三、软件清单
浏览器
sudo pacman -S firefox firefox-i18n-zh-cn
源
修改镜像列表:
sudo nvim /etc/pacman.d/mirrorlist
Server = https://mirrors.xjtu.edu.cn/archlinux/$repo/os/$arch
Server = https://mirrors.bfsu.edu.cn/archlinux/$repo/os/$arch
Archlinuxcn源 & pacman 颜色支持:
sudo vim /etc/pacman.conf
Color
[archlinuxcn]
Server = https://mirrors.xjtu.edu.cn/archlinuxcn/$arch
sudo pacman -Syy && sudo pacman -S archlinuxcn-keyring
AUR:
sudo pacman -S paru
代理
clash proxychains-ng
通讯
telegram-desktop
在线音乐
netease-cloud-music-gtk
在线会议
zoom
(AUR)
下载工具
youtube-dl vdhcoapp
xunlei-bin
(AUR)
网盘
nutstore
局域网ftp文件共享
vsftpd
局域网http媒体中心
nginx
壁纸
hsetroot
面板
polybar
合成器
picom
屏幕色温调节
redshift
锁屏
xsecurelock
通知
dunst
输入法
ibus ibus-rime ibus-mozc
文件管理
nautilus ffmpegthumbnailer udiskie gvfs-mtp fuse2 file-roller p7zip unrar rsync tree
nautilus-open-any-terminal
(AUR)
图片浏览器
viewnior
音乐播放器
deadbeaf
视频播放器
mpv
截图
imagemagick
录屏
obs-studio
图像编辑
gimp
视频剪辑
pitivi libpeas frei0r-plugins gst-libav gst-plugins-ugly
剪贴板管理器
xclip
rofi-greenclip
(AUR)
办公
wps-office wps-office-mui-zh-cn wps-office-mime
(AUR)
ttf-wps-fonts
流程图
drawio-desktop-bin
笔记
typora
博客
hugo
开发
git code
nodejs-nativefier
(AUR)
Android
android-tools scrcpy
虚拟机
virtualbox
如内核为linux
,内核模块应安装virtualbox-host-modules-arch
系统信息
neofetch
自动化
cronie
主题美化
arc-gtk-theme lxappearance-gtk3
qogir-icon-theme
(AUR)
文档
man-db man-pages
设置默认程序
selectdefaultapplication-git
(AUR)