How to use archlinux: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
== 换源 == | |||
<syntaxhighlight lang="bash" line> | |||
# /etc/pacman.d/mirrorlist 配置文件开头加上: | |||
Server = https://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="bash" line> | |||
# /etc/pacman.conf 配置文件末尾加上: | |||
[archlinuxcn] | |||
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch | |||
</syntaxhighlight> | |||
ustc 在开头加,是为了优先用。cn 在末尾加,是因为这是社区而非官方维护的镜像,放末尾避免干扰其他默认配置。 | |||
== .bashrc 强化 == | == .bashrc 强化 == | ||
<syntaxhighlight lang="bash" line> | <syntaxhighlight lang="bash" line> |
Revision as of 16:50, 7 May 2025
换源
# /etc/pacman.d/mirrorlist 配置文件开头加上:
Server = https://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch
# /etc/pacman.conf 配置文件末尾加上:
[archlinuxcn]
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch
ustc 在开头加,是为了优先用。cn 在末尾加,是因为这是社区而非官方维护的镜像,放末尾避免干扰其他默认配置。
.bashrc 强化
export EDITOR=emacs
alias s='ls -hl'
alias pn='sudo pacman -Syu'
alias pi='sudo pacman -S'
alias pr='sudo pacman -Rns'
alias pss='pacman -Ss'
alias eb='emacs ~/.bashrc'
alias sb='source ~/.bashrc'
alias sp='poweroff'
alias sr='reboot'
关掉开机等待
sudo nano /etc/default/grub
sudo grub-mkconfig -o /boot/grub/grub.cfg
令中文不显示成方框
sudo pacman -S wqy-microhei
sudo nano /etc/locale.gen
去掉 zh_CN.UTF-8 UTF-8 前的 # 号
sudo locale-gen
安装中文输入法
sudo pacman -S ibus-rime
ibus-setup
xfce4 调试
# 这是针对 xfce4 下 ibus-rime 的调试
# 设置 ibus-rime 依赖的环境变量
# 把以下放入 .bashrc
ibus-daemon -drx
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
kde 调试
在系统设置 Input 里调 ibus-rime。