Solution of Chinese garbled problem in Ubuntu command line

Source: Internet
Author: User
Tags locale

First of all... The command line I'm talking about is the pure command-line mode that CTRL+ALT+F1~F6 opens, not the terminal opened in X Window ...

If you encounter the terminal can not display the Chinese text of the method is basically useless to you .... I can skip it.

The Chinese cannot be displayed in the pure command line

The cause is the installation process of the choice of Chinese, so the system default configuration is also set to Chinese, can be changed to English.

Solution 1: Learn English well. Set the environment variable to English .... (Don't smoke me.)

Modify/etc/default/locale

sudo vim/etc/default/locale1

Modify the default

Lang=zh_cn. UTF-8

Language=zh_cn:zh

For:

Lang= "en_US. UTF-8 "

Language= "En_us:en"

Disk exit

And then:

sudo reboot

and then

env or locale to see the modified results ...

Workaround 2: This is what I want to say ... Install a zhcon on it ...

Terminal or command line input

sudo apt-get install Zhcon

After installation can ~

When running, remember to load Vgz driver and UTF8 support otherwise it will be black screen ...

And can only run on the pure command line in the terminal run error

So your order should be Zhcon--utf8--DRV=VGA.

If it's too much trouble to input every time, you can add an alias to ~/.BASHRC.

sudo vim ~/.BASHRC

Add a line to the inside after opening

Alias zhcon= ' Zhcon--utf8--DRV=VGA '

Save exit

This way, every time you go to the command line, run Zhcon directly without worrying about the black screen.

Zhcon Support Chinese display also support Chinese input method due to hot key conflict problem temporarily I only know CTRL + SPACE switch to full spell input method is

Can be used more or less solve the point of the Chinese directory/file name problem

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.