Cachy OS(ArchLinux) 入坑记录

最佳实践 10 分钟阅读 更新于 2026-03-10

最近决定把自己的桌面操作系统换成 Linux,做个入坑记录。我之前有十几年Linux server和几年Mac OS的使用经验,所以这次入坑也算有些基础。

我选择的Linux发行版是 Cachy OS,它是一个基于ArchLinux的发行版。之所以选择它,一方面是想体验下 ArchLinux 的滚动更新策略,我喜欢保持系统最新;一方面是听说它对于显卡驱动和性能优化做的比较好,最后是它默认使用了 plasma 桌面环境。

1. 安装Cachy OS

1.1. 制作启动盘。

我下载了 Cachy OS 的 ISO 镜像文件,然后使用 balena etcher 工具将其写入 USB 启动盘。

注: 如果官方镜像下载速度较慢,也可以从 中科大镜像站 下载。

1.2. 安装Cachy OS

插入 USB 启动盘,重启电脑,进入 BIOS 设置,将启动顺序设置为 USB 启动盘优先。需要注意一点,必须关闭 Secure Boot
关于 BIOS 设置,各品牌的电脑可能有不同的设置方法,这里就不展开了。

然后按照 Cachy OS 的安装向导进行安装即可。

2. 包管理器

2.1. pacman 包管理器

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 核心更新 / 安装 / 卸载:
## 更新
sudo pacman -Syu
## 安装
sudo pacman -S 包名
## 卸载
sudo pacman -Rns 包名

# 查询关键命令:
## 搜仓库
pacman -Ss 关键词
## 查已装包信息
pacman -Qi 包名
## 查文件归属
pacman -Qo 文件名

# 清理维护:
## 清缓存
sudo pacman -Sc
## 查孤立包
pacman -Qdt
## 删孤立包
sudo pacman -Rns $(pacman -Qdtq)

2.2. paru (AUR 助手)

Cachy OS 默认安装了 paru 作为 AUR 助手

1
2
3
4
5
6
7
8
9
10
# 安装软件
paru -S 包名
# 搜索软件
paru -Ss 关键词
# 更新系统(官方 + AUR)
paru -Syu
# 仅更新 AUR 包
paru -Sua
# 卸载软件
paru -Rns 包名

2.3. Flatpak

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 安装 Flatpak
sudo pacman -S flatpak

# 配置 flathub 镜像
sudo flatpak remote-modify flathub --url=https://mirror.sjtu.edu.cn/flathub

# 查看已配置的 flatpak 远程仓库
flatpak remotes

# 搜索 flatpak 应用
flatpak search 关键词

# 安装 flatpak 应用
flatpak install flathub 应用名

3. 配置中文输入法

Cachy OS 默认使用了 plasma 桌面环境,所以我需要配置输入法。我选择了 fcitx5 作为输入法框架,fcitx5-rime 作为 Rime 输入法。

参考 fcitx5 中文输入法配置

3.1. 安装 fcitx5-rime 和 fcitx5-configtool

1
sudo pacman -S fcitx5-rime fcitx5-configtool

3.2. 配置fcitx5

用 Wayland 输入法协议,首先退出正在运行的 Fcitx 5 进程,前往”系统设置 > 输入与输出 > 键盘 > 虚拟键盘”,选择 “Fcitx 5 Wayland 启动器”。

3.3. 配置 Rime 输入法

右键点击 fcitx5 托盘图标 → 切换输入方案为 “朙月拼音・简化字”

3.4. 一些输入法的兼容配置

xwayland 应用的输入法配置
~/.config/fish/conf.d/fcitx5.fish

1
set -x XMODIFIERS "@im=fcitx"

4. 上网代理

1
2
3
# install clash verge rev

paru -S clash-verge-rev-bin

5. 常用工具

5.1. visual studio code 和 microsoft edge

1
paru -S visual-studio-code-bin microsoft-edge-stable-bin

5.2. git

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 补充git相关工具
sudo pacman -S git-lfs

# git credential
paru -S git-credential-manager-bin
git-credential-manager configure
git config --global credential.credentialStore secretservice

# 基本配置
git config --global user.name "Your Full Name"
git config --global user.email "you@email.com"
git config --global core.editor "vim"
git config --global core.excludesfile ~/.config/gitignore
# 配置 gitignore 文件
vim ~/.config/gitignore

5.3. docker

1
2
3
4
5
6
7
8
# 安装 docker 相关工具
sudo pacman -S docker docker-buildx docker-compose nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl enable --now docker

# 配置无需 sudo 运行docker
sudo usermod -aG docker $USER
newgrp docker

5.4. ghostty

1
2
git clone https://github.com/yandy/term-config.git ~/.config/ghostty
sudo pacman -S ghostty

5.5. neovim

1
2
3
4
5
6
7
8
9
10
git clone https://github.com/yandy/neovim-config.git ~/.config/nvim

# install neccessary tools/packages

bun add -g typescript-language-server typescript @tailwindcss/language-server
uv tool install basedpyright debugpy
sudo pacman -S neovim lazygit wl-clipboard luarocks tree-sitter-grammars lua-language-server lldb

# invoke nvim and wait for install completion
nvim

5.6. 其他工具

1
sudo pacman -S tmux net-tools

6. 美化

6.1. oh-my-posh

oh-my-posh 提供 Git 状态颜色编码和提示的完全自定义命令提示符体验提供主题功能。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 安装 oh-my-posh
curl -s https://ohmyposh.dev/install.sh | bash -s

# 安装字体
## cachy os 自带了大量的 nerd 字体,包括 "meslo",所以大多情况下无需安装字体
# oh-my-posh font install
# This will present a list of Nerd Font libraries, from which you can select Meslo, which includes the Meslo LGM NF font we recommend. Note that you can also install it directly via:
# oh-my-posh font install meslo

# 配置 shell
echo "oh-my-posh init fish --config 'jandedobbeleer' | source" >> ~/.config/fish/config.fish

# 另开一个新终端 或者执行
exec fish

7. 开发环境配置(合集)

8. 常用桌面软件安装与配置

标签: linux xops

如果这篇文章对您有帮助,欢迎打赏支持