http://linux-wiki.cn/index.php?title=%E8%AE%BE%E7%BD%AE%E6%8E%A7%E5%88%B6%E5%8F%B0%E7%BB%88%E7%AB%AF%E8%AF%AD%E8%A8%80&feed=atom&action=history
设置控制台终端语言 - 修订历史
2024-03-28T23:27:57Z
本站上此页的修订历史
MediaWiki 1.17.0
http://linux-wiki.cn/index.php?title=%E8%AE%BE%E7%BD%AE%E6%8E%A7%E5%88%B6%E5%8F%B0%E7%BB%88%E7%AB%AF%E8%AF%AD%E8%A8%80&diff=1824&oldid=prev
Chenxing: /* 实现方法 */
2012-03-19T07:57:16Z
<p><span class="autocomment">实现方法</span></p>
<table style="background-color: white; color:black;">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">←上一修订</td>
<td colspan='2' style="background-color: white; color:black;">在2012年3月19日 (一) 07:57所做的修订版本</td>
</tr><tr><td colspan="2" class="diff-lineno">第4行:</td>
<td colspan="2" class="diff-lineno">第4行:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>==实现方法==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>==实现方法==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>  <del class="diffchange diffchange-inline">如可以使用root帐户,则用其编辑 '''/etc/bash/bashrc'''(Debian不可用此法),如果只能使用普通帐户, </del>编辑'''~/.bashrc''',在文件末尾加入:</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> 编辑'''~/.bashrc''',在文件末尾加入:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><source lang=bash></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><source lang=bash></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>if [[ $TERM == "linux" ]]; then</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>if [[ $TERM == "linux" ]]; then</div></td></tr>
</table>
Chenxing
http://linux-wiki.cn/index.php?title=%E8%AE%BE%E7%BD%AE%E6%8E%A7%E5%88%B6%E5%8F%B0%E7%BB%88%E7%AB%AF%E8%AF%AD%E8%A8%80&diff=1550&oldid=prev
Chenxing在2011年4月12日 (二) 20:39
2011-04-12T20:39:33Z
<p></p>
<table style="background-color: white; color:black;">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">←上一修订</td>
<td colspan='2' style="background-color: white; color:black;">在2011年4月12日 (二) 20:39所做的修订版本</td>
</tr><tr><td colspan="2" class="diff-lineno">第1行:</td>
<td colspan="2" class="diff-lineno">第1行:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> 由于目前Ctrl-Alt-Fn进入的控制台终端默认不能显示中文,而在使用中文Locale时控制台终端又试图显示中文,从而产生[[:Category:中文编码应用|乱码]]。本文介绍一种让控制台终端以英文显示,而其它地方仍使用中文的方案。</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> 由于目前Ctrl-Alt-Fn进入的控制台终端默认不能显示中文,而在使用中文Locale时控制台终端又试图显示中文,从而产生[[:Category:中文编码应用|乱码]]。本文介绍一种让控制台终端以英文显示,而其它地方仍使用中文的方案。</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">{{Hint|另一种解决方案是选用支持中文的终端软件,如FbTerm。}}</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>==实现方法==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>==实现方法==</div></td></tr>
</table>
Chenxing
http://linux-wiki.cn/index.php?title=%E8%AE%BE%E7%BD%AE%E6%8E%A7%E5%88%B6%E5%8F%B0%E7%BB%88%E7%AB%AF%E8%AF%AD%E8%A8%80&diff=630&oldid=prev
Chenxing在2008年1月30日 (三) 06:54
2008-01-30T06:54:37Z
<p></p>
<table style="background-color: white; color:black;">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">←上一修订</td>
<td colspan='2' style="background-color: white; color:black;">在2008年1月30日 (三) 06:54所做的修订版本</td>
</tr><tr><td colspan="2" class="diff-lineno">第3行:</td>
<td colspan="2" class="diff-lineno">第3行:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>==实现方法==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>==实现方法==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> 如可以使用root帐户,则用其编辑 '''/etc/bash/bashrc'''(Debian不可用此法),如果只能使用普通帐户,编辑'''~/.bashrc''',在文件末尾加入:</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> 如可以使用root帐户,则用其编辑 '''/etc/bash/bashrc'''(Debian不可用此法),如果只能使用普通帐户,编辑'''~/.bashrc''',在文件末尾加入:</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><bash></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><<ins class="diffchange diffchange-inline">source lang=</ins>bash></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>if [[ $TERM == "linux" ]]; then</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>if [[ $TERM == "linux" ]]; then</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>     LC_ALL=C</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>     LC_ALL=C</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>fi</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>fi</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div></<del class="diffchange diffchange-inline">bash</del>></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></<ins class="diffchange diffchange-inline">source</ins>></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> 保存,重新登录即可</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> 保存,重新登录即可</div></td></tr>
<tr><td colspan="2" class="diff-lineno">第14行:</td>
<td colspan="2" class="diff-lineno">第14行:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>bashrc是在登录[[bash]]执行的[[脚本]],加入的代码的功能是在登录到控制台终端时,将语言设置为C。由于是在登录终端时执行的,在启动X之后,它故不会影响图形界面的语言。</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>bashrc是在登录[[bash]]执行的[[脚本]],加入的代码的功能是在登录到控制台终端时,将语言设置为C。由于是在登录终端时执行的,在启动X之后,它故不会影响图形界面的语言。</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>[[Category: 控制台终端]] [[Category: <del class="diffchange diffchange-inline"> </del>中 <del class="diffchange diffchange-inline">文应用</del>]] [[Category: Shell技巧]]</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>[[Category: 控制台终端]] [[Category: <ins class="diffchange diffchange-inline">Linux </ins>中 <ins class="diffchange diffchange-inline">国化</ins>]] [[Category: Shell技巧]]</div></td></tr>
</table>
Chenxing
http://linux-wiki.cn/index.php?title=%E8%AE%BE%E7%BD%AE%E6%8E%A7%E5%88%B6%E5%8F%B0%E7%BB%88%E7%AB%AF%E8%AF%AD%E8%A8%80&diff=434&oldid=prev
Chenxing在2007年10月25日 (四) 09:54
2007-10-25T09:54:22Z
<p></p>
<table style="background-color: white; color:black;">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">←上一修订</td>
<td colspan='2' style="background-color: white; color:black;">在2007年10月25日 (四) 09:54所做的修订版本</td>
</tr><tr><td colspan="2" class="diff-lineno">第14行:</td>
<td colspan="2" class="diff-lineno">第14行:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>bashrc是在登录[[bash]]执行的[[脚本]],加入的代码的功能是在登录到控制台终端时,将语言设置为C。由于是在登录终端时执行的,在启动X之后,它故不会影响图形界面的语言。</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>bashrc是在登录[[bash]]执行的[[脚本]],加入的代码的功能是在登录到控制台终端时,将语言设置为C。由于是在登录终端时执行的,在启动X之后,它故不会影响图形界面的语言。</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>[[Category: 控制台终端]] [[Category: 中文应用]]</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>[[Category: 控制台终端]] [[Category: 中文应用<ins class="diffchange diffchange-inline">]] [[Category: Shell技巧</ins>]]</div></td></tr>
</table>
Chenxing
http://linux-wiki.cn/index.php?title=%E8%AE%BE%E7%BD%AE%E6%8E%A7%E5%88%B6%E5%8F%B0%E7%BB%88%E7%AB%AF%E8%AF%AD%E8%A8%80&diff=280&oldid=prev
Chenxing: /* 实现方法 */
2007-07-20T10:12:55Z
<p><span class="autocomment">实现方法</span></p>
<table style="background-color: white; color:black;">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">←上一修订</td>
<td colspan='2' style="background-color: white; color:black;">在2007年7月20日 (五) 10:12所做的修订版本</td>
</tr><tr><td colspan="2" class="diff-lineno">第2行:</td>
<td colspan="2" class="diff-lineno">第2行:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>==实现方法==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>==实现方法==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 如可以使用root帐户,则用其编辑 '''/etc/bash/<del class="diffchange diffchange-inline">bashrc'''(Gentoo)或'''/etc/bash.</del>bashrc'''(Debian),如果只能使用普通帐户,编辑'''~/.bashrc''',在文件末尾加入:</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> 如可以使用root帐户,则用其编辑 '''/etc/bash/bashrc'''(Debian <ins class="diffchange diffchange-inline">不可用此法</ins>),如果只能使用普通帐户,编辑'''~/.bashrc''',在文件末尾加入:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><bash></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><bash></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>if [[ $TERM == "linux" ]]; then</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>if [[ $TERM == "linux" ]]; then</div></td></tr>
</table>
Chenxing
http://linux-wiki.cn/index.php?title=%E8%AE%BE%E7%BD%AE%E6%8E%A7%E5%88%B6%E5%8F%B0%E7%BB%88%E7%AB%AF%E8%AF%AD%E8%A8%80&diff=279&oldid=prev
Chenxing: /* 实现方法 */
2007-07-20T09:53:31Z
<p><span class="autocomment">实现方法</span></p>
<table style="background-color: white; color:black;">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">←上一修订</td>
<td colspan='2' style="background-color: white; color:black;">在2007年7月20日 (五) 09:53所做的修订版本</td>
</tr><tr><td colspan="2" class="diff-lineno">第2行:</td>
<td colspan="2" class="diff-lineno">第2行:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>==实现方法==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>==实现方法==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div> 如可以使用root帐户,则用其编辑 '''/etc/bash/bashrc''',如果只能使用普通帐户,编辑'''~/.bashrc''',在文件末尾加入:</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> 如可以使用root帐户,则用其编辑 '''/etc/bash/bashrc'''<ins class="diffchange diffchange-inline">(Gentoo)或'''/etc/bash.bashrc'''(Debian) </ins>,如果只能使用普通帐户,编辑'''~/.bashrc''',在文件末尾加入:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><bash></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><bash></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>if [[ $TERM == "linux" ]]; then</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>if [[ $TERM == "linux" ]]; then</div></td></tr>
</table>
Chenxing
http://linux-wiki.cn/index.php?title=%E8%AE%BE%E7%BD%AE%E6%8E%A7%E5%88%B6%E5%8F%B0%E7%BB%88%E7%AB%AF%E8%AF%AD%E8%A8%80&diff=250&oldid=prev
Chenxing: 新页面: 由于目前Ctrl-Alt-Fn进入的控制台终端默认不能显示中文,而在使用中文Locale时控制台终端又试图显示中文,从而产生[[:Category:中文编码应用|乱...
2007-07-16T04:09:40Z
<p>新页面: 由于目前Ctrl-Alt-Fn进入的控制台终端默认不能显示中文,而在使用中文Locale时控制台终端又试图显示中文,从而产生[[:Category:中文编码应用|乱...</p>
<p><b>新建页面</b></p><div>由于目前Ctrl-Alt-Fn进入的控制台终端默认不能显示中文,而在使用中文Locale时控制台终端又试图显示中文,从而产生[[:Category:中文编码应用|乱码]]。本文介绍一种让控制台终端以英文显示,而其它地方仍使用中文的方案。<br />
<br />
==实现方法==<br />
如可以使用root帐户,则用其编辑 '''/etc/bash/bashrc''',如果只能使用普通帐户,编辑'''~/.bashrc''',在文件末尾加入:<br />
<bash><br />
if [[ $TERM == "linux" ]]; then<br />
LC_ALL=C<br />
fi<br />
</bash><br />
<br />
保存,重新登录即可<br />
<br />
==原理简析==<br />
bashrc是在登录[[bash]]执行的[[脚本]],加入的代码的功能是在登录到控制台终端时,将语言设置为C。由于是在登录终端时执行的,在启动X之后,它故不会影响图形界面的语言。<br />
<br />
[[Category: 控制台终端]] [[Category: 中文应用]]</div>
Chenxing