Debian 安装中文包(适用于 Debian)
<h2 id="debian-安装中文包适用于-debian">✅Debian 安装中文包(适用于 Debian)</h2><h3 id="-第-1-步编辑-locale-列表文件"><strong>✅ 第 1 步:编辑 locale 列表文件</strong></h3>
<pre><code>sudo nano /etc/locale.gen
</code></pre>
<p>确保以下两行 <strong>都存在并未被注释</strong>(没有 # 号):</p>
<pre><code>en_US.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8
</code></pre>
<p>然后保存退出(Ctrl+O 回车,Ctrl+X)。</p>
<hr>
<h3 id="-第-2-步生成-locale-文件"><strong>✅ 第 2 步:生成 locale 文件</strong></h3>
<pre><code>sudo locale-gen
</code></pre>
<p>你应该看到:</p>
<pre><code>Generating locales (this might take a while)...
en_US.UTF-8... done
zh_CN.UTF-8... done
Generation complete.
</code></pre>
<hr>
<h3 id="-第-3-步设置系统默认语言任选其一"><strong>✅ 第 3 步:设置系统默认语言(任选其一)</strong></h3>
<p>如果你要设为中文:</p>
<pre><code>sudo update-locale LANG=zh_CN.UTF-8
</code></pre>
<p>如果你更喜欢英文(但支持中文字体显示):</p>
<pre><code>sudo update-locale LANG=en_US.UTF-8
</code></pre>
<hr>
<h3 id="-第-4-步检查配置是否成功"><strong>✅ 第 4 步:检查配置是否成功</strong></h3>
<pre><code>locale
</code></pre>
<p>输出应包含:</p>
<pre><code>LANG=zh_CN.UTF-8# 或 en_US.UTF-8
</code></pre>
<hr>
<h3 id="-第-5-步重启系统"><strong>✅ 第 5 步:重启系统</strong></h3>
<pre><code>sudo reboot
</code></pre>
</div>
<div id="MySignature" role="contentinfo">
<p>你要保守你心,胜过保守一切。</p>
<p>本文来自博客园,作者:刘俊涛的博客,转载请注明原文链接:https://www.cnblogs.com/lovebing/p/18983464</p><br><br>
来源:https://www.cnblogs.com/lovebing/p/18983464
頁:
[1]