#同步與更新 pacman -Sy #同步源 pacman -Su #更新系統 pacman -Syu #同步源並更新系統 pacman -Su --ignore plasma #不更新plasma #安裝軟件 pacman -S plasma-desktop pacman -S plasma-{desktop,nm} #Enter a selection (default=all): 1-10 15 #選中序號 1 至 10 和 15 的軟件包 #Enter a selection (default=all): ^5-8 ^2 #選中除了序號 5 至 8 和 2 以外的全部軟件包 pacman -Sw package_name #下載不安裝 pacman -U /path/pkg.tar.gz #安裝本地包 #卸載軟件 pacman -R package_name #刪除單個軟件包,保留其所有已經安裝的依賴關係 pacman -Rs package_name #刪除指定軟件包,及其全部沒有被其餘已安裝軟件包使用的依賴關係 #查詢 pacman -Q #查詢已安裝軟件包 pacman -Q plasma #查看plasma包是否已經安裝 pacman -Qi plasma #查看已安裝的包plasma的詳細信息 pacman -Ql plasma #列出已安裝包plasma的全部文件 pacman -Qo /etc/passwd #查找某個文件屬於哪一個包 pacman -Ss plasma #搜索plasma相關的包
sudo journalctl --vacuum-time=1s sudo journalctl sudo journalctl -p err
/boot/EFI /dev/sdX1 #512MB 啓動目錄 [SWAP] /dev/sdX2 #交換區 內存的兩倍 / /dev/sdX3 #200G 根目錄 /w /dev/sdX4 #剩餘全部空間 工做目錄 cfdisk /dev/sdX mkfs.fat /dev/sdX1 mkfs.ext4 /dev/sdX3 mkfs.ext4 /dev/sdX4 mkswap /dev/sdX2 mount /dev/sdX3 /mnt mkdir -p /mnt/boot/EFI mount /dev/sdX1 /mnt/boot/EFI mkdir /mnt/w mount /dev/sdX4 /mnt/w swapon /dev/sdX2
timedatectl set-ntp true
sed -i '/China/!{n;/Server/s/^/#/};t;n' /etc/pacman.d/mirrorlist nano /etc/pacman.d/mirrorlist #1.[F6] 搜索 china #2.[方向鍵] 移動光標至 Server 行 #3.[CTRL+K] 剪切該行 #4.[方向鍵] 移動光標至其餘 Server 行前 #5.[CTRL+U] 粘貼至此行 #6.[CTRL+O] 保存,[回車鍵] 肯定
pacstrap /mnt base base-devel
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock --systohc --localtime
nano /etc/locale.gen en_US.UTF-8 UTF-8 zh_CN.UTF-8 UTF-8 zh_HK.UTF-8 UTF-8 locale-gen nano /etc/locale.conf LANG=en_US.UTF-8
echo hostname > /etc/hostname systemctl start dhcpcd@en0
passwd
pacman -S dosfstools grub efibootmgr grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=GRUB grub-mkconfig -o /boot/grub/grub.cfg
pacman -S grub os-prober grub-install --target=i386-pc /dev/sdX grub-mkconfig -o /boot/grub/grub.cfg
節點狀態linux
nano /etc/pacman.d/mirrorlist Server = https://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch Server = http://mirrors.163.com/archlinux/$repo/os/$arch
exit umount -R /mnt/w umount -R /mnt reboot
useradd -m -g users -G wheel,lp,sys,network,power -s /bin/bash fex passwd fex EDITOR=nano visudo Defaults:fex rootpw Defaults:fex timestamp_timeout=20 fex ALL=(ALL) ALL
pacman -S bumblebee mesa xf86-video-intel nvidia pacman -S xorg-server
pacman -S xf86-input-libinput
pacman -S xf86-input-synaptics
pacman -S plasma-desktop pacman -S kdebase
pacman -S sddm pacman -S ssdm-kcm systemctl enable sddm
pacman -S ttf-{dejavu,liberation} wqy-microhei
pacman -S alsa-utils pulseaudio pulseaudio-alsa kmix
pacman -S net-tools networkmanager plasma-nm systemctl enable NetworkManager
pacman -S bluez bluez-utils Bluedevil systemctl enable bluetooth
pacman -S git git clone https://aur.archlinux.org/yay.git cd yay makepkg -si
yay -S lenovo-throttling-fix-git sudo systemctl enable --now lenovo_fix.service
sudo pacman -S acpi acpid tlp powertop tp_smapi acpi_call sudo systemctl enable tlp sudo systemctl enable tlp-sleep sudo systemctl enable acpid sudo nano /etc/systemd/system/powertop.service [Unit] Description=Powertop tunings [Service] ExecStart=/usr/bin/powertop --auto-tune RemainAfterExit=true [Install] WantedBy=multi-user.target sudo systemctl enable powertop
yay -S phoronix-test-suite phoronix-test-suite list-tests #顯示全部支持的測試類型 phoronix-test-suite benchmark smallpt #運行smallpt測試 phoronix-test-suite list-installed-test #顯示全部測試 phoronix-test-suite remove-installed-test tiobench #刪除name測試 phoronix-test-suite list-saved-results #顯示全部測試結果 phoronix-test-suite show-result savename #查看保存名字爲savename結果 phoronix-test-suite remove-result savename #刪除保存名字爲savename結