Linux vi vim

The Linux View command is a commonly used text editor in Linux systems. It does not generate a backup file for modifying the source file, and marks the original file as read-only to prevent damage, as well as other commonly used editor functions. It has the following advantages :

– Powerful functions: View commands support a variety of editing functions, such as search, replace, paged viewing, etc.;

– Simple function: it only supports text editing, does not support graphical interface, and only 6 command lines can realize the View function;

– High security: The View command will set the source file to read-only to prevent damage. This is the best thing about the View command;

– Save disk space: The View command does not generate any backup files, so disk space is not wasted.

To use the View command, you must first open a terminal window and enter the following command:

vi [file name]

For example, when changing a file called readme.txt, you can use:

vi readme.txt

In View mode, press the i key to enter insert mode, where you can enter text; if you want to save and exit the editor, press the Escape key and enter the command:

:wq

Indicates write (write) and quit (exit). At this time, you can save the modifications made above and exit the view editor.

:q! 

Indicates exit without saving

In short, the View command is very useful and popular in Linux systems. It has the advantages of powerful functions, simple functions, high security and saving disk space. It is an important text editor in Linux systems.

Guess you like

Origin blog.csdn.net/st75033562/article/details/133076923