2023年1月1日arch镜像安装+dwm配置,双系统 |
您所在的位置:网站首页 › Arch安装 › 2023年1月1日arch镜像安装+dwm配置,双系统 |
指令参考了许多教程,来源有官方wiki,csdn,知乎,bilibili。 感谢他们的分享_(:з」∠)_ 建议参照官方wiki的安装教程和b站上的视频使用。 我的配置是双系统,win10+arch linux win10的安装就不附上了,如果也是双系统的,可以先装win10,再装arch。 //如果单系统安装arch,挂载EFI分区的时候可能跟我不一样,切记。 最后,本文仅供参考。 - Win10: #硬盘分区中,EFI的大小设置为512MB,4096扇区 Arch_Linux 0.验证引导模式 > ls /sys/firmware/efi/efivars 1.连接互联网 > rfkill list > rfkill unblock wifi > ip link > ip link set wlan0 up > iwctl > station wlan0 scan > station wlan0 get-networks >station wlan0 connect XXX(wifi名称) > exit > dhcpcd > ping baidu.com 2.同步时间 > timedatectl set-ntp true > timedatectl status 3.分区 > fdisk -l > fdisk /dev/XXX(硬盘名字) > n > X(default的数字+1) > 回车 > +8G > n > 回车 > 回车 > 回车 > p > w > mkfs.ext4 /dev/XXX(根目录)【我的是5】 > mkswap /dev/XX (交换分区,8G那个分区)【6】 > swapon /dev/XX(交换分区)【6】 > fdisk -l > mount /dev/XXX /mnt (挂载根分区)【5】 > mkdir /mnt/boot > mount /dev/X /mnt/boot (挂载EFI分区) 【1】 4.安装系统 > vim /etc/pacman.d/mirrorlist 设置镜像 > Server = https://mirrors.ustc.edu.cn/archlinuxcn/$repo/os/$arch > pacman -Syy > pacman-key --refresh-keys (十分钟左右,就可以ctrl+C强制退出了,不影响) > pacstrap -K /mnt base base-devel linux linux-firmware vim git amd-ucode 5.配置系统 > genfstab -U /mnt >> /mnt/etc/fstab > cat /mnt/etc/fstab > arch-chroot /mnt > ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime > hwclok --systohc > vim /etc/locale.gen 去掉en_US.UTF-8 UTF-8 的注释 > locale-gen > echo.UTF-8 >> /etc/locale.conf > echo luo >> /etc/hostname (luo是我的主机名,可以按照自己喜好) > vim /etc/hosts 输入下述内容: 127.0.0.1 localhost #中间隔着的是tab键 ::1 localhost 127.0.1.1 luo.localdomain luo #主机名 > pacman -S networkmanager netctl wpa_supplicant > systemctl enable NetworkManager > systemctl disable netctl 6.设置用户 >passwd > useradd -m -g users -G wheel xinluo #我的用户名为xinluo > passwd xinluo > pacman -S vi > visudo 往下翻找到 “Uncomment to allow members of group to execute any command” 将下面一行 %wheel 前的注释符(#)删去。 7..grub引导 > pacman -S grub efibootmgr os-prober > vim /etc/default/grub 去掉GRUB_DISABLE_OS_PROBER=false的注释 > uname -m > grub-install --targt=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB > grub-mkconfig -o /boot/grub/grub.cfg >exit > umount -R /mnt > reboot 完结✿✿ヽ(°▽°)ノ✿ 8.配置archlinuxcn源 > sudo vim /etc/pacman.conf 去掉 color 和multib 和multlib下一行 的注释 文件末尾,添加两行: [archlinuxcn] Server = https://mirrors.ustc.edu.cn/archlinux/$arch > sudo pacman -Syy > sudo pacman -Syu haveged > sudo systemctl start haveged > sudo systemctl enable haveged > sudo rm -rf /etc/pacman.d/gnupg > suudo pacman-key --init > sudo pacman-key --populate archlinux > sudo pacman -S archlinuxcn-keyring 9.安装驱动 > sudo pacman -S xf86-video-amdgpu mesa > sudo pacman -S nvidia nvidia-settings nvidia-utils > sudo pacman -S optimus-manager > sudo pacman -S yay > yay -S optimus-manager-qt > sudo systemctl enable optimus-manager.service > sudo pacman -S alsa-utils pulseaudio pulseaudio-bluetooth cups bluez bluez-utils > sudo systemctl enable bluetooth > sudo systemctl enable cups > sudo systemctl enable fstrim.timer 10.安装dwm > sudo pacman -S xorg-apps xorg-xinit xorg-server >sudo pacman -S noto-fonts noto-fonts-emoji noto-fonts-cjk wqy-microhei wqy-zenhei ttf-dejavu > git clone https://git.suckless.org/dwm > cd dwm > sudo make clean install > cd > sudo vim ~/.xinitrc 添加这行内容 exec dwm > cd > git clone https://git.suckless.org/st > cd st > sudo vim config.mk 修改文件,成这样: X11NC = /usr/include/X11 X11LIB = /usr/include/X11
> sudo make clean install > cd > sudo pacman -S dmenu > cd dmenu > sudo make clean install > cd > sudo cat /etc/shells > echo $SHELL > pacman -S neofetch ranger zsh zsh-autosuggestions zsh-syntax-highlighting zsh-completions oh-my-zsh-git > cp /usr/share/oh-my-zsh/zshrc ~/.zshrc > chsh -s /bin/zsh > vim ~/.zshrc 添加以下内容 source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh >sudo reboot 11.安装fcitx5中文输入法 > sudo pacman -S fcitx5-im fcitx5-chinese-addons fcitx5-chewing fcitx5-qt fcitx5-gtk fctix5-configtool fcitx5-pinyin-zhwiki > sudo vim /etc/environment 添加以下内容: GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx SDL_IM_MODULE=fcitx GLFW_IM_MODULE=ibus > sudo vim ~/.xinitrc 添加以下内容 fcitx5 & (在exac dwm 之前) > sudo reboot > sudo fcitx5-configtool #在fcitx5-configtool -> addons -> input Method(pinyin) -> Dictionaries -> configure 查看安装的离线字库。 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |