🧭 Linux 图标与光标主题完整安装指南
一站式指南,帮你轻松安装并应用自定义图标与光标主题。
适用于 GNOME / KDE / XFCE / Cinnamon 等主流桌面环境。
🧩 一、基本结构
📁 目录路径
~/.local/share/icons/ 主要是给 GTK 应用程序使用的 X11 的 xcursor 系统默认查找 ~/.icons/ 和 /usr/share/icons/ 对于 X11 显示服务器,光标主题需要安装在 ~/.icons/ 目录下才能正常工作。
| 级别 | 图标与光标 | GTK主题 |
|---|---|---|
| 🧑💻 用户级(推荐) | ~/.local/share/icons/ 或 ~/.icons/ | ~/.local/share/themes/ 或 ~/.themes/ |
| 🖥️ 系统级 | /usr/share/icons/ | /usr/share/themes/ |
📦 常见主题包格式
bash
.tar.gz .tar.xz .tar.bz2 .zip .deb⚙️ 二、安装前准备
bash
# 查看桌面环境和会话信息
echo $XDG_CURRENT_DESKTOP
gnome-shell --version
echo $XDG_SESSION_TYPE
# 安装常用工具
sudo apt update
sudo apt install unzip tar gzip dconf-editor gnome-tweaks
# 创建用户主题目录
mkdir -p ~/.local/share/{icons,themes}
mkdir -p ~/.icons ~/.themes🎨 三、安装图标主题
🧰 方法一:手动安装(推荐)
bash
# 进入下载目录
cd ~/Downloads
# 解压主题包
tar -xf 图标主题.tar.* # 或 unzip 图标主题.zip
# 复制到用户目录
cp -r 图标主题文件夹 ~/.local/share/icons/
# 设置权限与缓存
chmod -R 755 ~/.local/share/icons/图标主题文件夹
gtk-update-icon-cache -f ~/.local/share/icons/图标主题文件夹📦 方法二:包管理器安装
bash
sudo apt update
sudo apt install papirus-icon-theme yaru-theme-icons \
numix-icon-theme-circle breeze-icons adwaita-icon-theme-full🖱️ 四、安装光标主题
🧰 手动安装
bash
cd ~/Downloads
tar -xf 光标主题.tar.*
cp -r 光标主题文件夹 ~/.local/share/icons/
chmod -R 755 ~/.local/share/icons/光标主题文件夹
gtk-update-icon-cache -f ~/.local/share/icons/光标主题文件夹📦 包管理器安装
bash
sudo apt install dmz-cursor-theme breeze-cursor-theme \
comixcursors oxygen-cursor-theme capitaine-cursors🎛️ 五、应用主题
🖼️ 方法一:使用 GNOME Tweaks
bash
sudo apt install gnome-tweaks
gnome-tweaks打开 外观 (Appearance) → 选择图标 / 光标 / GTK 主题即可。
💻 方法二:命令行设置
bash
# 设置图标主题
gsettings set org.gnome.desktop.interface icon-theme '主题名称'
# 设置光标主题
gsettings set org.gnome.desktop.interface cursor-theme '光标主题名称'
# 设置 GTK 主题
gsettings set org.gnome.desktop.interface gtk-theme 'GTK主题名称'
# 设置 Shell 主题
gsettings set org.gnome.shell.extensions.user-theme name 'Shell主题名称'
# 查看当前设置
gsettings get org.gnome.desktop.interface icon-theme
gsettings get org.gnome.desktop.interface cursor-theme🌐 六、主题资源推荐
| 来源 | 链接 | 推荐分类 |
|---|---|---|
| 🧭 GNOME-Look.org | 🔗 gnome-look.org | Icons / Cursors |
| 💎 Pling.com | 🔗 pling.com | Modern Theme Hub |
| 🎨 DeviantArt | 🔗 deviantart.com | "linux icons" / "cursor theme" |
| 🧑💻 GitHub | 🔗 github.com | 搜索: icon-theme, cursor-theme |
🧹 七、维护与更新
# 查看已安装主题
ls ~/.local/share/icons/
ls ~/.local/share/themes/
# 查看光标主题
ls ~/.local/share/icons/ | grep -i cursor
# 更新图标缓存
gtk-update-icon-cache -f ~/.local/share/icons/
sudo gtk-update-icon-cache -f /usr/share/icons/
# 重启 GNOME Shell
killall -3 gnome-shell
# 或 Alt + F2 → 输入 r → 回车🧠 附录:命令速查表
| 操作 | 命令 |
|---|---|
| 查看当前图标主题 | gsettings get org.gnome.desktop.interface icon-theme |
| 查看当前光标主题 | gsettings get org.gnome.desktop.interface cursor-theme |
| 更新图标缓存 | gtk-update-icon-cache -f ~/.local/share/icons/主题名 |
| 重启 GNOME Shell | killall -3 gnome-shell |
| 安装 Tweaks 工具 | sudo apt install gnome-tweaks |
