Home>Article>Operation and Maintenance> What is the command to exit without saving in Linux?

What is the command to exit without saving in Linux?

WBOY
WBOY Original
2022-01-04 11:25:52 19470browse

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".

What is the command to exit without saving in Linux?

#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:

What is the command to exit without saving in Linux?

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:

What is the command to exit without saving in Linux?

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!

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