# config **Repository Path**: wuli133144/config ## Basic Information - **Project Name**: config - **Description**: Archlinux+hyprland安装配置文件与常用软件。 15年以上Archlinux用户 - **Primary Language**: Shell - **License**: MulanPSL-1.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2024-08-02 - **Last Updated**: 2024-08-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Archlinux+hyprland

2022年4月3日

--- ![screenshot](./screenshot.png) ## 1.rufus制作U盘启动盘`使用dd模式,gpt,uefi启动` ```bash lsblk -l dd bs=4M if=path/to/archlinux-version-x86_64.iso of=/dev/disk/by-id/usb-My_flash_drive conv=fsync oflag=direct status=progress ``` ## 2.Verify the boot mode ```bash ls /sys/firmware/efi/efivars dhcpcd ``` ## 3.Update the system clock ```bash timedatectl set-ntp true ``` ### net setup ```bash ip link iwctl > 无线 ping archlinux.org ``` ## 4.Partition the disks ```bash fdisk -l fdisk /dev/sdaX > new GPT ``` |Mount point|Partition|Partition type|Size| |:---------:|:-------:|:------------:|:--:| |/mnt/boot | /dev/efi_system |fat32|300MiB| | [SWAP] | /dev/swap_partition | Linux swap | 4Gb| |/mnt|/dev/root_partition|ext4 root /|the device| ```bash mkfs.ext4 /dev/root_partition mkswap /dev/swap_partition mkfs.fat -F 32 /dev/efi_system_partition ``` ```bash #创建交换文件 #也可以使用dd命令 #dd if=if=/dev/zero of=/swapfile bs=1M count=512 status=progress fallocate -l 512M /swapfile chmod 600 /swapfile mkswap /swapfile swapon /swapfile vim /etc/fstab #添加文件系统信息 /swapfile none swap defaults 0 0 ``` ## 5.Mount the file systems ```bash vim /etc/pacman.conf 找到#Color,把#删掉 ``` ```bash mount /dev/root_partition /mnt mount --mkdir /dev/efi_system_partition /mnt/boot swapon /dev/swap_partition ``` ## 6.Installation ### Select the mirrors ```bash vim /etc/pacman.d/mirrorlist https://mirrors.aliyun.com/archlinux/$repo/os/$arch https://mirrors.cloud.tencent.com/archlinux/$repo/os/$arch https://repo.huaweicloud.com/archlinux/$repo/os/$arch ``` ### 安装系统 ```bash pacman -S archlinux-keyring #更新密钥链 pacstrap /mnt base linux linux-firmware ``` ### 生成Fstab文件 ```bash genfstab -U /mnt >> /mnt/etc/fstab ``` ## 7.setup ```bash vim /mnt/etc/hostname #Arch ``` ```bash vim /mnt/etc/hosts 127.0.0.1 localhost ::1 localhost 127.0.1.1 Arch.localdomain Arch ``` ## 8.Chroot ```bash arch-chroot /mnt passwd pacman -S vim sudo ``` ```bash #新建用户 useradd -m -G wheel hyyu passwd hyyu 把%wheel ALL=(ALL)ALL的注释取消 ### Time zone ```bash ln -sf /usr/share/zoneinfo/Asia/chongging /etc/localtime hwclock --systohc timedatectl set-local-rtc 1 /set RTC time ``` ### Lang and Keymap ```bash vim /etc/local.gen en_US.UTF-8 en_UTF-8 zh-cn.UTF-8 locale-gen vim /etc/locale.conf LANG=en_US.UTF-8 vim /etc/vconsole.conf KEYMAP=us ``` ## 9.更新安装软件 ```bash pacman -Syu pacman -S git gcc pkgconf xorg-xwayland wayland xorg-xinit wpa_supplicant dhcpcd man make systemctl enable dhcpcd useradd -m -G wheel hyyu passwd hyyu pacman -Suyy(全部更新) pacman -Syu --ignore one --ignore two ln -s /usr/bin/vim /usr/bin/vi ``` ### 给sudo加权限 ```bash visudo %wheel ALL=(ALL:ALL) ALL ``` ## 10.系统引导启动 `intel改amd-ucode为intel-ucode` ```bash pacman -S grub efibootmgr amd-ucode os-prober ``` ### 确定系统架构X86_64 ```bash uname -m ``` ### 部署grub ```bash grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Arch mkdir /boot/grub grub-mkconfig -o /boot/grub/grub.cfg #每次升级后执行一次此命令,更新内核至最新 ``` ## 11.hyprland+apps ### reboot ```bash sudo pacman -S hyprland base-devel swaybg wofi nwg-look nwg-draw mako grim slurp waybar grim -g "$(slurp)"#screenshot ``` ### aur安装 Install paru: git clone https://aur.archlinux.org/paru-git cd paru-git makepkg -si ```bash git clone https://aur.archlinux.org/app.git cd appdir makepkg pacman -U *.tar.zst ``` ### archlinuxcn ```bash vim /etc/pacman.conf [archlinuxcn] Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch ``` ```bash sudo pacman -S archlinuxcn-keying archlinuxcn-mirrorlist-git ``` ### Internet - Vivaldi-stable - deepin-network-utils - wedoc - wechat-universal-bwrap - wemeet - linuxqq - you-get/下载网络视频 ### multimedia - Handbrake-视频转换 - Audacity - Inkscape - Blender - Gimp/gmic for gimp - hugin-全景图合成 - darktable-raw图片编辑 - Krita - Xnviewmp - qqmusic-bin - pulsemixer - pipewire/pipewire-pulse - etcher - OBS Studio-录屏 - final2x/图片无损放大修复高清 ### Documents - fcitx5 - wps-office-cn - libreoffice - dupeguru\fdupes #diff file - catfish\快速查找文件 - eudic #欧路词典 - drawio\流程图 - Mupdf\mupdf-tools\mutool ```bash mutool merge *.pdf mutool merge -o out.pdf 1.pdf 2.pdf mutool draw -o out.pdf *.jpg mutool draw -F pdf in.pdf 1,3 mutool draw -r 300 1-%d.jpg in.pdf mutool draw -F txt -o 1.txt in.pdf 2,3 mutool convert -o image%d.png in.pdf 1-10 mutool convert -o out.pdf *.png ``` - todesk\rustdesk \远程桌面服务 - Masterpdfeditor-free - zwcad/gstarcad - zw3d-bin - XCHM\chm文件查看器 - pcmanfm/nautilus - zettl/ghostwriter #markdown editor ### Security - clamav ```bash sudo freshclam sudo clamd clamscan ``` - veracrypt /加密文档 ### Fonts - DejaVuSanSMono - Hack - AlibabaPuHuiTi - simsun - simhei ### Utilities - 左右键切换(xorg) ```bash xmodmap -e 'pointer = 3 2 1' xmodmap -e 'pointer = 1 2 3' ``` - Pcmanfm - file-roller /zstd/unrar/unzip #压缩管理 - yazi/ranger - [fish](https://wiki.archlinux.org/title/Fish) ```bash fish_config fish_update_completions sudo !! ``` - vicode 'code' - deskreen # Turns any device with browser to a second screen - weylus # Use tablet as graphic touch screen on computer. - deepin-terminal - ntfs3-dkms - dnsmasq - pure-ftpd ```bash pacman -S bind dig archlinux.org #test dns ``` - git ```bash git clone git@gitee.com:yuri/config.git #use ssh, don't use https git pull git add . #put all git commit -m "update" git push origin master ``` - exFAT ```bash pacman -S exfatprogs mkfs.exfat ``` ### Other - deepin-printer/cups/gutenprint - timeshift - usbutils - sd #替代sed - awk ```bash lsusb ``` - fd: Alternative find ```bash fd name fd name | grep .pdf ``` - ncdu: Alternative du - eza: Alternative ls - aria2/aria2c - Duf:Alternative df - Tldr:Alternative man - ln - pacman -Sc #清理未安装软件包 - pacman -Scc #清理缓存中所有内容 ```bash ln -s $HOME/dotfile/fish/config $Home/.config/fish/ ``` - deepin-icon-theme ``` paru -S deepin-icon-theme vim ~/.gtkrc-2.0 gtk-icon-theme-name = "Papirus" ``` ```bash ./verysync folder add ./verysync folder list ``` ```bash pdfcrack -f filename.pdf -n 6 -m 8 -c 0123456789 -s #-s 尝试排列密码(目前仅限)支持第一个字符切换为大写) pdfcrack -f input.pdf -o -n 6 -m 8 -c 123456 #-o ownerpassword(权限密码) -u userpassword(用户密码,有此密码无法查看文件) pdfcrack -f high.pdf -w passwork.txt qpdf --decrypt input.pdf output.pdf #清除权限密码 crunch 6 6 -t pass%% -o pwd.txt #@:小写字母 ,:大写字母 %:数字 ^:符号 ``` ```bash time 命令 #统计命令运行时间 ``` ```bash #配置文件.vimrc set hlsearch #高亮search syntax on #语法检查 set cursorline set number set incsearch set mouse=a ``` ### 有问题的处理方式 `进入usb-livecd` ```bash arch-chroot /mnt ``` ```bash badlocks -v /dev/sda1 >> bads.txt smartctl -H /dev/sda1 ``` ### markdown ``` ####
标题 字体颜色、大小、字体类型 ``` ```  :输入一个空格  :输入一个空格  :输入两个空格   积土成山 ``` - 居中 ```html
内容

内容

内容
- 空白行

```