Linux Ubuntu Server 14.04 LTS handling Chinese garbled and VI editor operation summary

Source: Internet
Author: User

First searched the Internet some information, said is temporarily unable to solve.

However, in the installation of the choice is the Chinese installation, so on the command page is displayed in the box garbled.

Since it is the Linux service version, I think there is no need to install the Chinese package, decided to change back to the English display.


1. Use the command CD etc/default to switch to this directory, and then modify the content in the locale file;

2. To modify the locale file, the normal user's permission is not enough, how to do it, using the sudo command, by default, you can get 5 minutes of root permissions, namely: sudo vi locale;

This goes into the VI editor for editing.

Change all the Chinese codes to English code.

3. After the modification is completed, save to restart the operating system;

==================== Annex I

VI Editor Operation:

First, the basic operation of the editing function

I: Insert before current cursor, text moves backwards after cursor

A: Inserted after the current cursor, after the cursor text is moved
I: Insert at the beginning of the cursor (the first non-whitespace character match either)
A: Insert from the end of the line where the cursor is located
O: Add a row below the cursor line (and enter the input mode)
O: Add a row above the cursor line (and enter the input mode)
X: Delete the character of the cursor, equivalent to the [delete] function key
X: Delete cursor before character, equivalent to [Backspace]
DD: Delete the line where the cursor is located
R: Modify the character of the cursor
R: Replace the current character and its characters until you press [ESC]
S: replaces the specified number of characters with the input text starting at the current cursor position
S: Deletes the specified number of rows and replaces them with the input text
Do: Delete to the beginning of the line
d$: Delete to end of line
Ii. Vi. Withdrawal and preservation

: w--Save current file
: wq--Save and exit
: q--Direct exit, if modified will prompt to save
: q! --Do not save changes to exit directly

Third, control cursor movement

The arrow keys on the keyboard, there's nothing to say

Linux Ubuntu Server 14.04 LTS handling Chinese garbled and VI editor operation summary

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: 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.