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
(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!
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-2021
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/17302589.html
未经授权禁止转载,违者必究!