2023 最新的如何树莓派上安装中文输入法和设置中文语言环境教程 All In One
2023 最新的如何树莓派上安装中文输入法和设置中文语言环境教程 All In One
亲测有效:
Raspberry Pi 3B
+Raspberry Pi OS (64-bit)
desc | screenshot |
---|---|
Raspberry Pi 3B | ![]() |
Raspberry Pi OS (64-bit) | ![]() |
https://www.cnblogs.com/xgqfrms/p/17300085.html#5166108
操作步骤
- 安装 install
安装中文输入法 & 安装中文字体
SCIM(Smart Common Input Method )
# 安装中文输入法 chinese input ✅
$ sudo apt-get install scim-pinyin
# 安装中文字体,防止出现乱码问题
$ sudo apt-get install ttf-wqy-zenhei
# 刷新字库缓存 ❓
$ sudo fc-cache
- 设置 setting
设置默认语言环境
# 安装后,需要设置默认语言环境 ⚠️
# GUI 图形化配置界面 🚀
$ sudo raspi-config
选择 localization options
使用 PageDown 键,翻页到最后面;
使用 space 键,选中 zh_CN.UTF-8 UTF-8
, OK 确认
设置默认的 locale 语言环境为 zh_CN.UTF-8 UTF-8
, OK 确认
⚠️ 如果使用的是 macOS 上的 Terminal 出错了,需要手动关闭本地环境变量,即取消勾选
- 重启 reboot
重启系统
# 重启系统
$ sudo reboot
# 或者
$ sudo shutdown -r now
- 测试 test
测试验证
# disk free / 查看磁盘使用情况
$ df
$ df -h
$ df -Th
安装中文输入法,前 ❌
安装中文输入法,后 ✅
demos
https://www.cnblogs.com/xgqfrms/p/5355330.html#5166258
others
raspi-config
command
# raspi-config 命令行界面
$ sudo raspi-config nonint <command> <arguments>
https://www.raspberrypi.com/documentation/computers/configuration.html#raspi-config-cli
切换回 en-US
# ???
$ cat /etc/profile
$ cd /etc/profile.d && ls -al
总用量 36
drwxr-xr-x 2 root root 4096 4月 10 01:31 .
drwxr-xr-x 121 root root 4096 4月 10 02:22 ..
-rw-r--r-- 1 root root 95 4月 29 2019 at-dbus-fix.sh
-rw-r--r-- 1 root root 726 8月 12 2020 bash_completion.sh
-rw-r--r-- 1 root root 349 12月 18 2020 im-config_wayland.sh
-rw-r--r-- 1 root root 324 6月 8 2022 sshpwd.sh
-rw-r--r-- 1 root root 1384 2月 18 2021 vte-2.91.sh
-rw-r--r-- 1 root root 966 2月 18 2021 vte.csh
-rw-r--r-- 1 root root 450 7月 22 2019 wifi-check.sh
/etc/profile
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ "$(id -u)" -eq 0 ]; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games"
fi
export PATH
if [ "${PS1-}" ]; then
if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then
# The file bash.bashrc already sets the default PS1.
# PS1='\h:\w\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "$(id -u)" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi
refs
https://www.raspberrypi.com/documentation/computers/configuration.html#raspi-config
https://blog.nowcoder.net/n/d22f861d07f146c6a6a637f1d2f8bb95
©xgqfrms 2012-2025
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/17302589.html
未经授权禁止转载,违者必究!
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· NetPad:一个.NET开源、跨平台的C#编辑器
· PowerShell开发游戏 · 打蜜蜂
· 凌晨三点救火实录:Java内存泄漏的七个神坑,你至少踩过三个!
2022-04-10 如何在 Apple Mac 上获得 IP 地址 All In One
2022-04-10 Custom HTML5 Video Download All-in-One
2021-04-10 DOM & window & document & html & body All In One
2021-04-10 how to using js get window bind events length
2021-04-10 how to using js get addEventListener bind events length
2020-04-10 MongoDB 101
2020-04-10 Regular Expressions All In One