Home>Article>Operation and Maintenance> What is the command to exit without saving in Linux?
In Linux, the command to exit without saving is "q!"; this command can be entered after the colon that appears when editing a file to exit insert mode, indicating a forced exit without saving the file, where "!" It means "forced".
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
What is the command to exit Linux without saving?
:q! means forced exit without saving and not saving the file
Basically vi/vim is divided into three modes, namely command mode (Command mode), input mode (Insert mode) and bottom line command mode (Last line mode). The functions of these three modes are:
Command mode:
The user has just started vi/vim and entered the command mode.
In this state, keystrokes will be recognized by Vim as commands instead of character input.
Input mode
Press i in command mode to enter input mode.
Underline command mode
Press: (English colon) in command mode to enter the underline command mode.
Example:
After entering the input mode and changing, if you don’t want to save, you can enter q!
after the colon. Examples are as follows:
Related recommendations: "Linux Video Tutorial"
The above is the detailed content of What is the command to exit without saving in Linux?. For more information, please follow other related articles on the PHP Chinese website!