安装 archlinux rfkill unblock 网卡名 打开wifi
https://wk.baidu.com/view/9666b35ba16925c52cc58bd63186bceb18e8ed51?_wkts_=1678008300143&bdQuery=archlinux中文乱码解决
archlinux 安装chrome浏览器_archlinux chrome_ITKEY_的博客-CSDN博客 chromium虽然也可以用,但是无法同步数据,不方便。那么怎么可以安装chrome并且可以同步数据的那种呢?如何安装 yay依次运行以下命令以在 Arch Linux 系统上安装。sudo pacman -S git go base-develgit clone https://aur.archlinux.org/yay.gitcd yaymakepkg -si如何使用 yayyay 语法与 p https://blog.csdn.net/lxyoucan/article/details/124287072
新页面
安装 Arch 使用最新版本的archinstall脚本安装即可
安装KDE Plasma桌面 1 2 3 4 5 sudo pacman -S --needed xorg sddmsudo pacman -S --needed plasma kde-applicationssudo systemctl enable sddmsudo systemctl enable NetworkManagerreboot
中文化 安装中文字体,解决字库不全 1 2 sudo pacman ttf-dejavu wqy-microhei
编辑/etc/locale.conf
编辑/etc/locale.gen 取消注释zh_CN.utf-8的那行,之后运行sudo locale-gen
编辑~/.config/plasma-localerc 把Formats下的zh_CN 改成 zh_CN.UTF-8,注销重启
更换国内源 编辑/etc/pacman.d/mirrorlist
安装yay 1 2 3 git clone https://aur.archlinux.org/yay.git cd yaymakepkg -si
pacman 使用 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 sudo pacman -Sypacman -Ss <package> pacman -Si <package> sudo pacman -S <package>cd /var/cache/pacman/pkg/sudo pacman -U vlc-3.0.11-2-x86_64.pkg.tar.zstsudo pacman -Syusudo pacman -Rs vlcsudo pacman -Rns vlcsudo pacman -Rns $(pacman -Qdtq)pacman -Qs vlc pacman -Q pacman -Ql vlc pacman -Qo /usr/bin/vlc pacman -Sw vlc sudo pacman -Scsudo pacman -Scc
yay 使用 1 2 3 4 5 6 7 8 9 10 11 12 13 yay -Ss <package> yay <package> yay -Sua yay -Ps yay -Sc yay -Scc
安装steam https://linuxiac.com/how-to-play-games-on-arch-linux-using-steam/
原神启动 https://blog.fascode.net/2023/05/01/genshin-linux-proton/
xrdp https://alvin.red/2021/11/06/archlinux-xrdp/
路由转发 参考文章:https://nyac.at/posts/archlinux-router
我的wan是enp1s0, lan是enp2s0
配置wan口 1 sudo vim /etc/systemd/network/20-ext-dhcp.network
1 2 3 4 5 6 7 8 9 [Match] Name =enp1s0[Network] DHCP =ipv4Ipv6AcceptRA =yes [DHCPv4] UseHostname =true
配置lan口 1 sudo vim /etc/systemd/network/21-int.network
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [Match] Name=enp2s0 [Link] Multicast=yes [Network] Address=10.0.0.1/16 MulticastDNS=yes IPMasquerade=both IPv6SendRA=yes DHCPv6PrefixDelegation=yes [IPv6SendRA] Managed=yes OtherInformation=yes
开启DNS服务器 1 sudo vim /etc/systemd/resolved.conf.d/listen-on-internal.conf
1 2 [Resolve] DNSStubListenerExtra =10.0 .0.1
确保服务自启动 1 2 systemctl enable systemd-networkd systemctl enable systemd-resolved
设置DHCP 1 2 3 4 sudo pacman -S dhcpsudo vim /etc/dhcpd.conf
添加子网规则
1 2 3 4 5 6 7 8 subnet 10.0 .0 .0 netmask 255.255 .0 .0 { range 10.0 .1 .4 10.0 .1 .250 ; option domain-name-servers 10.0 .0 .1 ; option routers 10.0 .0 .1 ; }
修改服务文件,使其支持单网口配置
1 2 3 4 5 6 ... [Service] Type =forking - ExecStart =/usr/bin/dhcpd -4 -q -cf /etc/dhcpd.conf -pf /run/dhcpd4/dhcpd.pid + ExecStart =/usr/bin/dhcpd -4 -q -cf /etc/dhcpd.conf -pf /run/dhcpd4/dhcpd.pid %I ...
开启网络转发 1 sudo vi /etc/sysctl.d/30-ipforward.conf
1 2 3 net.ipv4.ip_forward=1 net.ipv6.ip_forward=1
配置NAT规则 1 2 3 4 5 6 7 8 sudo iptables -t nat -A POSTROUTING -o enp1s0 -j MASQUERADEsudo iptables -A FORWARD -i enp2s0 -o enp1s0 -m state --state RELATED,ESTABLISHED -j ACCEPTsudo iptables -A FORWARD -i enp1s0 -o enp2s0 -j ACCEPT
重启网络服务 1 2 sudo systemctl restart systemd-networkdsudo systemctl restart dhcpd4@enp2s0