Home > Article > Operation and Maintenance > 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!