The vim command edits the base command of the host file:

Source: Internet
Author: User

Open the host file with the VIM command

[Email protected]/]# vim/etc/hosts

Press "I" key to enter edit mode
Press "ESC" key to exit Edit mode

Press "Backspace" key to delete the previous character of the cursor
Press "Delete" key to delete one character after the cursor
Press "DD" key to delete the forward

Press "YY" key to copy the forward
Press "P" key to paste the copied content to the next line

Press ": Wq" to save exit
Press ": X" to save the exit
Press ": q!", Force quit do not save

Up key: Move the cursor to the previous line
"Down" key: Move the cursor to the next line
Left key: Moves the cursor to the left one character
"Right" key: Move the cursor to the right to move one character

"Home" key to move the cursor to the beginning of the current
"End" key, the cursor has been at the end of the current line

"PgUp", PAGE Up
"PgDn", PAGE Down

[The END]

The vim command edits the base command of the host file:

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.