@mfyx
2020-08-30T16:10:09.000000Z
字数 2846
阅读 352
(GPT引导)
检查磁盘:fdisk -l
检查网络:ping www.baidu.com
联网:wifi-menu
是否支持UEFI:ls /sys/firmware/efi/
调整字体:setfont /usr/share/kbd/consolefonts/iso01-12x22.psfu.gz
cfdisk
(我是用这个分区的,不过还有其他的创建分区的方法)
选gpt
创建分区(New)
写入分区(Write)
退出(Quit)
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
mkswap /dev/sda3
swapon /dev/sda3
mount /dev/sda2 /mnt
mkdir -p /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efi
vim /etc/pacman.d/mirrorlist
/China (搜索China)
2dd (剪切)
gg (回到开头)
p (粘贴)
以上操作连续执行几次,把多个China源放到文件开头
pacman -Sy
pacstrap /mnt base base-devel linux linux-firmware
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
pacman -S grub efibootmgr vim
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
pacman -S dhcpcd iw wpa_supplicant dialog netctl
pacman -S vim
echo *myhostname* > /etc/hostname
vim /etc/hosts
127.0.0.1 localhost
::1 localhost
127.0.1.1 *myhostname*.localdomain *myhostname*
wifi-menu
vim /etc/locale.gen
(去掉以下两行的注释)
en_US.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
vim /etc/pacman.conf
(在最后添加)
[archlinuxcn]
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch
pacman -Sy archlinuxcn-keyring
passwd root
useradd -m -g users -G wheel -s /bin/bash mfyx
passwd mfyx
vim /etc/sudoers
%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
AMD处理器:pacman -S amd-ucode
Intel处理器:pacman -S intel-ucode
U盘安装:我全都要
pacman -S os-prober
(怎么用还没完全搞懂)
pacman -S yaourt
exit
umount /mnt
reboot
AMD显卡:sudo pacman -S xf86-video-amdgpu
Intel显卡:sudo pacman -S xf86-video-intel
NVIDIA显卡:sudo pacman -S xf86-video-nouveau
sudo pacman -S xorg-server xorg-xinit mesa
sudo pacman -S xorg-twm xorg-xclock xterm
sudo startx
exit
sudo cp /etc/X11/xinit/xinitrc ~/.xinitrc
yaourt dwm
3
vim ~/.xinitrc
(注释掉后五行,加上:
exec dwm
(对 /etc/X11/xinit/xinitrc 进行同样的操作)
(默认执行的是xinit下的xinitrc,使用登录管理器后才会执行家目录下的xinitrc
chmod +x ~/.xinitrc
sudo pacman -S slim slim-themes
sudo systemctl enable slim.service
pacman -S fcitx fcitx-im fcitx-configtool fcitx-rime
vim ~/.xprofile
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
pacman -S alsa-utils
alsamixer
(左右键移动,上下键改变声音大小,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
切换会话:F1
git clone https://git.suckless.org/dwm
cd dwm
cp config.def.h config.h
(改字体,改快捷键)
wait
git clone https://git.suckless.org/st
cd st
cp config.def.h config.h
(改字体,改主题)
wait
wait
sudo pacman -S fish
curl -l https://get.oh-my.fish | fish
fish_config
which fish
chsh -s /usr/bin/fish
wait
# vim ~/.vim/vimrc
syntax on
set number
set scrolloff=7
set tabstop=4
wait
wait
git config --global user.name mfyxyz
git config --global user.email mfyxyz@outlook.com
wait
wait