Home  >  Article  >  Operation and Maintenance  >  Linux uses vi command to edit files to exit without saving

Linux uses vi command to edit files to exit without saving

王林
王林Original
2020-01-14 09:49:1011328browse

Linux uses vi command to edit files to exit without saving

1. Open the terminal and execute the vi command to open a file, for example:

vi test.txt

2. Then press a or i to enter the editing mode and edit the text content

(Free learning video tutorial recommendation: linux video tutorial)

3. Finally, press the esc key to exit the editing mode, enter: q!, for example:

:q! #退出不保存

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of Linux uses vi command to edit files to exit without saving. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn