在 WSL 中安装 中文支持

WSL中文乱码问题解决方案

在WSL(Windows Subsystem for Linux)环境中,中文显示乱码是常见问题,主要源于语言环境未配置、中文字体缺失或应用编码未指定。

安装中文语言包

更新包列表并安装中文语言支持:

bash 复制代码
sudo apt update
sudo apt install language-pack-zh-hans

安装中文字体

WSL默认可能缺少中文字体,需手动安装:

bash 复制代码
sudo apt install fonts-wqy-zenhei fonts-wqy-microhei fonts-noto-cjk

fonts-wqy-zenhei:文泉驿正黑字体

fonts-noto-cjk:Google Noto CJK 字体(覆盖中日韩)

相关推荐
x861 天前
在 WSL 里把 Vulkan 跑起来
wsl·vulkan
Better Bench10 天前
WSL2 Ubuntu 中 Claude CLI “command not found” 故障排查与修复
linux·ubuntu·claude·wsl·claudecode
圣殿骑士-Khtangc16 天前
WSL2 + Redis Stack 完整部署教程(Windows 11)
windows·redis·wsl
Imagine Miracle1 个月前
【WSL】让WSL2后台持久运行不自动关闭的解决方案
linux·windows·wsl
zhou135284822671 个月前
Linux 系统安装 Ollama 详细教程
linux·ubuntu·wsl·ollama
西游音月1 个月前
Windows环境下的WSL+Claude Code安装配置
windows·大模型·ai编程·wsl·claude code
随风一样自由1 个月前
【WSL+Linux】国内网络连接微软官方服务器(或GitHub)不稳定,导致下载内核或Linux发行版时超时断开如何解决?
linux·服务器·wsl
假如梵高是飞行员1 个月前
WSL2 从 img 镜像文件启动特定 Linux 发行版完整指南
linux·windows·wsl
Qres8212 个月前
docker & WSL & Ubuntu安装记录
ubuntu·docker·容器·wsl
weixin_ab2 个月前
【WSL2 + PgVector 远程连接排坑记】
wsl