〇、准备工作
首先,需要一块树莓派,推荐4B以上的机型,因为KDE桌面较为华丽,性能开销比树莓派自带的pixel更大。其次,准备一张SD卡,推荐32GB以上。以及一台电脑,用于烧录树莓派OS。
一、烧录镜像
在树莓派官网下载Raspberry Pi Imager,并安装。
打开Raspberry Pi Imager,选择设备。

在下一步的选择系统中,选择 Raspberry Pi OS (other),在子菜单中选择 Raspberry Pi OS Lite (64-bit)。


填写用户名密码和Wifi连接。


开启SSH 设置为 开。

选择 WRITE 后则开始写入镜像,完成后将SD卡插入树莓派。

二、换源
树莓派开机后,使用任意SSH软件连接,先进行换源。
这里使用清华源,截至撰稿日(2026.6.17),树莓派OS使用Debian13 DEB822格式的软件源。
输入 sudo nano /etc/apt/sources.list.d/debian.sources 进入软件源文件,会出现:
Types: deb
URIs: http://deb.debian.org/debian/
Suites: trixie trixie-updates
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.pgp
Types: deb
URIs: http://deb.debian.org/debian-security/
Suites: trixie-security
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.pgp
在这些软件源URL前打上 # 注释这些软件源,完成后效果如下:
#Types: deb
#URIs: http://deb.debian.org/debian/
#Suites: trixie trixie-updates
#Components: main contrib non-free non-free-firmware
#Signed-By: /usr/share/keyrings/debian-archive-keyring.pgp
#Types: deb
#URIs: http://deb.debian.org/debian-security/
#Suites: trixie-security
#Components: main contrib non-free non-free-firmware
#Signed-By: /usr/share/keyrings/debian-archive-keyring.pgp
光标移动到i最后,回车几行,输入清华源URL:
Types: deb
URIs: https://mirrors.tuna.tsinghua.edu.cn/debian
Suites: trixie trixie-updates trixie-backports
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
# Types: deb-src
# URIs: https://mirrors.tuna.tsinghua.edu.cn/debian
# Suites: trixie trixie-updates trixie-backports
# Components: main contrib non-free non-free-firmware
# Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
# 以下安全更新软件源为官方源配置
Types: deb
URIs: https://security.debian.org/debian-security
Suites: trixie-security
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
# Types: deb-src
# URIs: https://security.debian.org/debian-security
# Suites: trixie-security
# Components: main contrib non-free non-free-firmware
# Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
粘贴完后 ctrl+x ,输入 Y 回车退出,执行 sudo apt update 更新软件源,若出现:
qiufeng@RaspberryPi:~ $ sudo apt update
Get:1 http://archive.raspberrypi.com/debian trixie InRelease [54.8 kB]
Hit:2 https://mirrors.tuna.tsinghua.edu.cn/debian trixie InRelease
Hit:3 https://mirrors.tuna.tsinghua.edu.cn/debian trixie-updates InRelease
Hit:4 https://mirrors.tuna.tsinghua.edu.cn/debian trixie-backports InRelease
Get:5 http://archive.raspberrypi.com/debian trixie/main arm64 Packages [461 kB]
Hit:6 https://security.debian.org/debian-security trixie-security InRelease
Get:7 http://archive.raspberrypi.com/debian trixie/main armhf Packages [454 kB]
Fetched 971 kB in 5s (208 kB/s)
93 packages can be upgraded. Run 'apt list --upgradable' to see them.
所使用的源带有 mirrors.tuna.tsinghua.edu.cn 且无严重报错则换源已完成。
三、安装KDE桌面环境
KDE有三个版本,分别是KDE-Plasma、KDE-Standard和KDE-Full。
KDE-Plasma-desktop(Lite版)仅提供 Plasma 桌面环境的核心组件。包括:lasma Shell(桌面 Shell)、KWin(窗口管理器)、SDDM(登录管理器)和System Settings(系统设置)。
Kde-standard(标准版)在 kde-plasma-desktop 的基础上,增加了日常使用所需的常用应用程序。包括:Dolphin:文件管理器、Konsole:终端模拟器、Okular:文档查看器(PDF 等)、Gwenview:图像浏览器、Kate:文本编辑器、Plasma-nm:网络管理前端和Klipper:剪贴板历史工具。
kde-full(完整版)包含完整的 KDE 软件生态,除了标准版的所有内容外,还额外包括:Kdenlive:视频编辑器、Calligra Suite:办公套件、Amarok / Elisa:音乐播放器、各类教育工具(如 Kalgebra、KGeography 等)、游戏(如 Bomber、Bovo、Granatier 等)、开发工具及其他小众应用。
| 场景 | 推荐 |
|---|---|
| 老旧硬件 / 追求极简 / 自定义构建 | kde-plasma |
| 日常使用,平衡功能与资源 | kde-standard |
| 新机器,想要完整 KDE 体验 | kde-full |
使用以下代码安装KDE的任意一个版本:
#KDE-Plasma-desktop
sudo apt install kde-plasma-desktop
#KDE-Standard
sudo apt install kde-standard
#KDE-Full
sudo apt install kde-full
遇到输入 [Y/n] 的地方输入 Y 回车即可。
安装完毕后,输入 sudo reboot 重启树莓派,插上显示器,重启完成后则会进入kde登录界面。
四、无法进入KDE桌面
首先,在命令行中输入以下命令查看当前默认的启动目标:
systemctl get-default
如果返回的是 multi-user.target,说明系统默认进入的是纯命令行模式。你需要将其修改为图形界面模式:
sudo systemctl set-default graphical.target
2. 检查并配置显示管理器 (SDDM)
KDE 桌面环境高度依赖 SDDM 作为显示管理器。请确保它已经安装并设置为开机自启:
# 安装 SDDM(如果尚未安装)
sudo apt install sddm
# 将 SDDM 设置为默认显示管理器(如果弹出选择界面,请选择 sddm)
sudo dpkg-reconfigure sddm
# 启用 SDDM 服务并设置开机自启
sudo systemctl enable sddm
3. 重启系统测试
完成上述设置后,重启你的树莓派:
sudo reboot
完成以上操作后便可以进入KDE桌面了。