Debianetch supports displaying and Inputting Chinese characters on the console

Source: Internet
Author: User
Debianetch supports displaying and Inputting Chinese characters in the console-Debian information of the Linux release technology. The following is a detailed description. This may be the cause of apt-get failure due to the expiration of gpg key when the machine is installed. Many packages are not installed properly. For example, today we found that even the dig command was not installed. Run the apt-file command to check whether the dig command is included in the dnsutils package.

However, the most disturbing problem is that when the ls command is run on the console, Chinese files cannot be displayed, and Chinese characters cannot be entered in the console.

So I ran the locale command and found that the "LANG" of common users is empty, and the "LC_ALL" is "POSIX ". "Root" user's "LANG" and "" LC_ALL "are both" C ". Check that "LANG = C" and "LANGUAGE = C" are set in the ". profile" file of the root user, and comment them out.

Use

Dpkg-reconfigure locales

Command to reset the encoding to use. I chose en_US and zh_CN.UTF8/GBK. Run later

Locale-gen

Command. Create a locale File Based on the configuration file "/etc/locale. gen.

Set the "/etc/default/locale" file to "LANG = en_US". In this way, after su is root, locale becomes "en_US", and you can see and enter Chinese characters in the console. However, if normal users do not work, simply add a sentence in/etc/profile.

Export LANG = en_US; LANGUAGE = en_US; LC_ALL = en_US

Okay.
Related Article

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.