Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to save exit for linux

Shulou Source: shulou.com Published: 2022-06-02 03:12:46 09月30日 Update

How does linux save the exit? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!

Vi is the standard editor for Unix and Linux systems, founded by 喜悦, Bill of the University of California, Berkeley. After learning it, you will walk freely in the world of Linux. Basically, vi can be divided into three states, namely, command mode, insert mode, and bottom line mode.

In Linux command line mode, press the colon key to enter the bottom line mode, so the command to save exit is: wq

The following is the expansion of knowledge:

Edit mode

After entering the text using vi, press I to start editing the text

Exit vi and save files

In command line mode, press the colon key to enter the bottom line mode, for example:

W (save current file)

W filename (saves the file with the specified file name "filename")

: wq (save and exit vi)

: wq filename (save the file you are editing as "filename" file to exit vi)

: Q (quit vi)

: Q! (do not save and force to exit vi)

: X (equivalent to the function of wq)

Thank you for reading! After reading the above, do you have a general understanding of how linux saves the exit? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.

Tags: Mode file content command colon text article question unimpeded world function university file name more standard being status by the United States see knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information MariaDB MySQL OPPO Reno Huawei