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

推荐订阅源

N
News and Events Feed by Topic
WordPress大学
WordPress大学
Vercel News
Vercel News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
小众软件
小众软件
L
LangChain Blog
雷峰网
雷峰网
D
DataBreaches.Net
博客园 - 三生石上(FineUI控件)
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tor Project blog
NISL@THU
NISL@THU
Scott Helme
Scott Helme
量子位
S
Security Affairs
T
Threat Research - Cisco Blogs
博客园_首页
云风的 BLOG
云风的 BLOG
D
Docker
AWS News Blog
AWS News Blog
腾讯CDC
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
U
Unit 42
Recent Announcements
Recent Announcements
Apple Machine Learning Research
Apple Machine Learning Research
G
Google Developers Blog
T
The Exploit Database - CXSecurity.com
MongoDB | Blog
MongoDB | Blog
Stack Overflow Blog
Stack Overflow Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
LINUX DO - 热门话题
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The Last Watchdog
The Last Watchdog
C
Cybersecurity and Infrastructure Security Agency CISA
IT之家
IT之家
W
WeLiveSecurity
P
Privacy & Cybersecurity Law Blog
F
Full Disclosure
L
Lohrmann on Cybersecurity
The Hacker News
The Hacker News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Y
Y Combinator Blog
S
Security @ Cisco Blogs
C
Cyber Attacks, Cyber Crime and Cyber Security
C
Check Point Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
N
News and Events Feed by Topic
PCI Perspectives
PCI Perspectives
I
InfoQ

博客园 - 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 安装浏览器firefox Ubuntu Server 24.04 安装todesk【先联网,CPU必须支持 AVX / AVX2 】 Ubuntu Server 24.04 安装中文,汉字 Python赋值,什么时候传引用? 大驼峰命名法 python 容易理解类和对象的例子 django+mysql: 如何添加一个新的超级用户? Python 异常体系核心:BaseException 及其四大子类 Python 匿名函数(lambda)举例 Python函数内部的局部变量和全局变量 订书钉规格 在Navicat中复制带有自动增长id字段的表格,如何把新表格的自动增长id重新设置为从1开始 科研02 期刊和会议的质量等级 Vue 2,父组件中点击一个按钮,更新子组件(重新加载子组件) 汉明距离(Hamming distance) Modbus slave模拟的从站 如何主动发送数据给主站 Word中,表格中的文字在一行的偏下方,没有垂直居中 在线把汉字转拼音字母 Navicat中复制并修改MySQL表,保存时,出现未知的列的错误 WinSCP 便携版、绿色版 下载 centos / Linux 上,非管理员用户安装 miniconda FTP 服务器设置(FileZilla Server) Windows主机上的Device/Credential Guard功能与VMware Workstation虚拟化冲突导致 Navicat 备份连接
ubuntu server 24.04 安装 中文输入法
emanlee · 2026-05-02 · via 博客园 - emanlee
  • Ubuntu Server 24.04 默认是纯命令行(无桌面),普通图形化中文输入法(fcitx5/ibus)没法直接用
  • 要能 “打中文”,有两条路:
    1. 装桌面环境(GNOME)+ fcitx5 中文输入法(最常用、正常用中文输入法)
    2. 不装桌面,用命令行中文输入法(只能在终端里用,体验差)

下面给你完整可复制的步骤,直接选方案 1 即可。


方案 1:给 Ubuntu Server 24.04 装桌面 + 中文输入法(推荐)

1. 先更新系统 + 装中文语言包 + 中文字体【必须】

sudo apt update
sudo apt upgrade -y

# 中文语言包
sudo apt install -y language-pack-zh-hans language-pack-gnome-zh-hans

# 中文字体(解决乱码)
sudo apt install -y fonts-wqy-microhei fonts-wqy-zenhei fonts-noto-cjk

# 生成中文locale
sudo locale-gen zh_CN.UTF-8
sudo update-locale LANG=zh_CN.UTF-8 LC_ALL=zh_CN.UTF-8

2. 安装 GNOME 桌面(完整版) 【必须】

sudo apt install -y ubuntu-desktop

重启后进入图形登录界面,选中文、登录。

3. 安装 Fcitx5 中文输入法(好用稳定)【必须】

sudo apt update
sudo apt install -y \
  fcitx5 \
  fcitx5-chinese-addons \
  fcitx5-module-cloudpinyin \
  fcitx5-frontend-gtk3 \
  fcitx5-frontend-gtk4 \
  fcitx5-frontend-qt5 \
  fcitx5-frontend-qt6

4. 设置系统输入法框架为 fcitx5【必须】

5. 配置环境变量(关键,否则部分软件切不出中文)【必须】

echo '
GTK_IM_MODULE=fcitx5
QT_IM_MODULE=fcitx5
XMODIFIERS=@im=fcitx5
' | sudo tee /etc/environment

6. 重启生效 【必须】

7. 添加拼音输入法

登录后:

  1. Ctrl + Space 调出输入法 ??? 这一步不能行【转到下文    方案一
  2. 点任务栏小键盘 → 配置
  3. 取消 “只显示当前语言”
  4. 添加 → 拼音(Pinyin)

之后就可以正常在浏览器、文件管理器、终端里输入中文了。


方案 2:不装桌面,命令行中文输入(简单但体验差)

如果你坚持纯命令行,可以用 fbterm + fcitx

sudo apt update
sudo apt install -y fbterm fcitx fcitx-libs fcitx-config-gtk

# 把当前用户加入video组
sudo usermod -aG video $USER
newgrp video

# 启动 fbterm(中文终端)
fbterm
# 然后启动 fcitx
fcitx

Ctrl+Space 切换中英文,只能在 fbterm 里用。

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

Ubuntu Server 24.04 安装了桌面之后,安装了中文字体,中文语言包,设置了中文,可以显示中文。无法输入中文。

方案一可行,可用】:安装 fcitx5(推荐,更稳定)

1. 安装输入法全家桶 

sudo apt update
sudo apt install -y \
fcitx5 \
fcitx5-chinese-addons \
fcitx5-module-cloudpinyin \
fcitx5-frontend-gtk3 \
fcitx5-frontend-gtk4 \
fcitx5-frontend-qt5 \
fcitx5-configtool

2. 设置环境变量(关键,否则很多软件里无效)

echo 'GTK_IM_MODULE=fcitx5' >> ~/.pam_environment
echo 'QT_IM_MODULE=fcitx5' >> ~/.pam_environment
echo 'XMODIFIERS=@im=fcitx5' >> ~/.pam_environment
echo 'INPUT_METHOD=fcitx5' >> ~/.pam_environment

3. 注销并重新登录(必须) 

4. 添加中文拼音

  • 重启后,打开 fcitx5 配置(菜单搜 “fcitx5-configtool”)

  • 图片

  • 图片

    点击   “运行Fcitx5”

    图片

  • 取消勾选 Only Show Current Language

  • + → 搜索 Pinyin → 添加 【如果已经有了拼音,不用再添加】

  • 切换快捷键默认是 Ctrl+Space,也可在「全局选项」里改成 ShiftWin+Space

  • 右上角会出现键盘图标,点击可切换中 / 英

     

    图片


方案二:用系统自带 IBus(简单)

1. 安装拼音引擎 

sudo apt update
sudo apt install -y ibus-libpinyin

2. 重启 IBus

3. 添加中文输入源

  • 打开 设置 → 键盘 → 输入源

  • + → 搜索 Chinese (Intelligent Pinyin) → 添加  

    图片  

  • 切换快捷键:Win+Space(GNOME 默认)


常见坑(你大概率踩了其中一个)

  1. 只装了语言包,没装输入法引擎:中文能显示,但没输入源。
  2. Wayland 下输入法不生效
    • 登录界面,点齿轮 → 选 GNOME on Xorg 再登录。
  3. 没注销 / 重启:环境变量或框架变更不重启不生效。
  4. 语言支持未完全安装
    • 运行 gnome-language-selector → 点 Install 补全语言包。

验证

打开文本编辑器 / 浏览器,按切换快捷键,能打出汉字即成功。