[关闭]
@mfyx 2020-08-30T16:10:09.000000Z 字数 2846 阅读 352

arch

(GPT引导)

安装

检查

检查磁盘:fdisk -l
检查网络:ping www.baidu.com
联网:wifi-menu
是否支持UEFI:ls /sys/firmware/efi/
调整字体:setfont /usr/share/kbd/consolefonts/iso01-12x22.psfu.gz

创建&挂载 分区

  1. cfdisk
  2. (我是用这个分区的,不过还有其他的创建分区的方法)
  3. gpt
  4. 创建分区(New
  5. 写入分区(Write
  6. 退出(Quit
  7. mkfs.fat -F32 /dev/sda1
  8. mkfs.ext4 /dev/sda2
  9. mkswap /dev/sda3
  10. swapon /dev/sda3
  11. mount /dev/sda2 /mnt
  12. mkdir -p /mnt/boot/efi
  13. mount /dev/sda1 /mnt/boot/efi

配置软件源

  1. vim /etc/pacman.d/mirrorlist
  2. /China (搜索China
  3. 2dd (剪切)
  4. gg (回到开头)
  5. p (粘贴)
  6. 以上操作连续执行几次,把多个China源放到文件开头
  7. pacman -Sy

安装基础系统

  1. pacstrap /mnt base base-devel linux linux-firmware
  2. genfstab -U /mnt >> /mnt/etc/fstab
  3. arch-chroot /mnt

安装引导

  1. pacman -S grub efibootmgr vim
  2. grub-install /dev/sda
  3. grub-mkconfig -o /boot/grub/grub.cfg

联网

  1. pacman -S dhcpcd iw wpa_supplicant dialog netctl
  2. pacman -S vim
  3. echo *myhostname* > /etc/hostname
  4. vim /etc/hosts
  5. 127.0.0.1 localhost
  6. ::1 localhost
  7. 127.0.1.1 *myhostname*.localdomain *myhostname*
  8. wifi-menu

配置编码

  1. vim /etc/locale.gen
  2. (去掉以下两行的注释)
  3. en_US.UTF-8 UTF-8
  4. zh_CN.UTF-8 UTF-8
  5. locale-gen
  6. echo LANG=en_US.UTF-8 > /etc/locale.conf

再配置软件源

  1. vim /etc/pacman.conf
  2. (在最后添加)
  3. [archlinuxcn]
  4. Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch
  5. pacman -Sy archlinuxcn-keyring

创建用户

  1. passwd root
  2. useradd -m -g users -G wheel -s /bin/bash mfyx
  3. passwd mfyx
  4. vim /etc/sudoers
  5. %wheel ALL=(ALL) ALL

其他配置

时区

ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

字体

pacman -S ttf-dejavu wqy-microhei wqy-zenhei adobe-source-code-pro-fonts

Microcode

AMD处理器:pacman -S amd-ucode
Intel处理器:pacman -S intel-ucode
U盘安装:我全都要

多系统驱动

pacman -S os-prober
(怎么用还没完全搞懂)

使用AUR

pacman -S yaourt

完成安装

  1. exit
  2. umount /mnt
  3. reboot

配置 arch

显示服务

显卡安装

AMD显卡:sudo pacman -S xf86-video-amdgpu
Intel显卡:sudo pacman -S xf86-video-intel
NVIDIA显卡:sudo pacman -S xf86-video-nouveau

Xorg

  1. sudo pacman -S xorg-server xorg-xinit mesa
  2. sudo pacman -S xorg-twm xorg-xclock xterm
  3. sudo startx
  4. exit
  5. sudo cp /etc/X11/xinit/xinitrc ~/.xinitrc

窗口管理器

  1. yaourt dwm
  2. 3
  3. vim ~/.xinitrc
  4. (注释掉后五行,加上:
  5. exec dwm
  6. (对 /etc/X11/xinit/xinitrc 进行同样的操作)
  7. (默认执行的是xinit下的xinitrc,使用登录管理器后才会执行家目录下的xinitrc
  8. chmod +x ~/.xinitrc

显示管理器

  1. sudo pacman -S slim slim-themes
  2. sudo systemctl enable slim.service

配置输入法

  1. pacman -S fcitx fcitx-im fcitx-configtool fcitx-rime
  2. vim ~/.xprofile
  3. export GTK_IM_MODULE=fcitx
  4. export QT_IM_MODULE=fcitx
  5. export XMODIFIERS="@im=fcitx"

配置声音

  1. pacman -S alsa-utils
  2. alsamixer
  3. (左右键移动,上下键改变声音大小,m键解除静音)

常用软件安装

终端:sudo pacman -S alacritty terminator
编辑器:sudo pacman -S vim neovim emacs code atom
浏览器:sudo pacman -S surf firefox google-chrome chromium
其他:pacman -S git ranger fish compton redshift variety rofi i3
办公:yaourt wps-office
聊天:yaourt linuxqq
音乐:yaourt netease-cloud-music
视频:pacman -S vlc
代理:pacman -S lantern-bin


配置 work flow

slim

切换会话:F1

dwm

  1. git clone https://git.suckless.org/dwm
  2. cd dwm
  3. cp config.def.h config.h
  4. (改字体,改快捷键)

wait

st

  1. git clone https://git.suckless.org/st
  2. cd st
  3. cp config.def.h config.h
  4. (改字体,改主题)

wait

surf

wait

fish

  1. sudo pacman -S fish
  2. curl -l https://get.oh-my.fish | fish
  3. fish_config
  4. which fish
  5. chsh -s /usr/bin/fish

dotfiles

compton

wait

vim

  1. # vim ~/.vim/vimrc
  2. syntax on
  3. set number
  4. set scrolloff=7
  5. set tabstop=4

xmodmap

wait

xinitrc

wait

git

  1. git config --global user.name mfyxyz
  2. git config --global user.email mfyxyz@outlook.com

Other

dmenu

wait

tabbed

wait

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注