软件源

/etc/pacman.d/mirrorlist 在头部追加

1Server = http://mirrors.tuna.tsinghua.edu.cn/archlinuxarm/$arch/$repo
2Server = http://mirrors.ustc.edu.cn/archlinuxarm/$arch/$repo
3Server = http://mirrors.stuhome.net/archlinuxarm/$arch/$repo

安装需要的依赖

pacman -S gcc python python-pip tar curl wget vim zsh wiringpi docker git

禁用ipv6

参考

  • /etc/sysctl.d/40-ipv6.conf
1# Disable IPv6
2net.ipv6.conf.all.disable_ipv6 = 1
3net.ipv6.conf.nic0.disable_ipv6 = 1
4...
5net.ipv6.conf.nicN.disable_ipv6 = 1
  • /etc/dhcpcd.conf
1noipv6rs
2noipv6
  • /etc/netctl/example

拷贝

  • 设置静态ip /etc/systemd/network/eth.network
1[Match]
2Name=eth*
3
4[Network]
5Address=192.168.1.6/24
6Gateway=192.168.1.1
7DNS=192.168.1.1
8# DHCP=yes
9#DNSSEC=no

错误

1arch linux arm error: keyring is not writable
 1
 2WARNING: No memory limit support
 3WARNING: No swap limit support
 4WARNING: No kernel memory limit support
 5WARNING: No kernel memory TCP limit support
 6WARNING: No oom kill disable support
 7
 8append
 9/boot/cmdline.txt
10
11cgroup_enable=memory swapaccount=1

pacman-key –init && pacman-key –populate archlinuxarm

内核相关

  • 查看内核 mhwd-kernel -li
1Currently running: 5.10.2-2-MANJARO (linux510)
2The following kernels are installed in your system:
3   * linux414
4   * linux510
5   * linux54
  • 删除内核 sudo mhwd-kernel -r linux54

图形化与字符界面调整

  • 字符
1systemctl set-default multi-user.target
2
3startx 进入图形化
  • 设置图形化
1systemctl set-default graphical.target

笔记本,盖上盖子,网络关闭

支持笔记本盖上盖子不断网,可以长时间运行, 可用于外界显示盖上笔记本自己的显示器

1sudo vim /etc/UPower/UPower.conf
2
3修改 IgnoreLid=falseIgnoreLid=true
4
5sudo systemctl restart upower.service

查看硬件信息

  • memory
1sudo dmidecode -t memory 

sudo 免密登录

    1. 修改/etc/sudoers文件,清徐%sudo ALL=(ALL) ALL前的注释#
    1. [重要] 不要在sudoers文件中直接添加用户设置,应该在/etc/sudoers.d/10-installer的%wheel ALL=(ALL) ALL行后添加如下配置, xxx 为账号
1xxx ALL=(ALL) NOPASSWD: ALL
2%xxx ALL=(ALL) NOPASSWD: ALL

用户管理中心包括认证 资源授权等

dns

系统默认开启dns监听53端口,如果做内网dns需要关闭systemd-resolved服务

vi /etc/systemd/resolved.conf

1[Resolve]
2DNS=127.0.0.1      # 需要配置本机使用的dns
3DNSStubListener=no # 原来是yes开启监听,需要关闭

建立软连

1 ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

升级常见问题

  1. pacman -Syyu 提示错误

    error: failed to commit transaction (conflicting files) rpi4-post-install: /etc/udev/rules.d/99-vcio-rewrite.rules exists in filesystem Errors occurred, no packages were upgraded. 解决方法sudo pacman -Syu --overwrite /etc/udev/rules.d/99-vcio-rewrite.rules