Basic knowledge points of the text editing of Linux

Source: Internet
Author: User

The first step is to open the terminal

Create File command touch file name. suffix

Open File command vi file name. suffix name (after entering TXT file for general mode, you cannot add and revise files) after pressing I or a or O can be inserted a little bit different, not to mention

Exit Edit mode ESC (you can enter a command after exiting)

Copy the previous line yy or y number y from the first few lines to the first line

Paste P

Undo Previous Action U

Delete a line dd d number d remove cursor after how many lines with cursor

X equals backspace key

YW copy a word

DW Delete a Word

Shift +^ moving to the head

Shift +$ moves to the end of the line

Shift +g to the tail of the page

Number +shift+g move to the first line

Save File: W

Save exit: Wq

Exit: Q

Forced exit:!

/find/searched word n is find Next, shift +n is looking up

? Find? The searched word n is to find the previous, shift +n is looking down

Basic knowledge points of the text editing of Linux

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.