Linux Ubuntu Server 14.04 LTS processes Chinese Garbled text and vi editor operations, ubuntu14.04

Source: Internet
Author: User

Linux Ubuntu Server 14.04 LTS processes Chinese Garbled text and vi editor operations, ubuntu14.04

First, I searched for some information on the Internet, saying that it was temporarily unavailable.

However, during installation, the installation is performed in Chinese. Therefore, the command page displays Garbled text.


Since it is a Linux service version, I think there is no need to install a Chinese package. I decided to switch back to 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 permissions of ordinary users are insufficient. What should I do? By default, The sudo command can get the root permission for 5 minutes, that is, sudo vi locale;


In this way, go to the vi editor and edit it.

Change all Chinese encoding to English encoding.


3. Save the modification and restart the operating system;

=============================== Appendix 1

Vi editor operation:

I. Basic operations on the editing function

I: insert in front of the current cursor, move the text behind the cursor to the back

A: insert the cursor from the current position and move the text behind the cursor.
I: insert the cursor at the beginning of the line (before the first non-blank character)
A: insert from the end of the row where the cursor is located
O: add a line under the row where the cursor is located (and enter the input mode)
O: add a line above the row where the cursor is located (and enter the input mode)
X: Delete the character of the cursor, equivalent to the [Delete] function key.
X: Delete the prefix of the cursor, equivalent to [Backspace]
Dd: Delete the row where the cursor is located.
R: Modify the character of the cursor
R: Replace the current and subsequent characters until you press [ESC]
S: Starting from the current cursor position, replace the specified number of characters with the input text
S: delete a specified number of rows and replace them with the input text
Do: Delete to the beginning of a row
D $: Delete to the end of the row
Ii. Exit and save vi

: W -- save the current file
: Wq -- save and exit
: Q -- exit directly. If modified, a message indicating whether to save the modification is displayed.
: Q! -- Exit directly without saving the changes

3. Control cursor Movement

There's nothing to say about the arrow keys on the keyboard.



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.