使用archinstall进行安装,注意终端只有一个tty,错误输出会打印到这个tty里,可以临时禁用错误输出。
dmesg -n 1
另外archinstall中输入密码时如果发现无法回车确认,可以用ctrl + j
来代替回车。
安装gnome pacman -S gnome systemctl enable gdm systemctl start gdm
安装KDE
# 安装ssdm登录管理器
pacman -S sddm sddm-kcm
安装nginx
pacman -S nginx
systemctl enable nginx
systemctl start nginx
搜索软件包
pacman -Ss openresty
-s, --search <regexp>
This will search each package in the sync databases for names or descriptions that match regexp. When you include multiple search terms, only packages with descriptions matching ALL of
those terms will be returned.
# 确定一个软件包的依赖关系
pacman -Qi freecad
# search installed package
pacman -Qs fcitx
# 清理pacman的缓存
pacman -Sc
系统更新
pacman -Syu
防火墙配置,注意ufw和docker是冲突的,无法控制docker中开发的端口,see: https://www.howtogeek.com/devops/how-to-use-docker-with-a-ufw-firewall/
ufw status
ufw allow 80/tcp
ufw allow 443/tcp
# mosh
ufw allow 60000:61000/udp
#https://tailscale.com/kb/1082/firewall-ports/
# tailscale
ufw allow 41641/udp
更新locale, https://wiki.archlinux.org/title/locale
locale-gen zh_CN.UTF-8
中文字体:
#https://wiki.archlinux.org/title/Localization/Simplified_Chinese
pacman -S adobe-source-han-sans-cn-fonts adobe-source-han-serif-cn-fonts wqy-zenhei
Change CpasLock key to ctrl, using gnome-tweaks
tool.
Copy output to clickboard, use xclip
, see https://www.cyberciti.biz/faq/xclip-linux-insert-files-command-output-intoclipboard/
pacman -S xclip
# this will copy to clickboard, you can paste it with mouse middle key.
cat x.txt | xclip
# this way you can paste it with `ctrl + v`
alias copy="xclip -selection clipboard"
cat x.txt | copy
aur扩展,使用yay
git clone --depth=1 https://aur.archlinux.org/yay.git
cd yay
makepkg -si
Chinese input
# 安装fcitx5, 不要再使用ibus
pacman -S fcitx5 fcitx5-chinese-addons fcitx5-chinese-addons
bashrc中设置:
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
修复一些输入法的问题:
# 我的系统上gnome一直无法弹出输入选择窗口,需要安装这个aur, 需要
yay -S gnome-shell-extension-kimpanel-git
# chromium 无法切换输入法的问题,参考:https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland
chromium --enable-features=UseOzonePlatform --ozone-platform=wayland --gtk-version=4
Update firmware using fwupd
, see https://wiki.archlinux.org/title/Fwupd
pacman -S fwupd
fwupdmgr refresh
fwupdmgr update
Install zsh, see https://wiki.archlinux.org/title/zsh