- 联网 - ``` iwctl station wlan0 scan station wlan0 connect CMCC-jF3w-5G ``` - 更新时间 - ``` timedatectl ``` - 分区 - ``` fdisk -l # EFI /mnt/boot 300M # SWAP 8G # /mnt space left # Format mkfs.ext4 /dev/root_partition # use mkfs.btrfs mkswap /dev/swap_partition mkfs.fat -F 32 /dev/efi_system_partition ``` - 挂载 - ``` mount /dev/root_partition /mnt mount --mkdir /dev/efi_system_partition /mnt/boot swapon /dev/swap_partition ``` - 修改镜像源 - ``` vim /etc/pacman.d/mirrorlist Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch # 安装完成后添加archlinuxcn源 vim /etc/pacman.conf [archlinuxcn] Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch sudo pacman -Sy archlinuxcn-keyring ``` - 安装基础软件 - ``` pacstrap -K /mnt base linux linux-firmware base-devel networkmanager vim vi sudo ufw git wget curl ``` - 配置系统 - ``` genfstab -U /mnt >> /mnt/etc/fstab arch-chroot /mnt ln -sf /usr/share/zoneinfo/Region/City /etc/localtime hwclock --systohc vim /etc/locale.gen # en_US.UTF-8 UTF-8 # zh_CN.UTF-8 UTF-8 locale-gen vim /etc/locale.conf # LANG=en_US.UTF-8 vim /etc/hostname # arch hostname passwd useradd -m -G wheel,video lostecho passwd lostecho vim /etc/sudoers # %wheel ALL=(ALL:ALL) NOPASSWORD: ALL # 添加用户到组 sudo usermod -a -G groupname username ``` - bootloader - ``` pacman -S grub efibootmgr intel-ucode grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB grub-mkconfig -o /boot/grub/grub.cfg ``` - reboot - 联网 - ``` sudo systemctl enable NetworkManager sudo systemctl start NetworkManager nmcli device wifi list nmcli device wifi connect ** password ** ``` - 添加archlinuxcn zsh - ssh - ``` ufw status ufw enable ufw allow in ssh sudo pacman -S openssh sudo systemctl enable sshd sudo systemctl start sshd ``` - missing firmware for module - ``` yay -S mkinitcpio-firmware ``` - 背光调节 - ``` sudo pacman -S pcielight xf86-video-intel vim /etc/udev/rules.d/backlight.rules ---------- ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chgrp video $sys$devpath/brightness", RUN+="/bin/chmod g+w $sys$devpath/brightness" ``` - docker #docker - ``` sudo pamcan -S docker # 取消sudo sudo gpassed -a $USER docker newgrp docker ``` - 输入法 - ``` sudo pacman -S fcitx5-im fcitx5-chinese-addons fcitx5-material-color sudo pacman -S nerd-fonts-complete noto-fonts noto-fonts-emoji adobe-source-han-sans-cn-fonts adobe-source-han-serif-cn-fonts noto-fonts-cjk wqy-microhei wqy-microhei-lite wqy-bitmapfont wqy-zenhei ttf-arphic-ukai ttf-arphic-uming yay -S fcitx5-input-support # 修改中文 .zshrc export LANG=zh_CN.UTF-8 export LANGUAGE=zh_CN:en_US ``` - 安装hyprland - ``` yay -S hyprland-git kitty hyprpaper dunst polkit-kde-agent paru -S waybar-hyprland wofi # 其他软件 sudo pacman -S xf86-video-intel nautilus 7-zip-full neofetch acpilight ``` - 安装编程语言 - ``` sudo pacman -S ruby go jdk17-openjdk python python-pip nodejs npm clang cargo vscode ``` - 其他软件 - ``` yay -S okular kate obsidian logseq-desktop firefox google-chrome kuro ```