惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Full Disclosure
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Secure Thoughts
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Security Latest
Security Latest
Project Zero
Project Zero
Apple Machine Learning Research
Apple Machine Learning Research
Cyberwarzone
Cyberwarzone
V
Visual Studio Blog
S
SegmentFault 最新的问题
月光博客
月光博客
Cisco Talos Blog
Cisco Talos Blog
Simon Willison's Weblog
Simon Willison's Weblog
NISL@THU
NISL@THU
Security Archives - TechRepublic
Security Archives - TechRepublic
Webroot Blog
Webroot Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
量子位
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
P
Privacy & Cybersecurity Law Blog
博客园 - 叶小钗
博客园 - 聂微东
O
OpenAI News
有赞技术团队
有赞技术团队
V2EX - 技术
V2EX - 技术
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
阮一峰的网络日志
阮一峰的网络日志
小众软件
小众软件
博客园 - 司徒正美
S
Security Affairs
J
Java Code Geeks
WordPress大学
WordPress大学
Schneier on Security
Schneier on Security
S
Security @ Cisco Blogs
Jina AI
Jina AI
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
GbyAI
GbyAI
M
MIT News - Artificial intelligence
T
Tailwind CSS Blog
腾讯CDC
Help Net Security
Help Net Security
Know Your Adversary
Know Your Adversary
N
News and Events Feed by Topic
T
Troy Hunt's Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog
云风的 BLOG
云风的 BLOG
IT之家
IT之家
T
Threat Research - Cisco Blogs
罗磊的独立博客

博客园 - emanlee

ubuntu 设置北京日期时间 mysql 在新电脑上导入,出现错误:ERROR at line 4019: Unknown command '\''. - emanlee 安装 yarn npm : 无法加载文件 C:\Program Files\nodejs\npm.ps1,因为在此系统上禁止运行脚本。 - emanlee VS code, 最近打开过哪些项目或文件夹,把这些备份下来,到另外一台电脑上恢复 傲梅分区助手 【好用】 ubuntu 可以使用Windows远程桌面连接吗?【可以】 把xshell的全部连接和密码,从一台Windows 10电脑,迁移到Windows11电脑。 Windows 远程桌面(mstsc)完整迁移方案(含历史连接记录、RDP 配置、保存的账号密码)【可行】 Endnote,如何能完整迁移库和模版 ubuntu 安装 locate “华为杯”第八届中国研究生人工智能创新大赛 当数据量很大时,执行 mysql> source filename.sql 很慢,有什么办法更快 pip install django-ranged-response==0.2.0 部署Vue+Django 04c,mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory Ubuntu Server 24.04 安装 MySQL, ./mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory ubuntu server 24.04: 如何设置默认采用 Xorg 方式登录 Ubuntu Server 24.04 设置锁屏时间 Ubuntu Server 启动过程中,比较慢 Job systemd-networkd-wait-online.service/start running Ubuntu Server 24.04 启用root用户 Ubuntu snap install 安装todesk是否必须检查 CPU 是否支持 AVX / AVX2 命令 Ubuntu Server 24.04下解决SunloginClient 向日葵依赖libgconf-2-4安装问题 Ubuntu Server 24.04 安装图形界面 ubuntu server 24.04 安装 中文输入法 Ubuntu Server 24.04 安装浏览器firefox Ubuntu Server 24.04 安装todesk【先联网,CPU必须支持 AVX / AVX2 】 Python赋值,什么时候传引用? 大驼峰命名法 python 容易理解类和对象的例子 django+mysql: 如何添加一个新的超级用户?
Ubuntu Server 24.04 安装中文,汉字
emanlee · 2026-05-02 · via 博客园 - emanlee

# 1. 更新源
sudo apt update

# 2. 安装中文语言包
sudo apt install -y language-pack-zh-hans language-pack-zh-hans-base

# 3. 生成中文 locale
sudo locale-gen zh_CN.UTF-8

# 4. 设置默认locale( 一直按向下的箭头,选  zh_CN.UTF-8,按空格,出现*,为选中)
sudo dpkg-reconfigure locales

# 5. 安装中文字体
sudo apt install -y fonts-wqy-microhei fonts-wqy-zenhei fonts-noto-cjk

===========================

Ubuntu 24.04 Server 装完中文汉字乱码终极解决(可行

 

第一步:先装全套中文字体(最关键)

服务器默认没中文字体,所以汉字方框 / 乱码: 

sudo apt update
sudo apt install -y fonts-wqy-microhei fonts-wqy-zenhei fonts-noto-cjk

第二步:强制生成并设置中文 UTF-8 locale

1. 重新生成中文区域 

sudo locale-gen zh_CN.UTF-8

2. 配置默认 locale 

sudo dpkg-reconfigure locales  

弹出界面操作:

  1. 上下箭头找到  zh_CN.UTF-8空格选中(出现*为选中),回车,
  2. 下一界面选 zh_CN.UTF-8 作为默认
  3. 回车确认

第三步:临时生效 + 重启系统

# 临时加载环境变量
export LANG=zh_CN.UTF-8
export LC_ALL=zh_CN.UTF-8

# 重启
sudo reboot 

第四步:检查是否配置成功

正常结果必须全是zh_CN.UTF-8

如果还是 en_US 就是没配置对,重新走第二步。

第五步:如果是文件本身编码乱码(GBK/GB2312 文件)

Windows 拷过来的文件很多是 GBK 编码,Linux 默认 UTF-8 会乱码。

安装编码转换工具 

sudo apt install -y convmv

把整个文件夹 GBK 转 UTF-8 

# 进入你的文件目录
cd 你的文件夹路径
# 批量转码 GBK → UTF-8
convmv -f GBK -t UTF-8 -r --notest *

第六步:远程终端(Xshell/CRT)也要改

如果你是远程 SSH 看文件乱码

  • Xshell / 终端软件 → 编码设置改成 UTF-8 改完重新连接就正常。