Use Chinese characters in the Ubuntu Linux Console

Source: Internet
Author: User
Http://telltruth.net/2006/12/21/%E5%9C%A8ubuntu-linux%E7%9A%84%E6%8E%A7%E5%88%B6%E5%8F%B0%E4%B8%8B%E4%BD%BF%E7%94%A8%E4%B8%AD%E6%96%87/
Use Chinese posted on Thursday and December 21,200 6 in Unix/Linux on the Ubuntu Linux Console

The company's Unix server is using GBK encoding environment, and my notebook is installed with Ubuntu 6.06, default only installed UTF-8 character set, so the Chinese characters in the programs I log on to my company at home are always garbled. After a few days of depressing me, I finally got it done today.

1. Modify the Chinese locale Configuration:

Put the configuration file in/var/lib/locales/supported. d/The following is ZH in Chinese and EN in English. You can add or delete entries as needed (I believe Gentoo is familiar with this, huh, huh:

Zh_cn UTF-8
Zh_cn.gbk GBK
Zh_CN.UTF-8 UTF-8
Zh_cn.gb18030 gb18030
Zh_cn.gb2312 gb2312
Zh_tw big5
Zh_tw.big5 big5
Zh_TW.UTF-8 UTF-8

2. Install and set zhcon:

Sudo apt-Get install zhcon

Modify the configuration file/etc/zhcon. conf, which is worth modifying:

Defaultencode = GBK
# Default encoding, which can also be gb2312 or big5
X_resolution = 1024
# Screen resolution
Y_resolution = 768
Color_cursortype = 0
# Cursor style in the console, 0, block; 1, none; 2, underline; Use 3 to 6 to adjust the size of the cursor Block
Beep = off
# It is better to turn off the warning of BB.

Now, you can use zhcon in the console as if you were using xterm. You can also enter Chinese characters!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.