Kubuntu 25.04

Kubuntu 基础配置

点击查看教程

换国内源

1
nano /etc/apt/sources.list.d/ubuntu.sources
  • 北京外国语大学的 Ubuntu 镜像源地址
1
http://mirrors.bfsu.edu.cn/ubuntu

安装 fcitx5 输入法框架、LibreOffice 中文语言包和 KDE 桌面环境的中文语言包。

1
apt-get install -y fcitx5* libreoffice-l10n-zh-cn language-pack-kde-zh-hans

Ubuntu 安装常用软件

1
sudo apt update && sudo apt install nano git rsync openssh-server wget tree samba nfs-kernel-server nfs-common -y 

系统升级

1
sudo apt update && sudo apt upgrade -y

软件升级

1
sudo apt-get dist-upgrade

重启 Kubuntu

1
sudo reboot

Kubuntu 配置 SSH

点击查看教程

安装 SSH

1
sudo apt update && sudo apt install -y openssh-server

修改配置文件

1
sudo nano /etc/ssh/sshd_config
具体配置配置说明
Port 22SSH 服务监听端口
PermitRootLogin yes允许 root 用户通过 SSH 登录
GSSAPIAuthentication no禁用 GSSAPI 认证以提高安全性
UseDNS no禁用 DNS 反向解析,加快 SSH 连接速度
ClientAliveInterval 10每 10 秒发送一次保活消息给客户端
ClientAliveCountMax 999允许客户端连续 999 次无响应才断开连接

修改 root 密码

1
sudo passwd root

重启 SSH 服务

1
sudo systemctl restart ssh && hostname -I | awk '{print $1}'

Kubuntu 远程桌面

点击查看教程

安装 xrdp

1
sudo apt update && sudo apt install -y xrdp

启动 xrdp 服务,并使 xrdp 随系统自动运行

1
sudo systemctl start xrdp && sudo systemctl enable xrdp

查看 xrdp 服务状态

1
sudo systemctl status xrdp

配置防火墙

1
2
sudo ufw allow 3389/tcp
sudo ufw reload

**查看 ip 地址

1
hostname -I | awk '{print $1}'

测试远程桌面连接
在 Windows 系统中,按下 Win+R 键,输入mstsc,回车打开“远程桌面连接”窗口。在“计算机”栏输入 Kubuntu 系统的 IP 地址,再点击“连接”,输入 Kubuntu 系统的用户名和密码,即可登录到 Kubuntu 的远程桌面

安装软件

点击查看教程

安装 洛雪音乐
提权

1
sudo -i

下载 洛雪音乐

1
wget -c https://github.com/lyswhut/lx-music-desktop/releases/download/v2.11.0/lx-music-desktop_2.11.0_amd64.deb -O lx-music-desktop.deb

安装 洛雪音乐

1
2
3
cd /mnt && ls

sudo dpkg -i lx-music-desktop.deb

安装 微信
首先,要更新软件包索引,接着安装必要的中文字体包:

1
sudo apt update && sudo apt install -y fonts-noto-cjk

下载 微信

1
wget -c https://dldir1v6.qq.com/weixin/Universal/Linux/WeChatLinux_x86_64.deb -O WeChatLinux.deb

安装 微信

1
2
3
cd /mnt && ls

sudo dpkg -i WeChatLinux.deb

卸载软件

点击查看教程

列出所有已安装的软件包

1
sudo apt list --installed

搜索 wechat

1
sudo apt list --installed | grep wechat

彻底卸载(删除配置文件)

1
2
3
sudo apt purge wechat # 彻底卸载微信

sudo apt autoremove # 清理残留依赖

仅卸载软件(保留配置文件)

1
sudo apt remove wechat

卸载后清理残留依赖
卸载后,可以运行以下命令清理不再需要的依赖:

1
sudo apt autoremove

开机脚本

点击查看教程
1
2
## Vercel 脚本
wget -c https://script.meimolihan.eu.org/sh/ubuntu/linux-check.sh -O /etc/profile.d/linux-check.sh && chmod +x /etc/profile.d/linux-check.sh && bash /etc/profile.d/linux-check.sh
1
2
## Gitee 仓库脚本
wget -c https://gitee.com/meimolihan/script/raw/master/sh/ubuntu/linux-check.sh -O /etc/profile.d/linux-check.sh && chmod +x /etc/profile.d/linux-check.sh && bash /etc/profile.d/linux-check.sh